Build Configuration: BB_VERSION = "1.10.2" METADATA_BRANCH = "upstream_120620" METADATA_REVISION = "4c48637" TARGET_ARCH = "arm" TARGET_OS = "linux-gnueabi" MACHINE = "igep0020" DISTRO = "angstrom" DISTRO_VERSION = "v2012.07" TARGET_FPU = "hard" $ bitbake --version BitBake Build Tool Core version 1.10.2, bitbake version 1.10.2 Openembedded installs a python version 2.6.6. upstream_120620 means, I did my last fetch from git://github.com/openembedded/openembedded.git at 2012-06-20 ERROR: Function do_package_update_index_ipk failed NOTE: Task failed: ('function do_package_update_index_ipk failed', '/var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/work/igep0020-angstrom-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_update_index_ipk.31350') ERROR: Logfile of failure stored in: /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/work/igep0020-angstrom-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_update_index_ipk.31350 Log data follows: | + ipkgarchs='all any noarch arm armv4 armv4t armv5te armv6 armv7 armv7a igep0020' | + '[' '!' -z '' ']' | + mkdir -p /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk | + touch /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages | + opkg-make-index -r /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages -p /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages -l /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages.filelist -m /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk | + for arch in '$ipkgarchs' | + '[' -e /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/ ']' | + touch /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages | + opkg-make-index -r /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages -p /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages -l /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages.filelist -m /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/ | /var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/alsa-state-dbg_0.2.0-r23.9_all.ipk | Traceback (most recent call last): | File "/var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/sysroots/i686-linux/usr/bin/opkg-make-index", line 204, in <module> | fnlist = packages[name].get_file_list_dir(pkg_dir) | File "/var/dev/build/oe/120716-1614-0_igep0020-debug/tmp/sysroots/i686-linux/usr/bin/opkg.py", line 334, in get_file_list_dir | if rc != "": | NameError: global name 'rc' is not defined NOTE: package package-index-1.0-r0: task do_package_update_index_ipk: Failed ERROR: Task 14 (/var/dev/build/oe/120716-1614-0_igep0020-debug/openembedded/recipes/meta/package-index.bb, do_package_update_index_ipk) failed with 256 NOTE: package package-index-1.0-r0: task do_package_stage: Started ERROR: TaskFailed event exception, aborting ERROR: Build of /var/dev/build/oe/120716-1614-0_igep0020-debug/openembedded/recipes/meta/package-index.bb do_package_update_index_ipk failed ERROR: Task 14 (/var/dev/build/oe/120716-1614-0_igep0020-debug/openembedded/recipes/meta/package-index.bb, do_package_update_index_ipk) failed with 256 My opkg-utils_git.bb looks like: RDEPENDS_${PN} = "python" RDEPENDS_${PN}_virtclass-native = "" SRCREV = "423ecd36b4782327c16f516885d1248249c7724a" PV = "0.1.8+git${SRCPV}" PR = "r1" SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=git \ " S = "${WORKDIR}/git" # Avoid circular dependencies from package_ipk.bbclass PACKAGES_virtclass-native = "" do_install() { oe_runmake PREFIX=${prefix} DESTDIR=${D} install } BBCLASSEXTEND = "native" TARGET_CC_ARCH += "${LDFLAGS}" With the fix 423ecd36b4782327c16f516885d1248249c7724a opkg-make-index was fixed, but not opkg.py, which has the same error.
At my last post, I pasted the wrong error-output. The right one is this here: $ bitbake package-index NOTE: Handling BitBake files: - (7263/7263) [100 %] Parsing of 7263 .bb files complete (6810 cached, 453 parsed). 7602 targets, 330 skipped, 0 masked, 0 errors. Build Configuration: BB_VERSION = "1.10.2" METADATA_BRANCH = "upstream_120620" METADATA_REVISION = "74cae3b" TARGET_ARCH = "arm" TARGET_OS = "linux-gnueabi" MACHINE = "igep0020" DISTRO = "angstrom" DISTRO_VERSION = "v2012.07" TARGET_FPU = "hard" NOTE: Resolving any missing task queue dependencies NOTE: Preparing runqueue NOTE: Executing runqueue ERROR: TaskFailed event exception, aborting ERROR: Build of /var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb do_package_update_index_ipk failed NOTE: Running task 254 of 256 (ID: 14, /var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb, do_package_update_index_ipk) ERROR: Task 14 (/var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb, do_package_update_index_ipk) failed with 256 ERROR: '/var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb' failed NOTE: package package-index-1.0-r0: task do_package_update_index_ipk: Started ERROR: Function do_package_update_index_ipk failed NOTE: Task failed: ('function do_package_update_index_ipk failed', '/var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/work/igep0020-angstrom-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_update_index_ipk.25002') ERROR: Logfile of failure stored in: /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/work/igep0020-angstrom-linux-gnueabi/package-index-1.0-r0/temp/log.do_package_update_index_ipk.25002 Log data follows: | + ipkgarchs='all any noarch arm armv4 armv4t armv5te armv6 armv7 armv7a igep0020' | + '[' '!' -z '' ']' | + mkdir -p /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk | + touch /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages | + opkg-make-index -r /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages -p /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages -l /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/Packages.filelist -m /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk | + for arch in '$ipkgarchs' | + '[' -e /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/ ']' | + touch /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages | + opkg-make-index -r /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages -p /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages -l /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/Packages.filelist -m /var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/deploy/eglibc/ipk/all/ | Traceback (most recent call last): | File "/var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/sysroots/i686-linux/usr/bin/opkg-make-index", line 204, in <module> | fnlist = packages[name].get_file_list_dir(pkg_dir) | File "/var/dev/build/oe/120718-1044-0_igep0020-debug/tmp/sysroots/i686-linux/usr/bin/opkg.py", line 332, in get_file_list_dir | rc = subprocess.check_output(cmd, shell=True) | AttributeError: 'module' object has no attribute 'check_output' | ERROR: Function do_package_update_index_ipk failed NOTE: package package-index-1.0-r0: task do_package_update_index_ipk: Failed ERROR: TaskFailed event exception, aborting ERROR: Build of /var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb do_package_update_index_ipk failed ERROR: Task 14 (/var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb, do_package_update_index_ipk) failed with 256 ERROR: '/var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb' failed ERROR: '/var/dev/build/oe/120718-1044-0_igep0020-debug/openembedded/recipes/meta/package-index.bb' failed
Created attachment 641 [details] Patch to fix this bug
Comment on attachment 641 [details] Patch to fix this bug --- git/opkg.py 2012-07-19 14:45:22.634073887 +0200 +++ git/opkg.py-fix 2012-07-19 14:45:57.893073771 +0200 @@ -329,7 +329,7 @@ if not self.fn: try: cmd = "find %s -name %s | head -n 1" % (directory, self.filename) - rc = subprocess.check_output(cmd, shell=True) + rc = subprocess.call(cmd, shell=True) if rc != "": newfn = str(rc).split()[0] # sys.stderr.write("Package '%s' with empty fn and filename is '%s' was found in '%s', updating fn\n" % (self.package, self.filename, newfn))
Created attachment 642 [details] Patch to fix this bug
Created attachment 643 [details] My bitbake for opkg-utils_git.bb looks now like this
The attached patch isn't correct, it mixes up command output with the return code and would give different results. I've pushed a patch to opkg upstream which fixes this issue and then updated master to use the new version: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7f28f7514ae21c73ddb833baaf3d0da3fc2cb138
Verified in master branch 5343cdb20ee56a8b507733c637dcc2466ae13288