diff options
Diffstat (limited to 'meta/classes/populate_sdk_rpm.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_rpm.bbclass | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass index b5aa601f5d..d26867fa9a 100644 --- a/meta/classes/populate_sdk_rpm.bbclass +++ b/meta/classes/populate_sdk_rpm.bbclass | |||
@@ -1,10 +1,20 @@ | |||
1 | # Smart is python based, so be sure python-native is available to us. | ||
2 | EXTRANATIVEPATH += "python-native" | ||
3 | |||
1 | do_populate_sdk[depends] += "rpm-native:do_populate_sysroot" | 4 | do_populate_sdk[depends] += "rpm-native:do_populate_sysroot" |
2 | do_populate_sdk[depends] += "rpmresolve-native:do_populate_sysroot" | 5 | do_populate_sdk[depends] += "rpmresolve-native:do_populate_sysroot" |
6 | do_populate_sdk[depends] += "python-smartpm-native:do_populate_sysroot" | ||
7 | |||
8 | # Needed for update-alternatives | ||
9 | do_populate_sdk[depends] += "opkg-native:do_populate_sysroot" | ||
10 | |||
11 | # Creating the repo info in do_rootfs | ||
3 | do_populate_sdk[depends] += "createrepo-native:do_populate_sysroot" | 12 | do_populate_sdk[depends] += "createrepo-native:do_populate_sysroot" |
13 | |||
4 | do_populate_sdk[recrdeptask] += "do_package_write_rpm" | 14 | do_populate_sdk[recrdeptask] += "do_package_write_rpm" |
5 | 15 | ||
6 | rpmlibdir = "/var/lib/rpm" | 16 | rpmlibdir = "/var/lib/rpm" |
7 | RPMOPTS="--dbpath ${rpmlibdir} --define='_openall_before_chroot 1'" | 17 | RPMOPTS="--dbpath ${rpmlibdir}" |
8 | RPM="rpm ${RPMOPTS}" | 18 | RPM="rpm ${RPMOPTS}" |
9 | 19 | ||
10 | do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock" | 20 | do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock" |
@@ -16,28 +26,24 @@ populate_sdk_post_rpm () { | |||
16 | # remove lock files | 26 | # remove lock files |
17 | rm -f ${target_rootfs}/__db.* | 27 | rm -f ${target_rootfs}/__db.* |
18 | 28 | ||
19 | # Move manifests into the directory with the logs | ||
20 | mv ${target_rootfs}/install/*.manifest ${T}/ | ||
21 | |||
22 | # Remove all remaining resolver files | 29 | # Remove all remaining resolver files |
23 | rm -rf ${target_rootfs}/install | 30 | rm -rf ${target_rootfs}/install |
31 | rm -rf ${target_rootfs}/var/lib/smart | ||
24 | } | 32 | } |
25 | 33 | ||
26 | populate_sdk_rpm () { | 34 | populate_sdk_rpm () { |
27 | 35 | ||
28 | package_update_index_rpm | 36 | package_update_index_rpm |
29 | package_generate_rpm_conf | ||
30 | 37 | ||
31 | ## install target ## | 38 | ## install target ## |
32 | # This needs to work in the same way as rootfs_rpm.bbclass! | 39 | # This needs to work in the same way as rootfs_rpm.bbclass! |
33 | # | 40 | # |
34 | export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}" | 41 | export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}" |
35 | export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" | 42 | export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" |
36 | export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" | ||
37 | export INSTALL_PACKAGES_RPM="${TOOLCHAIN_TARGET_TASK}" | 43 | export INSTALL_PACKAGES_RPM="${TOOLCHAIN_TARGET_TASK}" |
38 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_TASK_ATTEMPTONLY}" | 44 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_TASK_ATTEMPTONLY}" |
39 | export INSTALL_PACKAGES_LINGUAS_RPM="" | 45 | export INSTALL_PACKAGES_LINGUAS_RPM="" |
40 | export INSTALL_PROVIDENAME_RPM="/bin/sh /bin/bash /usr/bin/env /usr/bin/perl pkgconfig pkgconfig(pkg-config)" | 46 | export INSTALL_PROVIDENAME_RPM="" |
41 | export INSTALL_TASK_RPM="populate_sdk-target" | 47 | export INSTALL_TASK_RPM="populate_sdk-target" |
42 | export INSTALL_COMPLEMENTARY_RPM="" | 48 | export INSTALL_COMPLEMENTARY_RPM="" |
43 | export INTERCEPT_DIR=${WORKDIR}/intercept_scripts | 49 | export INTERCEPT_DIR=${WORKDIR}/intercept_scripts |
@@ -45,31 +51,6 @@ populate_sdk_rpm () { | |||
45 | 51 | ||
46 | # Setup base system configuration | 52 | # Setup base system configuration |
47 | mkdir -p ${INSTALL_ROOTFS_RPM}/etc/rpm/ | 53 | mkdir -p ${INSTALL_ROOTFS_RPM}/etc/rpm/ |
48 | mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir} | ||
49 | mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir}/log | ||
50 | cat > ${INSTALL_ROOTFS_RPM}${rpmlibdir}/DB_CONFIG << EOF | ||
51 | # ================ Environment | ||
52 | set_data_dir . | ||
53 | set_create_dir . | ||
54 | set_lg_dir ./log | ||
55 | set_tmp_dir ./tmp | ||
56 | |||
57 | # -- thread_count must be >= 8 | ||
58 | set_thread_count 64 | ||
59 | |||
60 | # ================ Logging | ||
61 | |||
62 | # ================ Memory Pool | ||
63 | set_mp_mmapsize 268435456 | ||
64 | |||
65 | # ================ Locking | ||
66 | set_lk_max_locks 16384 | ||
67 | set_lk_max_lockers 16384 | ||
68 | set_lk_max_objects 16384 | ||
69 | mutex_set_max 163840 | ||
70 | |||
71 | # ================ Replication | ||
72 | EOF | ||
73 | 54 | ||
74 | # List must be prefered to least preferred order | 55 | # List must be prefered to least preferred order |
75 | INSTALL_PLATFORM_EXTRA_RPM="" | 56 | INSTALL_PLATFORM_EXTRA_RPM="" |
@@ -86,7 +67,6 @@ EOF | |||
86 | echo "Installing NATIVESDK packages" | 67 | echo "Installing NATIVESDK packages" |
87 | export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}" | 68 | export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}" |
88 | export INSTALL_PLATFORM_RPM="${SDK_ARCH}" | 69 | export INSTALL_PLATFORM_RPM="${SDK_ARCH}" |
89 | export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}" | ||
90 | export INSTALL_PACKAGES_RPM="${TOOLCHAIN_HOST_TASK}" | 70 | export INSTALL_PACKAGES_RPM="${TOOLCHAIN_HOST_TASK}" |
91 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_HOST_ATTEMPTONLY}" | 71 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_HOST_ATTEMPTONLY}" |
92 | export INSTALL_PACKAGES_LINGUAS_RPM="" | 72 | export INSTALL_PACKAGES_LINGUAS_RPM="" |
@@ -114,11 +94,6 @@ EOF | |||
114 | rm -rf ${SDK_OUTPUT}/etc | 94 | rm -rf ${SDK_OUTPUT}/etc |
115 | 95 | ||
116 | populate_sdk_log_check populate_sdk | 96 | populate_sdk_log_check populate_sdk |
117 | |||
118 | # Workaround so the parser knows we need the resolve_package function! | ||
119 | if false ; then | ||
120 | resolve_package_rpm foo ${RPMCONF_TARGET_BASE}.conf || true | ||
121 | fi | ||
122 | } | 97 | } |
123 | 98 | ||
124 | python () { | 99 | python () { |