diff options
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 9732385613..7df97a014b 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
@@ -15,10 +15,12 @@ do_rootfs[recrdeptask] += "do_package_write_ipk" | |||
15 | do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock" | 15 | do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock" |
16 | 16 | ||
17 | IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite" | 17 | IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite" |
18 | # The _POST version also works when constructing the matching SDK | ||
19 | IPKG_ARGS_POST = "-f ${IPKGCONF_TARGET} -o $INSTALL_ROOTFS_IPK --force-overwrite" | ||
18 | 20 | ||
19 | OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf" | 21 | OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf" |
20 | 22 | ||
21 | OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; rootfs_install_all_locales; " | 23 | OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; " |
22 | 24 | ||
23 | opkglibdir = "${localstatedir}/lib/opkg" | 25 | opkglibdir = "${localstatedir}/lib/opkg" |
24 | 26 | ||
@@ -74,6 +76,8 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
74 | #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/ | 76 | #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/ |
75 | #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf | 77 | #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf |
76 | 78 | ||
79 | rootfs_install_complementary | ||
80 | |||
77 | ${OPKG_POSTPROCESS_COMMANDS} | 81 | ${OPKG_POSTPROCESS_COMMANDS} |
78 | ${ROOTFS_POSTINSTALL_COMMAND} | 82 | ${ROOTFS_POSTINSTALL_COMMAND} |
79 | 83 | ||
@@ -125,12 +129,16 @@ remove_packaging_data_files() { | |||
125 | } | 129 | } |
126 | 130 | ||
127 | list_installed_packages() { | 131 | list_installed_packages() { |
128 | grep ^Package: ${IMAGE_ROOTFS}${opkglibdir}/status | sed "s/^Package: //" | 132 | if [ "$1" = "arch" ] ; then |
133 | opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py -a | ||
134 | else | ||
135 | opkg-cl ${IPKG_ARGS_POST} list_installed | awk '{ print $1 }' | ||
136 | fi | ||
129 | } | 137 | } |
130 | 138 | ||
131 | get_package_filename() { | 139 | get_package_filename() { |
132 | set +x | 140 | set +x |
133 | info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true` | 141 | info=`opkg-cl ${IPKG_ARGS_POST} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true` |
134 | name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'` | 142 | name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'` |
135 | name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'` | 143 | name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'` |
136 | name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'` | 144 | name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'` |
@@ -145,21 +153,15 @@ get_package_filename() { | |||
145 | } | 153 | } |
146 | 154 | ||
147 | list_package_depends() { | 155 | list_package_depends() { |
148 | opkg-cl ${IPKG_ARGS} info $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g' | 156 | opkg-cl ${IPKG_ARGS_POST} info $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g' |
149 | } | 157 | } |
150 | 158 | ||
151 | list_package_recommends() { | 159 | list_package_recommends() { |
152 | opkg-cl ${IPKG_ARGS} info $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g' | 160 | opkg-cl ${IPKG_ARGS_POST} info $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g' |
153 | } | ||
154 | |||
155 | rootfs_check_package_exists() { | ||
156 | if [ `opkg-cl ${IPKG_ARGS} info $1 | wc -l` -gt 2 ]; then | ||
157 | echo $1 | ||
158 | fi | ||
159 | } | 161 | } |
160 | 162 | ||
161 | rootfs_install_packages() { | 163 | rootfs_install_packages() { |
162 | opkg-cl ${IPKG_ARGS} install $PACKAGES_TO_INSTALL | 164 | opkg-cl ${IPKG_ARGS_POST} install `cat $1` |
163 | } | 165 | } |
164 | 166 | ||
165 | ipk_insert_feed_uris () { | 167 | ipk_insert_feed_uris () { |