summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-02-25 17:31:50 -0600
committerMark Hatle <mark.hatle@windriver.com>2011-02-25 17:31:50 -0600
commit08c8f7bb7375a6f51c12ee5e7808e38e914d5413 (patch)
tree58a72471bf8193d50d1fa7f0789fad60308ba60e /meta/classes/package_rpm.bbclass
parenta157aab8f620459bda3f99ea1bc13d2453de8982 (diff)
downloadpoky-08c8f7bb7375a6f51c12ee5e7808e38e914d5413.tar.gz
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.bbclass15
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7cbdae6256..60127d2ef4 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -155,7 +155,8 @@ resolve_package_rpm () {
155# install a bunch of packages using rpm 155# install a bunch of packages using rpm
156# the following shell variables needs to be set before calling this func: 156# the following shell variables needs to be set before calling this func:
157# INSTALL_ROOTFS_RPM - install root dir 157# INSTALL_ROOTFS_RPM - install root dir
158# INSTALL_PLATFORM_RPM - extra platform 158# INSTALL_PLATFORM_RPM - main platform
159# INSTALL_PLATFORM_EXTRA_RPM - extra platform
159# INSTALL_CONFBASE_RPM - configuration file base name 160# INSTALL_CONFBASE_RPM - configuration file base name
160# INSTALL_PACKAGES_NORMAL_RPM - packages to be installed 161# INSTALL_PACKAGES_NORMAL_RPM - packages to be installed
161# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only 162# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only
@@ -166,7 +167,8 @@ resolve_package_rpm () {
166package_install_internal_rpm () { 167package_install_internal_rpm () {
167 168
168 local target_rootfs="${INSTALL_ROOTFS_RPM}" 169 local target_rootfs="${INSTALL_ROOTFS_RPM}"
169 local platforms="${INSTALL_PLATFORM_RPM}" 170 local platform="${INSTALL_PLATFORM_RPM}"
171 local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
170 local confbase="${INSTALL_CONFBASE_RPM}" 172 local confbase="${INSTALL_CONFBASE_RPM}"
171 local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" 173 local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}"
172 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" 174 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
@@ -176,9 +178,10 @@ package_install_internal_rpm () {
176 178
177 # Setup base system configuration 179 # Setup base system configuration
178 mkdir -p ${target_rootfs}/etc/rpm/ 180 mkdir -p ${target_rootfs}/etc/rpm/
179 if [ ! -z "$platforms" ]; then 181 echo "${platform}-poky-linux-gnu" > ${target_rootfs}/etc/rpm/platform
180 for pt in $platforms ; do 182 if [ ! -z "$platform_extra" ]; then
181 echo "$pt-unknown-linux" >> ${target_rootfs}/etc/rpm/platform 183 for pt in $platform_extra ; do
184 echo "$pt-.*-linux.*" >> ${target_rootfs}/etc/rpm/platform
182 done 185 done
183 fi 186 fi
184 187
@@ -764,7 +767,7 @@ python do_package_rpm () {
764 os.chmod(pkgwritedir, 0755) 767 os.chmod(pkgwritedir, 0755)
765 768
766 cmd = rpmbuild 769 cmd = rpmbuild
767 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd 770 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd
768 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" 771 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
769 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" 772 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
770 cmd = cmd + " --define '_use_internal_dependency_generator 0'" 773 cmd = cmd + " --define '_use_internal_dependency_generator 0'"