stage-manager: Use opkg utilities
authorKhem Raj <raj.khem@gmail.com>
Tue, 25 Jan 2011 00:52:02 +0000 (16:52 -0800)
committerKhem Raj <raj.khem@gmail.com>
Wed, 26 Jan 2011 00:45:30 +0000 (16:45 -0800)
* Rename stage-manager-ipkg -> stage-manager-opkg
* Rename stage-manager-ipkg-build -> stage-manager-opkg-build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Graham Gower <graham.gower@gmail.com>
recipes/stage-manager/files/stage-manager-opkg [moved from recipes/stage-manager/files/stage-manager-ipkg with 99% similarity]
recipes/stage-manager/files/stage-manager-opkg-build [moved from recipes/stage-manager/files/stage-manager-ipkg-build with 94% similarity]
recipes/stage-manager/stagemanager-native_0.0.1.bb

similarity index 99%
rename from recipes/stage-manager/files/stage-manager-ipkg
rename to recipes/stage-manager/files/stage-manager-opkg
index 105ea54..5a2347a 100755 (executable)
@@ -1015,7 +1015,7 @@ ipkg_upgrade_pkg() {
 
                        if [ "$avail_ver" = "$inst_ver" ]; then 
                                echo "Package $pkg ($inst_ver) installed in $dest_name is up to date"
-                       elif ipkg-compare-versions $avail_ver '>>' $inst_ver; then
+                       elif opkg-compare-versions $avail_ver '>>' $inst_ver; then
                                echo "Upgrading $pkg ($dest_name) from $inst_ver to $avail_ver"
                                ipkg_get_install_dest $dest $pkg
                        else
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# ipkg-build -- construct a .ipk from a directory
+# opkg-build -- construct a .ipk from a directory
 # Carl Worth <cworth@east.isi.edu>
 # based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001
 # 2003-04-25 rea@sr.unh.edu
@@ -11,14 +11,14 @@ set -e
 
 version=1.0
 
-ipkg_extract_value() {
+opkg_extract_value() {
        sed -e "s/^[^:]*:[[:space:]]*//"
 }
 
 required_field() {
        field=$1
 
-       value=`grep "^$field:" < $CONTROL/control | ipkg_extract_value`
+       value=`grep "^$field:" < $CONTROL/control | opkg_extract_value`
        if [ -z "$value" ]; then
                echo "*** Error: $CONTROL/control is missing field $field" >&2
                return 1
@@ -30,7 +30,7 @@ required_field() {
 disallowed_field() {
        field=$1
 
-       value=`grep "^$field:" < $CONTROL/control | ipkg_extract_value`
+       value=`grep "^$field:" < $CONTROL/control | opkg_extract_value`
        if [ -n "$value" ]; then
                echo "*** Error: $CONTROL/control contains disallowed field $field" >&2
                return 1
@@ -128,7 +128,7 @@ You probably want to chown these to a system user: " >&2
                bad_fields=`echo $bad_fields`
                echo "*** Error: The following fields in $CONTROL/control are missing a ':'" >&2
                echo "  $bad_fields" >&2
-               echo "ipkg-build: This may be due to a missing initial space for a multi-line field value" >&2
+               echo "opkg-build: This may be due to a missing initial space for a multi-line field value" >&2
                PKG_ERROR=1
        fi
 
@@ -153,7 +153,7 @@ You probably want to chown these to a system user: " >&2
 }
 
 ###
-# ipkg-build "main"
+# opkg-build "main"
 ###
 ogargs=""
 outer=ar
@@ -218,7 +218,7 @@ fi
 
 if ! pkg_appears_sane $pkg_dir; then
        echo >&2
-       echo "ipkg-build: Please fix the above errors and try again." >&2
+       echo "opkg-build: Please fix the above errors and try again." >&2
        exit 1
 fi
 
index 9577749..8ad73ef 100644 (file)
@@ -2,8 +2,8 @@ DESCRIPTION = "Helper script for packaged-staging.bbclass"
 PR = "r15"
 
 SRC_URI = "file://stage-manager \
-           file://stage-manager-ipkg \
-           file://stage-manager-ipkg-build "
+           file://stage-manager-opkg \
+           file://stage-manager-opkg-build "
 LICENSE = "GPLv2"
 
 PACKAGE_ARCH = "all"
@@ -21,6 +21,6 @@ NATIVE_INSTALL_WORKS = "1"
 do_install() {
        install -d ${STAGING_BINDIR}
        install -m 0755 ${WORKDIR}/stage-manager ${STAGING_BINDIR}
-       install -m 0755 ${WORKDIR}/stage-manager-ipkg ${STAGING_BINDIR}
-       install -m 0755 ${WORKDIR}/stage-manager-ipkg-build ${STAGING_BINDIR}
+       install -m 0755 ${WORKDIR}/stage-manager-opkg ${STAGING_BINDIR}
+       install -m 0755 ${WORKDIR}/stage-manager-opkg-build ${STAGING_BINDIR}
 }