summaryrefslogtreecommitdiff
path: root/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-08-22 15:34:34 +0800
committerSaul Wold <sgw@linux.intel.com>2012-08-28 08:03:40 -0700
commitac152f277fdff256def01af4268215a05685a0f7 (patch)
treebb26f96b5321ca8ea04599f6a3aef6c424d2b8b7 /meta/classes/archiver.bbclass
parent885a95992abe11ebef7a8e4363e6002ee80403bf (diff)
downloadopenembedded-core-ac152f277fdff256def01af4268215a05685a0f7.tar.gz
openembedded-core-ac152f277fdff256def01af4268215a05685a0f7.tar.bz2
openembedded-core-ac152f277fdff256def01af4268215a05685a0f7.zip
archiver.bbclass: fix the fakeroot and other issues
* Fix the fakeroot issue The archiver.bbclass is used for archiving sources, patches, and logs, it uses the "rpmbuild -bs" from the package_rpm.bbclass to generate the .src.rpm, but it didn't work (it's not easy to explain it clearly): Reason: - It directly used the "fakeroot" command, we don't have such a command in native tools, so it would use the fakeroot from the host, and it would fail when there is no fakeroot on the host. - The "rpmbuild -bs" doesn't need to work under root, but it is in the function do_package_write_rpm which is running under fakeroot, and "rpmbuild" needs to know the source file's user/group name, the source file is the tarball which is created by the postfuncs of do_unpack or do_patch which doesn't use the fakeroot, so the created file's owner would be the real user, e.g.: robert, but there is no such a user under our native tools' fakeroot(pseudo), then the rpmbuild would fail. It worked when use the host's fakeroot in the past was because that the host's fakeroot knows the users on the host. Fix: - Remove the incorrect "fakeroot". - Change the source file's owner to root.root under fakeroot will fix the problem. * Other fixes: - The typo: "do_remove_taball -> do_remove_tarball" which will cause the tarball is not removed. - Add the _sourcedir defination to the rpmbuild command since the the SOURCES would be added to the specfile when archiver.bbclass is inherited, otherwise there would be errors when "rpmbuild -bb", though the build is OK. It only added the defination to "rpmbuild -bs", didn't add to "rpmbuild -bb". [YOCTO #2619] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/archiver.bbclass')
-rw-r--r--meta/classes/archiver.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index b01b0784cd..7056714bd7 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -573,7 +573,7 @@ python do_remove_tarball(){
except (TypeError, OSError):
pass
}
-do_remove_taball[deptask] = "do_archive_scripts_logs"
+do_remove_tarball[deptask] = "do_archive_scripts_logs"
do_package_write_rpm[postfuncs] += "do_remove_tarball "
export get_licenses
export get_package