diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2012-03-23 23:30:49 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-26 23:29:45 +0100 |
commit | c5d91b1170ea7d2438760c7751e39404cd530660 (patch) | |
tree | 56bc5701ac00b5bfa53561a517079dd0d04b1b45 /meta/classes/rootfs_ipk.bbclass | |
parent | 46f4df3052b9403730900da680c9e62c0c757a28 (diff) | |
download | poky-c5d91b1170ea7d2438760c7751e39404cd530660.tar.gz |
rootfs_ipk: replace 3 opkg-cl calls with one in get_package_filename
* || true is needed for cases where grep doesn't find anything
* and quotes around info are needed to keep line breaks
(From OE-Core rev: 9a8199e4a0f46ed3e9582143b206144aee28b709)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 2df8ca49e2..13bd4bff23 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
@@ -127,9 +127,10 @@ list_installed_packages() { | |||
127 | } | 127 | } |
128 | 128 | ||
129 | get_package_filename() { | 129 | get_package_filename() { |
130 | name=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk '/^Package/ {printf $2"_"}'` | 130 | info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true` |
131 | name=$name`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'` | 131 | name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'` |
132 | name=$name`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk '/^Archi/ {print $2".ipk"}'` | 132 | name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'` |
133 | name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'` | ||
133 | 134 | ||
134 | fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true` | 135 | fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true` |
135 | if [ "$fullname" = "" ] ; then | 136 | if [ "$fullname" = "" ] ; then |