summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_ipk.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-06 11:38:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-07 17:13:12 +0000
commit25bc944d30dedd9ac94a7398f6ae378f8460a35d (patch)
tree77d38f98d2a2c17afd006e5c1feabb8ac55c0a57 /meta/classes/rootfs_ipk.bbclass
parent0e486c71121dafe7a8d67f0e1d9734c0c2db7eb6 (diff)
downloadpoky-25bc944d30dedd9ac94a7398f6ae378f8460a35d.tar.gz
rootfs_ipk/package_ipk: Simplify opkg commandline option variables
The current maze of IPKG_ARGS variables is hard to understand and worse, not even used in some places. This simplifies the code and specifies the options in one place. (From OE-Core rev: 5e482b278c3775b0acecc621cf2d3b90ee516f26) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r--meta/classes/rootfs_ipk.bbclass25
1 files changed, 11 insertions, 14 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 8766d24181..02b1d5743c 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -14,10 +14,6 @@ do_rootfs[recrdeptask] += "do_package_write_ipk"
14 14
15do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock" 15do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
16 16
17IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force_postinstall --prefer-arch-to-version"
18# The _POST version also works when constructing the matching SDK
19IPKG_ARGS_POST = "-f ${IPKGCONF_TARGET} -o $INSTALL_ROOTFS_IPK --force_postinstall --prefer-arch-to-version"
20
21OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf" 17OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf"
22 18
23OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; " 19OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; "
@@ -38,14 +34,16 @@ fakeroot rootfs_ipk_do_rootfs () {
38 34
39 mkdir -p ${T}/ 35 mkdir -p ${T}/
40 36
37 export INSTALL_CONF_IPK="${IPKGCONF_TARGET}"
38 export INSTALL_ROOTFS_IPK="${IMAGE_ROOTFS}"
41 STATUS=${IMAGE_ROOTFS}${opkglibdir}/status 39 STATUS=${IMAGE_ROOTFS}${opkglibdir}/status
42 mkdir -p ${IMAGE_ROOTFS}${opkglibdir} 40 mkdir -p ${IMAGE_ROOTFS}${opkglibdir}
43 41
44 opkg-cl ${IPKG_ARGS} update 42 opkg-cl ${OPKG_ARGS} update
45 43
46 # prime the status file with bits that we don't want 44 # prime the status file with bits that we don't want
47 for i in ${BAD_RECOMMENDATIONS}; do 45 for i in ${BAD_RECOMMENDATIONS}; do
48 pkginfo="`opkg-cl ${IPKG_ARGS} info $i`" 46 pkginfo="`opkg-cl ${OPKG_ARGS} info $i`"
49 if [ ! -z "$pkginfo" ]; then 47 if [ ! -z "$pkginfo" ]; then
50 echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS 48 echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS
51 echo "Status: deinstall hold not-installed" >> $STATUS 49 echo "Status: deinstall hold not-installed" >> $STATUS
@@ -60,8 +58,7 @@ fakeroot rootfs_ipk_do_rootfs () {
60 export INSTALL_PACKAGES_LINGUAS_IPK="${LINGUAS_INSTALL}" 58 export INSTALL_PACKAGES_LINGUAS_IPK="${LINGUAS_INSTALL}"
61 export INSTALL_TASK_IPK="rootfs" 59 export INSTALL_TASK_IPK="rootfs"
62 60
63 export INSTALL_ROOTFS_IPK="${IMAGE_ROOTFS}" 61
64 export INSTALL_CONF_IPK="${IPKGCONF_TARGET}"
65 export INSTALL_PACKAGES_IPK="${PACKAGE_INSTALL}" 62 export INSTALL_PACKAGES_IPK="${PACKAGE_INSTALL}"
66 63
67 #post install 64 #post install
@@ -104,7 +101,7 @@ fakeroot rootfs_ipk_do_rootfs () {
104 if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then 101 if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then
105 remove_run_postinsts=true 102 remove_run_postinsts=true
106 fi 103 fi
107 opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} || true 104 opkg-cl ${OPKG_ARGS} --force-depends remove update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} || true
108 105
109 # Need to remove rc.d files for run-postinsts by hand since opkg won't 106 # Need to remove rc.d files for run-postinsts by hand since opkg won't
110 # call postrm scripts in offline root mode. 107 # call postrm scripts in offline root mode.
@@ -142,9 +139,9 @@ remove_packaging_data_files() {
142 139
143list_installed_packages() { 140list_installed_packages() {
144 if [ "$1" = "arch" ] ; then 141 if [ "$1" = "arch" ] ; then
145 opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py -a 142 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -a
146 elif [ "$1" = "file" ] ; then 143 elif [ "$1" = "file" ] ; then
147 opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py -f | while read pkg pkgfile 144 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -f | while read pkg pkgfile
148 do 145 do
149 fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true` 146 fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true`
150 if [ "$fullpath" = "" ] ; then 147 if [ "$fullpath" = "" ] ; then
@@ -154,16 +151,16 @@ list_installed_packages() {
154 fi 151 fi
155 done 152 done
156 else 153 else
157 opkg-cl ${IPKG_ARGS_POST} list_installed | awk '{ print $1 }' 154 opkg-cl ${OPKG_ARGS} list_installed | awk '{ print $1 }'
158 fi 155 fi
159} 156}
160 157
161rootfs_list_installed_depends() { 158rootfs_list_installed_depends() {
162 opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py 159 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py
163} 160}
164 161
165rootfs_install_packages() { 162rootfs_install_packages() {
166 opkg-cl ${IPKG_ARGS_POST} install `cat $1` 163 opkg-cl ${OPKG_ARGS} install `cat $1`
167} 164}
168 165
169ipk_insert_feed_uris () { 166ipk_insert_feed_uris () {