summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_rpm.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
new file mode 100644
index 0000000..4b02247
--- /dev/null
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -0,0 +1,42 @@
1#
2# Creates a root filesystem out of rpm packages
3#
4
5ROOTFS_PKGMANAGE = "rpm smartpm"
6ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
7
8# Add 50Meg of extra space for Smart
9IMAGE_ROOTFS_EXTRA_SPACE_append = "${@base_contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}"
10
11# Smart is python based, so be sure python-native is available to us.
12EXTRANATIVEPATH += "python-native"
13
14do_rootfs[depends] += "rpm-native:do_populate_sysroot"
15do_rootfs[depends] += "rpmresolve-native:do_populate_sysroot"
16do_rootfs[depends] += "python-smartpm-native:do_populate_sysroot"
17
18# Needed for update-alternatives
19do_rootfs[depends] += "opkg-native:do_populate_sysroot"
20
21# Creating the repo info in do_rootfs
22do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
23
24do_rootfs[recrdeptask] += "do_package_write_rpm"
25rootfs_rpm_do_rootfs[vardepsexclude] += "BUILDNAME"
26do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
27
28# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files
29# in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently
30do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
31
32python () {
33 if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
34 flags = d.getVarFlag('do_rootfs', 'recrdeptask')
35 flags = flags.replace("do_package_write_rpm", "")
36 flags = flags.replace("do_deploy", "")
37 flags = flags.replace("do_populate_sysroot", "")
38 d.setVarFlag('do_rootfs', 'recrdeptask', flags)
39 d.setVar('RPM_PREPROCESS_COMMANDS', '')
40 d.setVar('RPM_POSTPROCESS_COMMANDS', '')
41
42}