packaged-staging.bbclass: fix issue with no SRC_URI
PATCH 1/1 packaged-staging.bbclass: fix issue with no SRC_URI
From: Cliff Brake <[email protected]>
Currently with srctree, we get errors like the following:
| + srcuri=
| + '[' '' == '' ']'
| + srcuri=OpenEmbedded
| + echo 'Source: '
| ++ find /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg '(' -name '*.la' -o -name '*-config' ')' -type f
| + stage-manager-ipkg-build -o 0 -g 0 /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/pstage/angstromglibc
| *** Error: CONTROL/control is missing field Source
| The Source field contain the URL's or filenames of the source code and any patches
| used to build this package. Either gnu-style tarballs or Debian source packages
| are acceptable. Relative filenames may be used if they are distributed in the same
| directory as the .ipk file.
|
| ipkg-build: Please fix the above errors and try again.
| ERROR: Function staging_packager failedNOTE: package autotools-demo-1.0-28-g3a96627-r0: task do_package_stage: Failed
ERROR: TaskFailed event exception, aborting
This patch fixes that issue.
--- classes/packaged-staging.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
classes/packaged-staging.bbclass +1 -1
@@ -374,7 +374,7 @@ staging_packager () { if [ "$srcuri" == "" ]; then srcuri="OpenEmbedded" fi - echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control + echo "Source: ${srcuri}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control # Deal with libtool not supporting sysroots # Need to remove hardcoded paths and fix these when we install the
Signature · 1 line
1.7.0.4
Below is the context for proposed patch. Perhaps this will help people review it. I would like to get this pushed, so acks appreciated.
4ad83f91 (Richard Purdie 2008-03-17 20:38:12 +0000 364) echo
"Package: ${PSTAGE_PKGPN}" >
${PSTAGE_TMPDIR_STAGE}/CONTROL/control38f04328 (Richard Purdie 2008-03-14 11:38:00 +0000 365) echo
"Version: ${PSTAGE_PKGVERSION}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198 (Richard Purdie 2008-02-19 12:08:38 +0000 366) echo
"Description: ${DESCRIPTION}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198 (Richard Purdie 2008-02-19 12:08:38 +0000 367) echo
"Section: ${SECTION}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198 (Richard Purdie 2008-02-19 12:08:38 +0000 368) echo
"Priority: Optional" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198 (Richard Purdie 2008-02-19 12:08:38 +0000 369) echo
"Maintainer: ${MAINTAINER}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control38f04328 (Richard Purdie 2008-03-14 11:38:00 +0000 370) echo
"Architecture: ${PSTAGE_PKGARCH}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control239d4346 (Koen Kooi 2008-04-11 07:39:51 +0000 371)239d4346 (Koen Kooi 2008-04-11 07:39:51 +0000 372) #
Protect against empty SRC_URI3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 373)
srcuri="${SRC_URI}"3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 374) if [
"$srcuri" == "" ]; then3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 375)
srcuri="OpenEmbedded"
239d4346 (Koen Kooi 2008-04-11 07:39:51 +0000 376) fi 3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 377) echo
"Source: ${SRC_URI}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 378)3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 379) # Deal
with libtool not supporting sysroots3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 380) # Need
to remove hardcoded paths and fix these when we install the3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 381) #
staging packages.
This is the change where the code got changed:
# 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
+ srcuri="${SRC_URI}"
+ if [ "$srcuri" == "" ]; then
+ srcuri="OpenEmbedded"
fi
+ echo "Source: ${SRC_URI}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control
It appears that the above patch is what broke it. The proposed fix is in the previous email below.
Thanks,
Cliff
Quoted 49 lines · Cliff Brake
From: Cliff Brake <[email protected]>
Currently with srctree, we get errors like the following:
| + srcuri= | + '[' '' == '' ']' | + srcuri=OpenEmbedded | + echo 'Source: ' | ++ find /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg '(' -name '*.la' -o -name '*-config' ')' -type f | + stage-manager-ipkg-build -o 0 -g 0 /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/pstage/angstromglibc | *** Error: CONTROL/control is missing field Source | The Source field contain the URL's or filenames of the source code and any patches | used to build this package. Either gnu-style tarballs or Debian source packages | are acceptable. Relative filenames may be used if they are distributed in the same | directory as the .ipk file. | | ipkg-build: Please fix the above errors and try again. | ERROR: Function staging_packager failedNOTE: package autotools-demo-1.0-28-g3a96627-r0: task
do_package_stage: Failed
ERROR: TaskFailed event exception, abortingThis patch fixes that issue.
Signed-off-by Cliff Brake <[email protected]>---
classes/packaged-staging.bbclass | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)classes/packaged-staging.bbclass +0
-0@@ -374,7 +374,7 @@ staging_packager () {if [ "$srcuri" == "" ]; then
srcuri="OpenEmbedded"
fi
- echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+ echo "Source: ${srcuri}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control# Deal with libtool not supporting sysroots
# Need to remove hardcoded paths and fix these when we install the --
1.7.0.4_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Please change ${srcuri} to $srcuri, so its very clear that its expanded in shell, rather than letting bitbake try to expand it and fail since its unset :)
After that, Acked-by: Chris Larson <[email protected]>
Quoted 136 lines · Cliff Brake
Below is the context for proposed patch. Perhaps this will help people review it. I would like to get this pushed, so acks appreciated.
4ad83f91(Richard Purdie 2008-03-17 20:38:12 +0000 364) echo
"Package: ${PSTAGE_PKGPN}" >
${PSTAGE_TMPDIR_STAGE}/CONTROL/control38f04328(Richard Purdie 2008-03-14 11:38:00 +0000 365) echo
"Version: ${PSTAGE_PKGVERSION}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198(Richard Purdie 2008-02-19 12:08:38 +0000 366) echo
"Description: ${DESCRIPTION}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198(Richard Purdie 2008-02-19 12:08:38 +0000 367) echo
"Section: ${SECTION}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198(Richard Purdie 2008-02-19 12:08:38 +0000 368) echo
"Priority: Optional" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control695ca198(Richard Purdie 2008-02-19 12:08:38 +0000 369) echo
"Maintainer: ${MAINTAINER}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control38f04328(Richard Purdie 2008-03-14 11:38:00 +0000 370) echo
"Architecture: ${PSTAGE_PKGARCH}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control239d4346(Koen Kooi 2008-04-11 07:39:51 +0000 371)239d4346(Koen Kooi 2008-04-11 07:39:51 +0000 372) #
Protect against emptySRC_URI3440328a(Joshua Lock 2010-03-31 11:22:02 +0100 373)
srcuri="${SRC_URI}"3440328a(Joshua Lock 2010-03-31 11:22:02 +0100 374) if [
"$srcuri" == "" ]; then3440328a(Joshua Lock 2010-03-31 11:22:02 +0100 375)
srcuri="OpenEmbedded"239d4346 (Koen Kooi 2008-04-11 07:39:51 +0000 376) fi 3440328a (Joshua Lock 2010-03-31 11:22:02 +0100 377) echo"Source: ${SRC_URI}" >>
${PSTAGE_TMPDIR_STAGE}/CONTROL/control3440328a(Joshua Lock 2010-03-31 11:22:02 +0100 378)3440328a(Joshua Lock 2010-03-31 11:22:02 +0100 379) # Deal
with libtool not supporting sysroots3440328a(Joshua Lock 2010-03-31 11:22:02 +0100 380) # Need
to remove hardcoded paths and fix these when we install the3440328a(Joshua Lock 2010-03-31 11:22:02 +0100 381) #
staging packages.This is the change where the code got changed:
# Protect against empty
SRC_URI(quoted diff) +0
-2- if [ "${SRC_URI}" != "" ] ; then - echo "Source: ${SRC_URI}" >>${PSTAGE_TMPDIR_STAGE}/CONTROL/control
(quoted diff) +0
-2- else - echo "Source: OpenEmbedded" >>${PSTAGE_TMPDIR_STAGE}/CONTROL/control
(quoted diff) +4
-0+ srcuri="${SRC_URI}" + if [ "$srcuri" == "" ]; then + srcuri="OpenEmbedded" fi + echo "Source: ${SRC_URI}" >>${PSTAGE_TMPDIR_STAGE}/CONTROL/control
It appears that the above patch is what broke it. The proposed fix is in the previous email below.
Thanks,
CliffQuoted 8 lines · Cliff Brake
From: Cliff Brake <[email protected]>
Currently with srctree, we get errors like the following:
| + srcuri= | + '[' '' == '' ']' | + srcuri=OpenEmbedded | + echo 'Source: ' | ++ find/scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg '(' -name '*.la' -o -name '*-config' ')' -type f
Quoted 1 line
| + stage-manager-ipkg-build -o 0 -g 0
/scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/pstage/angstromglibc
Quoted 2 lines
| *** Error: CONTROL/control is missing field Source
| The Source field contain the URL's or filenames of the source code andany patches
Quoted 1 line
| used to build this package. Either gnu-style tarballs or Debian source
packages
Quoted 1 line
| are acceptable. Relative filenames may be used if they are distributed
in the same
Quoted 5 lines
| directory as the .ipk file. | | ipkg-build: Please fix the above errors and try again. | ERROR: Function staging_packager failedNOTE: package autotools-demo-1.0-28-g3a96627-r0: task
do_package_stage:Failed
Review
Quoted 10 lines
ERROR: TaskFailed event exception, aborting
This patch fixes that issue.
Signed-off-by Cliff Brake <[email protected]>--- classes/packaged-staging.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0b/classes/packaged-staging.bbclass
classes/packaged-staging.bbclass staging_packager () { · line 377
Quoted 8 lines
index 83f3578..6413afb 100644
classes/packaged-staging.bbclass +0
-1@@ -374,7 +374,7 @@ staging_packager () { if [ "$srcuri" == "" ]; then srcuri="OpenEmbedded" fi - echo "Source: ${SRC_URI}" >>${PSTAGE_TMPDIR_STAGE}/CONTROL/control
classes/packaged-staging.bbclass staging_packager () { · line 377
Quoted 1 line
classes/packaged-staging.bbclass +1
-0+ echo "Source: ${srcuri}" >>${PSTAGE_TMPDIR_STAGE}/CONTROL/control
Quoted 7 lines
classes/packaged-staging.bbclass +0
-1# Deal with libtool not supporting sysroots # Need to remove hardcoded paths and fix these when we install the --1.7.0.4
Quoted 5 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Cliff Brake
Acked-by Chris LarsonQuoted 5 lines · Chris Larson
Please change ${srcuri} to $srcuri, so its very clear that its expanded in shell, rather than letting bitbake try to expand it and fail since its unset :)
After that, Acked-by: Chris Larson <[email protected]>
Thanks! Updated patch attached. Can I get one more ack?
Thanks,
Cliff
From de0cd8124077b62e96d3c3487b5d8cecab55d837 Mon Sep 17 00:00:00 2001
From: Cliff Brake <[email protected]>
Date: Wed, 2 Jun 2010 14:03:15 -0400
Subject: [PATCH] packaged-staging.bbclass: fix issue with no SRC_URI
Currently with srctree, we get errors like the following:
| + srcuri=
| + '[' '' == '' ']'
| + srcuri=OpenEmbedded
| + echo 'Source: '
| ++ find /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg '(' -name '*.la' -o -name '*-config' ')' -type f
| + stage-manager-ipkg-build -o 0 -g 0 /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/pstage/angstromglibc
| *** Error: CONTROL/control is missing field Source
| The Source field contain the URL's or filenames of the source code and any patches
| used to build this package. Either gnu-style tarballs or Debian source packages
| are acceptable. Relative filenames may be used if they are distributed in the same
| directory as the .ipk file.
|
| ipkg-build: Please fix the above errors and try again.
| ERROR: Function staging_packager failedNOTE: package autotools-demo-1.0-28-g3a96627-r0: task do_package_stage: Failed
ERROR: TaskFailed event exception, aborting
This patch fixes that issue.
--- classes/packaged-staging.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
classes/packaged-staging.bbclass +1 -1
@@ -374,7 +374,7 @@ staging_packager () { if [ "$srcuri" == "" ]; then srcuri="OpenEmbedded" fi - echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control + echo "Source: $srcuri" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control # Deal with libtool not supporting sysroots # Need to remove hardcoded paths and fix these when we install the
Signature · 1 line
1.7.0.4
Khem Raj
Acked-byQuoted 32 lines · Cliff Brake
Quoted 5 lines · Chris Larson
Please change ${srcuri} to $srcuri, so its very clear that its expanded in shell, rather than letting bitbake try to expand it and fail since its unset :)
After that, Acked-by: Chris Larson <[email protected]>
Thanks! Updated patch attached. Can I get one more ack?
Thanks,
CliffFrom
de0cd8124077b62e96d3c3487b5d8cecab55d837Mon Sep 17 00:00:00 2001
From: Cliff Brake <[email protected]>
Date: Wed, 2 Jun 2010 14:03:15 -0400
Subject: [PATCH] packaged-staging.bbclass: fix issue with noSRC_URICurrently with srctree, we get errors like the following:
| + srcuri= | + '[' '' == '' ']' | + srcuri=OpenEmbedded | + echo 'Source: ' | ++ find /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg '(' -name '*.la' -o -name '*-config' ')' -type f | + stage-manager-ipkg-build -o 0 -g 0 /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/pstage/angstromglibc | *** Error: CONTROL/control is missing field Source | The Source field contain the URL's or filenames of the source code and any patches | used to build this package. Either gnu-style tarballs or Debian source packages | are acceptable. Relative filenames may be used if they are distributed in the same | directory as the .ipk file. | | ipkg-build: Please fix the above errors and try again. | ERROR: Function staging_packager failed
Quoted 6 lines
NOTE: package autotools-demo-1.0-28-g3a96627-r0: task
do_package_stage: Failed
ERROR: TaskFailed event exception, abortingThis patch fixes that issue.
Acked-by Chris Larson <[email protected]>
Quoted 26 lines
--- classes/packaged-staging.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)classes/packaged-staging.bbclass +1
-1@@ -374,7 +374,7 @@ staging_packager () { if [ "$srcuri" == "" ]; then srcuri="OpenEmbedded" fi - echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control + echo "Source: $srcuri" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control # Deal with libtool not supporting sysroots # Need to remove hardcoded paths and fix these when we install theSignature · 7 lines
1.7.0.4 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Koen Kooi
Acked-by-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Cliff Brake
Quoted 5 lines · Chris Larson
Please change ${srcuri} to $srcuri, so its very clear that its expanded in shell, rather than letting bitbake try to expand it and fail since its unset :)
After that, Acked-by: Chris Larson <[email protected]>
Thanks! Updated patch attached. Can I get one more ack?
and don't forget to update patchwork :)
Quoted 10 lines
Thanks,
Cliff_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMDP3CMkyGM64RGpERAjAiAJsExfnV7BPzUZPW2KHgBTnJKfBbWgCfaFVr O2VPzEIMBtIolbFEEsothJg=
=aHtc
-----END PGP SIGNATURE-----