diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-05 15:08:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-14 08:41:01 +0000 |
commit | 9f03969994797220663280ef13fcb187446335ee (patch) | |
tree | d1baa9a8e0c30c86de653f70ec566c253e7af63f /meta/classes | |
parent | 675aa5f57a83f1e5712139e90d57d4946d78b6db (diff) | |
download | poky-9f03969994797220663280ef13fcb187446335ee.tar.gz |
oe-pkgdata-util: improve command-line usage
* Use argparse instead of optparse for standardised help output, options
and a much cleaner code structure
* Look up pkgdata directory automatically so the user doesn't have to
specify it
* Use standard logging
NOTE: this does mean a slight change in syntax - if you do want to
specify the pkgdata directory (usually only necessary if you're calling
it from within the build process) you need to use the parameter -p (or
--pkgdata-dir) and specify this before the command, not after it.
Examples:
oe-pkgdata-util find-path /sbin/mke2fs
oe-pkgdata-util lookup-recipe libelf1
oe-pkgdata-util read-value PKGSIZE libc6
oe-pkgdata-util -p /home/user/oe/build/tmp/sysroots/qemux86-64/pkgdata read-value PKGSIZE libc6
(From OE-Core rev: 04dc571ac7c26f0dcf1a1fcd466482e22519998d)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/license.bbclass | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 90cfe4f954..211dcf18b5 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -374,7 +374,7 @@ buildhistory_get_installed() { | |||
374 | printf "" > $1/installed-package-sizes.tmp | 374 | printf "" > $1/installed-package-sizes.tmp |
375 | cat $pkgcache | while read pkg pkgfile pkgarch | 375 | cat $pkgcache | while read pkg pkgfile pkgarch |
376 | do | 376 | do |
377 | size=`oe-pkgdata-util read-value ${PKGDATA_DIR} "PKGSIZE" ${pkg}_${pkgarch}` | 377 | size=`oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PKGSIZE" ${pkg}_${pkgarch}` |
378 | if [ "$size" != "" ] ; then | 378 | if [ "$size" != "" ] ; then |
379 | echo "$size $pkg" >> $1/installed-package-sizes.tmp | 379 | echo "$size $pkg" >> $1/installed-package-sizes.tmp |
380 | fi | 380 | fi |
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 21465d8d00..13c1a0fddf 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -80,7 +80,7 @@ license_create_manifest() { | |||
80 | if [ "${COPY_LIC_DIRS}" = "1" ]; then | 80 | if [ "${COPY_LIC_DIRS}" = "1" ]; then |
81 | for pkg in ${INSTALLED_PKGS}; do | 81 | for pkg in ${INSTALLED_PKGS}; do |
82 | mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg} | 82 | mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg} |
83 | pkged_pn="$(oe-pkgdata-util lookup-recipe ${PKGDATA_DIR} ${pkg})" | 83 | pkged_pn="$(oe-pkgdata-util -p ${PKGDATA_DIR} lookup-recipe ${pkg})" |
84 | for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do | 84 | for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do |
85 | # Really don't need to copy the generics as they're | 85 | # Really don't need to copy the generics as they're |
86 | # represented in the manifest and in the actual pkg licenses | 86 | # represented in the manifest and in the actual pkg licenses |