Unsing "inherit archive-original-source" in meta/classes/package_rpm.bbclass and SOURCE_ARCHIVE_PACKAGE_TYPE ?= 'srpm' SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= 'logs_with_scripts' in conf/local.conf causes do_package_write_rpm to fail One of the error messages is the following (for gnome-common-2.28.0): DEBUG: Executing python function sstate_task_prefunc DEBUG: Python function sstate_task_prefunc finished DEBUG: Executing python function do_archive_scripts_logs DEBUG: Python function do_archive_scripts_logs finished DEBUG: Executing python function do_package_write_rpm DEBUG: Executing python function read_subpackage_metadata DEBUG: Python function read_subpackage_metadata finished DEBUG: Executing python function do_package_rpm DEBUG: Executing python function write_specfile NOTE: Creating EMPTY RPM Package for gnome-common-dbg NOTE: Not creating empty RPM package for gnome-common-staticdev NOTE: Creating RPM package for gnome-common NOTE: Creating RPM package for gnome-common NOTE: Not creating empty RPM package for gnome-common-doc NOTE: Creating EMPTY RPM Package for gnome-common-dev NOTE: Not creating empty RPM package for gnome-common-locale DEBUG: Python function write_specfile finished DEBUG: SITE files ['endian-little', 'bit-32', 'common-linux', 'common-glibc', 'allarch-linux', 'common'] DEBUG: Executing shell function SBUILDSPEC DEBUG: Python function do_package_rpm finished DEBUG: Python function do_package_write_rpm finished ERROR: Function failed: SBUILDSPEC (see /home/lserban/work/poky/build/tmp/work/all-poky-linux/gnome-common-2.28.0-r1/temp/log.do_package_write_rpm.23403 for further information) /home/lserban/work/poky/build/tmp/work/all-poky-linux/gnome-common-2.28.0-r1/temp/run.SBUILDSPEC.23403: line 79: fakeroot: command not found
add following to conf/local.conf: INHERIT += "archive-original-source" SOURCE_ARCHIVE_PACKAGE_TYPE ?= 'srpm' SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= 'logs_with_scripts' when run "bitbake core-image-sato" ,no error happend during build process. git info: e0a70547069fe7e8a2d6bdaffc985fb172d46c31 git branch: poky/master test host is ubuntu 12.04 x86_64.
The usage for archiver.bblcass changed with the better method. Please review local.conf.sample.extended for the future usage. You can use the following method in conf/local.conf: ARCHIVER_MODE ?= "original" ARCHIVER_MODE[type] ?= "srpm" ARCHIVER_MODE[log_type] ?= "logs_with_scripts" ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE != 'none' else ''}" INHERIT += "${ARCHIVER_CLASS}" Or you can use liang li's method.
The improper usage cause this problem. So I marked this bug for invalid.
This bug is reproduce in 1.2.1. I am not opening a new one but I set the version to 1.2.1. The testing was done according to comment#1 from liang li
Created attachment 616 [details] failure logs
Created attachment 617 [details] logs for the test without the flags set
Created attachment 618 [details] cooker log
Using SOURCE_ARCHIVE_PACKAGE_TYPE ?= 'tar' SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= 'logs' there are no failures
Created attachment 699 [details] cooker log
Created attachment 700 [details] run.SBUILDSPEC
There are failures using ARCHIVER_MODE ?= "original" ARCHIVER_MODE[type] ?= "srpm" ARCHIVER_MODE[log_type] ?= "logs_with_scripts" ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if ARCHIVER_MODE != 'none' else ''}" INHERIT += "${ARCHIVER_CLASS}" Logs attached.
The fakeroot error is happened on 1.2.1, but there are other issues on 1.3, I think that it should be fixed on both 1.2.2 and 1.3, beside this, there are several other things needs to do: 1) The archiver.bbclass uses both tab and space as the indent, even mixes them in one function, this should be corrected. 2) The comment line is too long, should split them into small peaces which is under 72 or 80 characters. 3) Typo fixes. 4) Make it shorter and easier to use if possible.
It works for me with: INHERIT += "archive-original-source" SOURCE_ARCHIVE_PACKAGE_TYPE ?= 'srpm' SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= 'logs_with_scripts' on Ubuntu 12.04 git commit b4c5725af4cd85d5644f0373e2674e903c4eab2b It fails on Fedora though, but after installing fakeroot package from Fedora's repos it doesn't fail anymore. Docs don't mention fakeroot as recommended packages for Fedora or Ubuntu but it seems in Ubuntu fakeroot it's installed by default (or pulled with some other package)
(In reply to comment #13) > It works for me with: > > INHERIT += "archive-original-source" > > SOURCE_ARCHIVE_PACKAGE_TYPE ?= 'srpm' > SOURCE_ARCHIVE_LOG_WITH_SCRIPTS ?= 'logs_with_scripts' > > on Ubuntu 12.04 > git commit b4c5725af4cd85d5644f0373e2674e903c4eab2b > > It fails on Fedora though, but after installing fakeroot package from > Fedora's repos it doesn't fail anymore. Docs don't mention fakeroot as > recommended packages for Fedora or Ubuntu but it seems in Ubuntu fakeroot > it's installed by default (or pulled with some other package) yes, but it should not depend fakeroot, it has been fixed in the up-to-date master branch: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c96f6ee659cd4c20fd826f633e634ba0ef2f340b http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2ba95cc79e44bb2bf94d07b90cd305c3198fee68 http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=3883f82926adc973516a24f69f56f6c63eb66d37 http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=436211f0525dbeab4d701a59093b6597ca72400c http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4396677ade349c01c8cd0d42b12618723099fbf8 http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=44b8c1bb30883ebe71005b89b83ec7e43a957bad
Yup, verified in bb0aab79e488a99cb1b43f72f0e8ddbe39d97519