diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-02-25 17:31:50 -0600 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-03-01 11:46:46 +0000 |
commit | a0165d88a2ba96545793bbb7babeb7e43df4a46d (patch) | |
tree | fe2655543b394e394acecc9a47d4c0f33988c6e3 /meta/classes/package_rpm.bbclass | |
parent | fb508583a06f15454bb30ad05b347ebcb1ade852 (diff) | |
download | openembedded-core-a0165d88a2ba96545793bbb7babeb7e43df4a46d.tar.gz openembedded-core-a0165d88a2ba96545793bbb7babeb7e43df4a46d.tar.bz2 openembedded-core-a0165d88a2ba96545793bbb7babeb7e43df4a46d.tar.xz openembedded-core-a0165d88a2ba96545793bbb7babeb7e43df4a46d.zip |
rootfs_rpm: Fix rootfs generation using RPM packages
[BUG #756]
Fix bug #756. The rootfs contains a control file /etc/rpm/platform
that specifies the default system platform, as well as patterns for
compatible architectures. This file was not being setup properly due
to a misunderstanding of the format in a previous patch.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 7cbdae625..60127d2ef 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -155,7 +155,8 @@ resolve_package_rpm () { # install a bunch of packages using rpm # the following shell variables needs to be set before calling this func: # INSTALL_ROOTFS_RPM - install root dir -# INSTALL_PLATFORM_RPM - extra platform +# INSTALL_PLATFORM_RPM - main platform +# INSTALL_PLATFORM_EXTRA_RPM - extra platform # INSTALL_CONFBASE_RPM - configuration file base name # INSTALL_PACKAGES_NORMAL_RPM - packages to be installed # INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only @@ -166,7 +167,8 @@ resolve_package_rpm () { package_install_internal_rpm () { local target_rootfs="${INSTALL_ROOTFS_RPM}" - local platforms="${INSTALL_PLATFORM_RPM}" + local platform="${INSTALL_PLATFORM_RPM}" + local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}" local confbase="${INSTALL_CONFBASE_RPM}" local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" @@ -176,9 +178,10 @@ package_install_internal_rpm () { # Setup base system configuration mkdir -p ${target_rootfs}/etc/rpm/ - if [ ! -z "$platforms" ]; then - for pt in $platforms ; do - echo "$pt-unknown-linux" >> ${target_rootfs}/etc/rpm/platform + echo "${platform}-poky-linux-gnu" > ${target_rootfs}/etc/rpm/platform + if [ ! -z "$platform_extra" ]; then + for pt in $platform_extra ; do + echo "$pt-.*-linux.*" >> ${target_rootfs}/etc/rpm/platform done fi @@ -764,7 +767,7 @@ python do_package_rpm () { os.chmod(pkgwritedir, 0755) cmd = rpmbuild - cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd + cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" cmd = cmd + " --define '_use_internal_dependency_generator 0'" |