diff options
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 0bfa49194d..c9edec2b52 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
@@ -18,6 +18,8 @@ OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf | |||
18 | 18 | ||
19 | OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris" | 19 | OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris" |
20 | 20 | ||
21 | opkglibdir = "${localstatedir}/lib/opkg" | ||
22 | |||
21 | fakeroot rootfs_ipk_do_rootfs () { | 23 | fakeroot rootfs_ipk_do_rootfs () { |
22 | set -x | 24 | set -x |
23 | 25 | ||
@@ -27,7 +29,7 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
27 | ${OPKG_PREPROCESS_COMMANDS} | 29 | ${OPKG_PREPROCESS_COMMANDS} |
28 | 30 | ||
29 | mkdir -p ${T}/ | 31 | mkdir -p ${T}/ |
30 | mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg/ | 32 | mkdir -p ${IMAGE_ROOTFS}${opkglibdir} |
31 | 33 | ||
32 | opkg-cl ${IPKG_ARGS} update | 34 | opkg-cl ${IPKG_ARGS} update |
33 | 35 | ||
@@ -59,12 +61,12 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
59 | ${OPKG_POSTPROCESS_COMMANDS} | 61 | ${OPKG_POSTPROCESS_COMMANDS} |
60 | ${ROOTFS_POSTINSTALL_COMMAND} | 62 | ${ROOTFS_POSTINSTALL_COMMAND} |
61 | 63 | ||
62 | for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do | 64 | for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do |
63 | if [ -f $i ] && ! sh $i; then | 65 | if [ -f $i ] && ! sh $i; then |
64 | opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst` | 66 | opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst` |
65 | fi | 67 | fi |
66 | done | 68 | done |
67 | for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do | 69 | for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do |
68 | if [ -f $i ] && ! sh $i configure; then | 70 | if [ -f $i ] && ! sh $i configure; then |
69 | opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst` | 71 | opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst` |
70 | fi | 72 | fi |
@@ -75,7 +77,7 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
75 | 77 | ||
76 | ${ROOTFS_POSTPROCESS_COMMAND} | 78 | ${ROOTFS_POSTPROCESS_COMMAND} |
77 | 79 | ||
78 | rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/* | 80 | rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/* |
79 | 81 | ||
80 | log_check rootfs | 82 | log_check rootfs |
81 | } | 83 | } |
@@ -102,7 +104,7 @@ rootfs_ipk_log_check() { | |||
102 | 104 | ||
103 | rootfs_ipk_write_manifest() { | 105 | rootfs_ipk_write_manifest() { |
104 | manifest=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest | 106 | manifest=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest |
105 | cp ${IMAGE_ROOTFS}/usr/lib/opkg/status $manifest | 107 | cp ${IMAGE_ROOTFS}${opkglibdir}/status $manifest |
106 | 108 | ||
107 | sed '/Depends/d' -i $manifest | 109 | sed '/Depends/d' -i $manifest |
108 | sed '/Status/d' -i $manifest | 110 | sed '/Status/d' -i $manifest |
@@ -115,16 +117,16 @@ rootfs_ipk_write_manifest() { | |||
115 | } | 117 | } |
116 | 118 | ||
117 | remove_packaging_data_files() { | 119 | remove_packaging_data_files() { |
118 | rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/ | 120 | rm -rf ${IMAGE_ROOTFS}${opkglibdir} |
119 | # We need the directory for the package manager lock | 121 | # We need the directory for the package manager lock |
120 | mkdir ${IMAGE_ROOTFS}/usr/lib/opkg | 122 | mkdir ${IMAGE_ROOTFS}${opkglibdir} |
121 | } | 123 | } |
122 | 124 | ||
123 | install_all_locales() { | 125 | install_all_locales() { |
124 | 126 | ||
125 | PACKAGES_TO_INSTALL="" | 127 | PACKAGES_TO_INSTALL="" |
126 | 128 | ||
127 | INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` | 129 | INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${opkglibdir}/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` |
128 | 130 | ||
129 | for pkg in $INSTALLED_PACKAGES | 131 | for pkg in $INSTALLED_PACKAGES |
130 | do | 132 | do |