summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package_ipk.bbclass7
-rw-r--r--meta/classes/rootfs_ipk.bbclass25
2 files changed, 15 insertions, 17 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index f916cf5b90..b441e86c0a 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -10,6 +10,8 @@ PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
10# Program to be used to build opkg packages 10# Program to be used to build opkg packages
11OPKGBUILDCMD ??= "opkg-build" 11OPKGBUILDCMD ??= "opkg-build"
12 12
13OPKG_ARGS = "-f $INSTALL_CONF_IPK -o $INSTALL_ROOTFS_IPK --force_postinstall --prefer-arch-to-version"
14
13python package_ipk_fn () { 15python package_ipk_fn () {
14 d.setVar('PKGFN', d.getVar('PKG')) 16 d.setVar('PKGFN', d.getVar('PKG'))
15} 17}
@@ -71,7 +73,7 @@ package_tryout_install_multilib_ipk() {
71 multilib_tryout_dirs="" 73 multilib_tryout_dirs=""
72 for item in ${MULTILIB_VARIANTS}; do 74 for item in ${MULTILIB_VARIANTS}; do
73 local target_rootfs="${MULTILIB_TEMP_ROOTFS}/${item}" 75 local target_rootfs="${MULTILIB_TEMP_ROOTFS}/${item}"
74 local ipkg_args="-f ${INSTALL_CONF_IPK} -o ${target_rootfs} --force_overwrite" 76 local ipkg_args="${OPKG_ARGS}"
75 local selected_pkg="" 77 local selected_pkg=""
76 local pkgname_prefix="${item}-" 78 local pkgname_prefix="${item}-"
77 local pkgname_len=${#pkgname_prefix} 79 local pkgname_len=${#pkgname_prefix}
@@ -127,7 +129,6 @@ split_multilib_packages() {
127package_install_internal_ipk() { 129package_install_internal_ipk() {
128 130
129 local target_rootfs="${INSTALL_ROOTFS_IPK}" 131 local target_rootfs="${INSTALL_ROOTFS_IPK}"
130 local conffile="${INSTALL_CONF_IPK}"
131 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_IPK}" 132 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_IPK}"
132 local package_linguas="${INSTALL_PACKAGES_LINGUAS_IPK}" 133 local package_linguas="${INSTALL_PACKAGES_LINGUAS_IPK}"
133 local task="${INSTALL_TASK_IPK}" 134 local task="${INSTALL_TASK_IPK}"
@@ -139,7 +140,7 @@ package_install_internal_ipk() {
139 140
140 mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/ 141 mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/
141 142
142 local ipkg_args="-f ${conffile} -o ${target_rootfs} --force_postinstall --prefer-arch-to-version" 143 local ipkg_args="${OPKG_ARGS}"
143 144
144 opkg-cl ${ipkg_args} update 145 opkg-cl ${ipkg_args} update
145 146
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 () {