Changeset 35717


Ignore:
Timestamp:
2013-02-21T12:45:25+01:00 (5 years ago)
Author:
jogo
Message:

scripts/ipkg: print warnings/errors to stderr

Makes warnings/errors visible when building with V=w/V=1.

Signed-off-by: Jonas Gorski <jogo@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/ipkg

    r19936 r35717  
    239239        http://* | ftp://*) 
    240240                if ! wget --passive-ftp $proxyoption $proxyuser $proxypassword -P $IPKG_TMP $src; then 
    241                         echo "ipkg_download: ERROR: Failed to retrieve $src, returning $err" 
     241                        echo "ipkg_download: ERROR: Failed to retrieve $src, returning $err" >&2 
    242242                        return 1 
    243243                fi 
     
    686686 
    687687                        if [ -z "$filename" ]; then 
    688                                 echo "ipkg_get_install: ERROR: Cannot find package $pkg in $IPKG_LISTS_DIR" 
    689                                 echo "ipkg_get_install:        Check the spelling and maybe run \`ipkg update'." 
     688                                echo "ipkg_get_install: ERROR: Cannot find package $pkg in $IPKG_LISTS_DIR" >&2 
     689                                echo "ipkg_get_install:        Check the spelling and maybe run \`ipkg update'." >&2 
    690690                                ipkg_status_remove_sd $sd $pkg 
    691691                                return 1; 
     
    699699 
    700700                        if ! ipkg_install_file_dest $dest $tmp_pkg_file; then 
    701                                 echo "ipkg_get_install: ERROR: Failed to install $tmp_pkg_file" 
    702                                 echo "ipkg_get_install: I'll leave it there for you to try a manual installation" 
     701                                echo "ipkg_get_install: ERROR: Failed to install $tmp_pkg_file" >&2 
     702                                echo "ipkg_get_install: I'll leave it there for you to try a manual installation" >&2 
    703703                                return 1 
    704704                        fi 
     
    732732 
    733733        if [ ! -f "$filename" ]; then 
    734                 echo "ipkg_install_file: ERROR: File $filename not found" 
     734                echo "ipkg_install_file: ERROR: File $filename not found" >&2 
    735735                return 1 
    736736        fi 
     
    744744                pkg_extract_stdout="ar p" 
    745745        else 
    746                 echo "ipkg_install_file: ERROR: File $filename has unknown extension $ext (not .ipk or .deb)" 
     746                echo "ipkg_install_file: ERROR: File $filename has unknown extension $ext (not .ipk or .deb)" >&2 
    747747                return 1 
    748748        fi 
     
    761761        if [ ! -z "$missing_deps" ]; then 
    762762                if [ -n "$FORCE_DEPENDS" ]; then 
    763                         echo "ipkg_install_file: Warning: $pkg depends on the following uninstalled programs: $missing_deps" 
     763                        echo "ipkg_install_file: Warning: $pkg depends on the following uninstalled programs: $missing_deps" >&2 
    764764                else 
    765765                        echo "ipkg_install_file: ERROR: $pkg depends on the following uninstalled programs: 
    766         $missing_deps" 
    767                         echo "ipkg_install_file: You may want to use \`ipkg install' to install these." 
     766        $missing_deps" >&2 
     767                        echo "ipkg_install_file: You may want to use \`ipkg install' to install these." >&2 
    768768                        return 1 
    769769                fi 
     
    775775 
    776776        if ! $pkg_extract_stdout $filename ./control.tar.gz | (cd $IPKG_TMP/$pkg/control; zcat | tar -xf - ) ; then 
    777                 echo "ipkg_install_file: ERROR unpacking control.tar.gz from $filename" 
     777                echo "ipkg_install_file: ERROR unpacking control.tar.gz from $filename" >&2 
    778778                return 1 
    779779        fi 
     
    781781        if [ -n "$IPKG_OFFLINE_ROOT" ]; then 
    782782                if grep -q '^InstallsOffline:[[:space:]]*no' $IPKG_TMP/$pkg/control/control; then 
    783                         echo "*** Warning: Package $pkg may not be installed in offline mode" 
    784                         echo "*** Warning: Scheduling $filename for pending installation (installing into $IPKG_PENDING_DIR)" 
     783                        echo "*** Warning: Package $pkg may not be installed in offline mode" >&2 
     784                        echo "*** Warning: Scheduling $filename for pending installation (installing into $IPKG_PENDING_DIR)" >&2 
    785785                        echo "Package: $pkg 
    786786Status: install ok pending" | ipkg_status_update_sd $sd $pkg 
     
    805805 
    806806        if ! $pkg_extract_stdout $filename ./data.tar.gz | (cd $IPKG_TMP/$pkg/data; zcat | tar -xf - ) ; then 
    807                 echo "ipkg_install_file: ERROR unpacking data.tar.gz from $filename" 
     807                echo "ipkg_install_file: ERROR unpacking data.tar.gz from $filename" >&2 
    808808                return 1 
    809809        fi 
     
    11621162        ;; 
    11631163install|depends|remove|files|search) 
    1164         [ $# -lt 1 ] && ipkg_usage "ERROR: the \`\`$cmd'' command requires an argument" 
     1164        [ $# -lt 1 ] && ipkg_usage "ERROR: the \`\`$cmd'' command requires an argument" >&2 
    11651165        ;; 
    11661166*) 
    1167         echo "ERROR: unknown sub-command \`$cmd'" 
     1167        echo "ERROR: unknown sub-command \`$cmd'" >&2 
    11681168        ipkg_usage 
    11691169        ;; 
Note: See TracChangeset for help on using the changeset viewer.