summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-04-11 07:39:51 +0000
committerKoen Kooi <koen@openembedded.org>2008-04-11 07:39:51 +0000
commit239d43467ebeab7b62069d68aeccca0c3baa4695 (patch)
treeaf4fea38c84c92a182f509f42d9b059f0317fd23
parent85c441332af87ac81600d76d02efdafba82f2d9f (diff)
packaged-staging.bbclass: protect against empty SRC_URI
-rw-r--r--classes/packaged-staging.bbclass12
1 files changed, 9 insertions, 3 deletions
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index ddd97ffe6d..bb166cb2f5 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -233,9 +233,15 @@ staging_packager () {
echo "Priority: Optional" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
echo "Maintainer: ${MAINTAINER}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
echo "Architecture: ${PSTAGE_PKGARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
- echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
-
- ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}
+
+ # Protect against empty SRC_URI
+ if [ "${SRC_URI}" != "" ] ; then
+ echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+ else
+ echo "Source: OpenEmbedded" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+ fi
+
+ ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}
${PSTAGE_INSTALL_CMD} ${PSTAGE_PKG}
}