Error: SHELLCHECK_WARNING: [#def1] /usr/bin/dpkg-maintscript-helper:30:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 28| ## # 29| rm_conffile() { # 30|-> local CONFFILE="$1" # 31| local LASTVERSION="$2" # 32| local PACKAGE="$3" Error: SHELLCHECK_WARNING: [#def2] /usr/bin/dpkg-maintscript-helper:31:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 29| rm_conffile() { # 30| local CONFFILE="$1" # 31|-> local LASTVERSION="$2" # 32| local PACKAGE="$3" # 33| Error: SHELLCHECK_WARNING: [#def3] /usr/bin/dpkg-maintscript-helper:32:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 30| local CONFFILE="$1" # 31| local LASTVERSION="$2" # 32|-> local PACKAGE="$3" # 33| # 34| if [ "$LASTVERSION" = "--" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def4] /usr/bin/dpkg-maintscript-helper:38:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 36| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 37| fi # 38|-> if [ "$PACKAGE" = "--" -o -z "$PACKAGE" ]; then # 39| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 40| fi Error: SHELLCHECK_WARNING (CWE-477): [#def5] /usr/bin/dpkg-maintscript-helper:42:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 40| fi # 41| # Skip remaining parameters up to -- # 42|-> while [ "$1" != "--" -a $# -gt 0 ]; do # 43| shift # 44| done Error: SHELLCHECK_WARNING (CWE-477): [#def6] /usr/bin/dpkg-maintscript-helper:64:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 62| case "$DPKG_MAINTSCRIPT_NAME" in # 63| preinst) # 64|-> if [ "$1" = "install" -o "$1" = "upgrade" ] && [ -n "$2" ] && # 65| dpkg --compare-versions -- "$2" le-nl "$LASTVERSION"; then # 66| prepare_rm_conffile "$CONFFILE" "$PACKAGE" Error: SHELLCHECK_WARNING (CWE-477): [#def7] /usr/bin/dpkg-maintscript-helper:81:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 79| "$DPKG_ROOT$CONFFILE.dpkg-backup" # 80| fi # 81|-> if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ] && # 82| [ -n "$2" ] && # 83| dpkg --compare-versions -- "$2" le-nl "$LASTVERSION"; then Error: SHELLCHECK_WARNING: [#def8] /usr/bin/dpkg-maintscript-helper:94:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 92| # 93| prepare_rm_conffile() { # 94|-> local CONFFILE="$1" # 95| local PACKAGE="$2" # 96| Error: SHELLCHECK_WARNING: [#def9] /usr/bin/dpkg-maintscript-helper:95:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 93| prepare_rm_conffile() { # 94| local CONFFILE="$1" # 95|-> local PACKAGE="$2" # 96| # 97| [ -e "$DPKG_ROOT$CONFFILE" ] || return 0 Error: SHELLCHECK_WARNING: [#def10] /usr/bin/dpkg-maintscript-helper:100:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 98| ensure_package_owns_file "$PACKAGE" "$CONFFILE" || return 0 # 99| # 100|-> local md5sum old_md5sum # 101| md5sum="$(md5sum "$DPKG_ROOT$CONFFILE" | sed -e 's/ .*//')" # 102| old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$PACKAGE" | \ Error: SHELLCHECK_WARNING: [#def11] /usr/bin/dpkg-maintscript-helper:112:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 110| # 111| finish_rm_conffile() { # 112|-> local CONFFILE="$1" # 113| # 114| if [ -e "$DPKG_ROOT$CONFFILE.dpkg-backup" ]; then Error: SHELLCHECK_WARNING: [#def12] /usr/bin/dpkg-maintscript-helper:126:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 124| # 125| abort_rm_conffile() { # 126|-> local CONFFILE="$1" # 127| local PACKAGE="$2" # 128| Error: SHELLCHECK_WARNING: [#def13] /usr/bin/dpkg-maintscript-helper:127:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 125| abort_rm_conffile() { # 126| local CONFFILE="$1" # 127|-> local PACKAGE="$2" # 128| # 129| ensure_package_owns_file "$PACKAGE" "$CONFFILE" || return 0 Error: SHELLCHECK_WARNING: [#def14] /usr/bin/dpkg-maintscript-helper:145:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 143| ## # 144| mv_conffile() { # 145|-> local OLDCONFFILE="$1" # 146| local NEWCONFFILE="$2" # 147| local LASTVERSION="$3" Error: SHELLCHECK_WARNING: [#def15] /usr/bin/dpkg-maintscript-helper:146:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 144| mv_conffile() { # 145| local OLDCONFFILE="$1" # 146|-> local NEWCONFFILE="$2" # 147| local LASTVERSION="$3" # 148| local PACKAGE="$4" Error: SHELLCHECK_WARNING: [#def16] /usr/bin/dpkg-maintscript-helper:147:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 145| local OLDCONFFILE="$1" # 146| local NEWCONFFILE="$2" # 147|-> local LASTVERSION="$3" # 148| local PACKAGE="$4" # 149| Error: SHELLCHECK_WARNING: [#def17] /usr/bin/dpkg-maintscript-helper:148:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 146| local NEWCONFFILE="$2" # 147| local LASTVERSION="$3" # 148|-> local PACKAGE="$4" # 149| # 150| if [ "$LASTVERSION" = "--" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def18] /usr/bin/dpkg-maintscript-helper:154:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 152| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 153| fi # 154|-> if [ "$PACKAGE" = "--" -o -z "$PACKAGE" ]; then # 155| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 156| fi Error: SHELLCHECK_WARNING (CWE-477): [#def19] /usr/bin/dpkg-maintscript-helper:158:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 156| fi # 157| # Skip remaining parameters up to -- # 158|-> while [ "$1" != "--" -a $# -gt 0 ]; do # 159| shift # 160| done Error: SHELLCHECK_WARNING (CWE-477): [#def20] /usr/bin/dpkg-maintscript-helper:182:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 180| case "$DPKG_MAINTSCRIPT_NAME" in # 181| preinst) # 182|-> if [ "$1" = "install" -o "$1" = "upgrade" ] && [ -n "$2" ] && # 183| dpkg --compare-versions -- "$2" le-nl "$LASTVERSION"; then # 184| prepare_mv_conffile "$OLDCONFFILE" "$PACKAGE" Error: SHELLCHECK_WARNING (CWE-477): [#def21] /usr/bin/dpkg-maintscript-helper:194:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 192| ;; # 193| postrm) # 194|-> if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ] && # 195| [ -n "$2" ] && # 196| dpkg --compare-versions -- "$2" le-nl "$LASTVERSION"; then Error: SHELLCHECK_WARNING: [#def22] /usr/bin/dpkg-maintscript-helper:207:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 205| # 206| prepare_mv_conffile() { # 207|-> local CONFFILE="$1" # 208| local PACKAGE="$2" # 209| Error: SHELLCHECK_WARNING: [#def23] /usr/bin/dpkg-maintscript-helper:208:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 206| prepare_mv_conffile() { # 207| local CONFFILE="$1" # 208|-> local PACKAGE="$2" # 209| # 210| [ -e "$DPKG_ROOT$CONFFILE" ] || return 0 Error: SHELLCHECK_WARNING: [#def24] /usr/bin/dpkg-maintscript-helper:214:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 212| ensure_package_owns_file "$PACKAGE" "$CONFFILE" || return 0 # 213| # 214|-> local md5sum old_md5sum # 215| md5sum="$(md5sum "$DPKG_ROOT$CONFFILE" | sed -e 's/ .*//')" # 216| old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$PACKAGE" | \ Error: SHELLCHECK_WARNING: [#def25] /usr/bin/dpkg-maintscript-helper:224:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 222| # 223| finish_mv_conffile() { # 224|-> local OLDCONFFILE="$1" # 225| local NEWCONFFILE="$2" # 226| local PACKAGE="$3" Error: SHELLCHECK_WARNING: [#def26] /usr/bin/dpkg-maintscript-helper:225:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 223| finish_mv_conffile() { # 224| local OLDCONFFILE="$1" # 225|-> local NEWCONFFILE="$2" # 226| local PACKAGE="$3" # 227| Error: SHELLCHECK_WARNING: [#def27] /usr/bin/dpkg-maintscript-helper:226:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 224| local OLDCONFFILE="$1" # 225| local NEWCONFFILE="$2" # 226|-> local PACKAGE="$3" # 227| # 228| rm -f "$DPKG_ROOT$OLDCONFFILE.dpkg-remove" Error: SHELLCHECK_WARNING: [#def28] /usr/bin/dpkg-maintscript-helper:241:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 239| # 240| abort_mv_conffile() { # 241|-> local CONFFILE="$1" # 242| local PACKAGE="$2" # 243| Error: SHELLCHECK_WARNING: [#def29] /usr/bin/dpkg-maintscript-helper:242:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 240| abort_mv_conffile() { # 241| local CONFFILE="$1" # 242|-> local PACKAGE="$2" # 243| # 244| ensure_package_owns_file "$PACKAGE" "$CONFFILE" || return 0 Error: SHELLCHECK_WARNING: [#def30] /usr/bin/dpkg-maintscript-helper:256:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 254| ## # 255| symlink_to_dir() { # 256|-> local SYMLINK="$1" # 257| local SYMLINK_TARGET="$2" # 258| local LASTVERSION="$3" Error: SHELLCHECK_WARNING: [#def31] /usr/bin/dpkg-maintscript-helper:257:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 255| symlink_to_dir() { # 256| local SYMLINK="$1" # 257|-> local SYMLINK_TARGET="$2" # 258| local LASTVERSION="$3" # 259| local PACKAGE="$4" Error: SHELLCHECK_WARNING: [#def32] /usr/bin/dpkg-maintscript-helper:258:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 256| local SYMLINK="$1" # 257| local SYMLINK_TARGET="$2" # 258|-> local LASTVERSION="$3" # 259| local PACKAGE="$4" # 260| Error: SHELLCHECK_WARNING: [#def33] /usr/bin/dpkg-maintscript-helper:259:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 257| local SYMLINK_TARGET="$2" # 258| local LASTVERSION="$3" # 259|-> local PACKAGE="$4" # 260| # 261| if [ "$LASTVERSION" = "--" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def34] /usr/bin/dpkg-maintscript-helper:265:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 263| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 264| fi # 265|-> if [ "$PACKAGE" = "--" -o -z "$PACKAGE" ]; then # 266| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 267| fi Error: SHELLCHECK_WARNING (CWE-477): [#def35] /usr/bin/dpkg-maintscript-helper:270:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 268| # 269| # Skip remaining parameters up to -- # 270|-> while [ "$1" != "--" -a $# -gt 0 ]; do # 271| shift # 272| done Error: SHELLCHECK_WARNING (CWE-477): [#def36] /usr/bin/dpkg-maintscript-helper:297:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 295| case "$DPKG_MAINTSCRIPT_NAME" in # 296| preinst) # 297|-> if [ "$1" = "install" -o "$1" = "upgrade" ] && # 298| [ -n "$2" ] && [ -h "$DPKG_ROOT$SYMLINK" ] && # 299| symlink_match "$SYMLINK" "$SYMLINK_TARGET" && Error: SHELLCHECK_WARNING (CWE-477): [#def37] /usr/bin/dpkg-maintscript-helper:320:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 318| rm -f "$DPKG_ROOT${SYMLINK}.dpkg-backup" # 319| fi # 320|-> if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ] && # 321| [ -n "$2" ] && # 322| [ ! -e "$DPKG_ROOT$SYMLINK" ] && Error: SHELLCHECK_WARNING: [#def38] /usr/bin/dpkg-maintscript-helper:340:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 338| ## # 339| dir_to_symlink() { # 340|-> local PATHNAME="${1%/}" # 341| local SYMLINK_TARGET="$2" # 342| local LASTVERSION="$3" Error: SHELLCHECK_WARNING: [#def39] /usr/bin/dpkg-maintscript-helper:341:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 339| dir_to_symlink() { # 340| local PATHNAME="${1%/}" # 341|-> local SYMLINK_TARGET="$2" # 342| local LASTVERSION="$3" # 343| local PACKAGE="$4" Error: SHELLCHECK_WARNING: [#def40] /usr/bin/dpkg-maintscript-helper:342:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 340| local PATHNAME="${1%/}" # 341| local SYMLINK_TARGET="$2" # 342|-> local LASTVERSION="$3" # 343| local PACKAGE="$4" # 344| Error: SHELLCHECK_WARNING: [#def41] /usr/bin/dpkg-maintscript-helper:343:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 341| local SYMLINK_TARGET="$2" # 342| local LASTVERSION="$3" # 343|-> local PACKAGE="$4" # 344| # 345| if [ "$LASTVERSION" = "--" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def42] /usr/bin/dpkg-maintscript-helper:349:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 347| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 348| fi # 349|-> if [ "$PACKAGE" = "--" -o -z "$PACKAGE" ]; then # 350| PACKAGE="$DPKG_MAINTSCRIPT_PACKAGE${DPKG_MAINTSCRIPT_ARCH:+:$DPKG_MAINTSCRIPT_ARCH}" # 351| fi Error: SHELLCHECK_WARNING (CWE-477): [#def43] /usr/bin/dpkg-maintscript-helper:354:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 352| # 353| # Skip remaining parameters up to -- # 354|-> while [ "$1" != "--" -a $# -gt 0 ]; do # 355| shift # 356| done Error: SHELLCHECK_WARNING (CWE-477): [#def44] /usr/bin/dpkg-maintscript-helper:379:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 377| case "$DPKG_MAINTSCRIPT_NAME" in # 378| preinst) # 379|-> if [ "$1" = "install" -o "$1" = "upgrade" ] && # 380| [ -n "$2" ] && # 381| [ ! -h "$DPKG_ROOT$PATHNAME" ] && Error: SHELLCHECK_WARNING (CWE-477): [#def45] /usr/bin/dpkg-maintscript-helper:405:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 403| rm -rf "$DPKG_ROOT${PATHNAME}.dpkg-backup" # 404| fi # 405|-> if [ "$1" = "abort-install" -o "$1" = "abort-upgrade" ] && # 406| [ -n "$2" ] && # 407| [ -d "$DPKG_ROOT${PATHNAME}.dpkg-backup" ] && Error: SHELLCHECK_WARNING (CWE-477): [#def46] /usr/bin/dpkg-maintscript-helper:408:40: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 406| [ -n "$2" ] && # 407| [ -d "$DPKG_ROOT${PATHNAME}.dpkg-backup" ] && # 408|-> [ \( ! -h "$DPKG_ROOT$PATHNAME" -a \ # 409| -d "$DPKG_ROOT$PATHNAME" -a \ # 410| -f "$DPKG_ROOT$PATHNAME/.dpkg-staging-dir" \) -o \ Error: SHELLCHECK_WARNING (CWE-477): [#def47] /usr/bin/dpkg-maintscript-helper:409:38: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 407| [ -d "$DPKG_ROOT${PATHNAME}.dpkg-backup" ] && # 408| [ \( ! -h "$DPKG_ROOT$PATHNAME" -a \ # 409|-> -d "$DPKG_ROOT$PATHNAME" -a \ # 410| -f "$DPKG_ROOT$PATHNAME/.dpkg-staging-dir" \) -o \ # 411| \( -h "$DPKG_ROOT$PATHNAME" -a \ Error: SHELLCHECK_WARNING (CWE-477): [#def48] /usr/bin/dpkg-maintscript-helper:410:59: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 408| [ \( ! -h "$DPKG_ROOT$PATHNAME" -a \ # 409| -d "$DPKG_ROOT$PATHNAME" -a \ # 410|-> -f "$DPKG_ROOT$PATHNAME/.dpkg-staging-dir" \) -o \ # 411| \( -h "$DPKG_ROOT$PATHNAME" -a \ # 412| \( "$(readlink "$DPKG_ROOT$PATHNAME")" = "$SYMLINK_TARGET" -o \ Error: SHELLCHECK_WARNING (CWE-477): [#def49] /usr/bin/dpkg-maintscript-helper:411:38: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 409| -d "$DPKG_ROOT$PATHNAME" -a \ # 410| -f "$DPKG_ROOT$PATHNAME/.dpkg-staging-dir" \) -o \ # 411|-> \( -h "$DPKG_ROOT$PATHNAME" -a \ # 412| \( "$(readlink "$DPKG_ROOT$PATHNAME")" = "$SYMLINK_TARGET" -o \ # 413| "$(dpkg-realpath "$PATHNAME")" = "$SYMLINK_TARGET" \) \) ] && Error: SHELLCHECK_WARNING (CWE-477): [#def50] /usr/bin/dpkg-maintscript-helper:412:72: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 410| -f "$DPKG_ROOT$PATHNAME/.dpkg-staging-dir" \) -o \ # 411| \( -h "$DPKG_ROOT$PATHNAME" -a \ # 412|-> \( "$(readlink "$DPKG_ROOT$PATHNAME")" = "$SYMLINK_TARGET" -o \ # 413| "$(dpkg-realpath "$PATHNAME")" = "$SYMLINK_TARGET" \) \) ] && # 414| dpkg --compare-versions -- "$2" le-nl "$LASTVERSION"; then Error: SHELLCHECK_WARNING: [#def51] /usr/bin/dpkg-maintscript-helper:426:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 424| prepare_dir_to_symlink() # 425| { # 426|-> local PACKAGE="$1" # 427| local PATHNAME="$2" # 428| Error: SHELLCHECK_WARNING: [#def52] /usr/bin/dpkg-maintscript-helper:427:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 425| { # 426| local PACKAGE="$1" # 427|-> local PATHNAME="$2" # 428| # 429| local LINE Error: SHELLCHECK_WARNING: [#def53] /usr/bin/dpkg-maintscript-helper:429:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 427| local PATHNAME="$2" # 428| # 429|-> local LINE # 430| # If there are conffiles we should not perform the switch. # 431| dpkg-query -W -f='${Conffiles}\n' "$PACKAGE" | while read -r LINE; do Error: SHELLCHECK_WARNING: [#def54] /usr/bin/dpkg-maintscript-helper:472:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 470| finish_dir_to_symlink() # 471| { # 472|-> local PATHNAME="$1" # 473| local SYMLINK_TARGET="$2" # 474| Error: SHELLCHECK_WARNING: [#def55] /usr/bin/dpkg-maintscript-helper:473:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 471| { # 472| local PATHNAME="$1" # 473|-> local SYMLINK_TARGET="$2" # 474| # 475| # Move the contents of the staging directory to the symlink target, Error: SHELLCHECK_WARNING: [#def56] /usr/bin/dpkg-maintscript-helper:478:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 476| # as those are all new files installed between this package being # 477| # unpacked and configured. # 478|-> local ABS_SYMLINK_TARGET # 479| if [ "${SYMLINK_TARGET#/}" = "$SYMLINK_TARGET" ]; then # 480| ABS_SYMLINK_TARGET="$(dirname "$PATHNAME")/$SYMLINK_TARGET" Error: SHELLCHECK_WARNING: [#def57] /usr/bin/dpkg-maintscript-helper:501:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 499| abort_dir_to_symlink() # 500| { # 501|-> local PATHNAME="$1" # 502| # 503| echo "Restoring backup of $DPKG_ROOT$PATHNAME ..." Error: SHELLCHECK_WARNING: [#def58] /usr/bin/dpkg-maintscript-helper:518:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 516| # Common functions # 517| validate_optional_version() { # 518|-> local VERSION="$1" # 519| # 520| if [ -z "$VERSION" ]; then Error: SHELLCHECK_WARNING: [#def59] /usr/bin/dpkg-maintscript-helper:530:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 528| # 529| ensure_package_owns_file() { # 530|-> local PACKAGE="$1" # 531| local FILE="$2" # 532| Error: SHELLCHECK_WARNING: [#def60] /usr/bin/dpkg-maintscript-helper:531:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 529| ensure_package_owns_file() { # 530| local PACKAGE="$1" # 531|-> local FILE="$2" # 532| # 533| if ! dpkg-query -L "$PACKAGE" | grep -F -q -x "$FILE"; then Error: SHELLCHECK_WARNING: [#def61] /usr/bin/dpkg-maintscript-helper:543:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 541| internal_pkg_must_own_file() # 542| { # 543|-> local PACKAGE="$1" # 544| local FILE="${2##"$DPKG_ROOT"}" # 545| Error: SHELLCHECK_WARNING: [#def62] /usr/bin/dpkg-maintscript-helper:544:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 542| { # 543| local PACKAGE="$1" # 544|-> local FILE="${2##"$DPKG_ROOT"}" # 545| # 546| if [ "$DPKG_MAINTSCRIPT_HELPER_INTERNAL_API" != "$version" ]; then Error: SHELLCHECK_WARNING: [#def63] /usr/bin/dpkg-maintscript-helper:558:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 556| symlink_match() # 557| { # 558|-> local SYMLINK="$1" # 559| local SYMLINK_TARGET="$2" # 560| Error: SHELLCHECK_WARNING: [#def64] /usr/bin/dpkg-maintscript-helper:559:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 557| { # 558| local SYMLINK="$1" # 559|-> local SYMLINK_TARGET="$2" # 560| # 561| [ "$(readlink "$DPKG_ROOT$SYMLINK")" = "$SYMLINK_TARGET" ] || \ Error: SHELLCHECK_WARNING (CWE-563): [#def65] /usr/libexec/dpkg/dpkg-db-backup:18:1: warning[SC2034]: PROGNAME appears unused. Verify use (or export if used externally). # 16| # along with this program. If not, see <https://www.gnu.org/licenses/>. # 17| # 18|-> PROGNAME=$(basename "$0") # 19| ADMINDIR='/var/lib/dpkg' # 20| BACKUPSDIR='/var/backups' Error: SHELLCHECK_WARNING (CWE-563): [#def66] /usr/libexec/dpkg/dpkg-db-keeper:18:1: warning[SC2034]: PROGNAME appears unused. Verify use (or export if used externally). # 16| # along with this program. If not, see <https://www.gnu.org/licenses/>. # 17| # 18|-> PROGNAME=$(basename "$0") # 19| ADMINDIR='/var/lib/dpkg' # 20| Error: SHELLCHECK_WARNING (CWE-563): [#def67] /usr/libexec/dpkg/dpkg-db-keeper:19:1: warning[SC2034]: ADMINDIR appears unused. Verify use (or export if used externally). # 17| # 18| PROGNAME=$(basename "$0") # 19|-> ADMINDIR='/var/lib/dpkg' # 20| # 21| PKGDATADIR_DEFAULT='/usr/share/dpkg' Error: SHELLCHECK_WARNING (CWE-563): [#def68] /usr/libexec/dpkg/methods/file/install:18:1: warning[SC2034]: method appears unused. Verify use (or export if used externally). # 16| set -e # 17| vardir="$1" # 18|-> method=$2 # 19| option=$3 # 20| Error: SHELLCHECK_WARNING (CWE-457): [#def69] /usr/libexec/dpkg/methods/file/install:109:9: warning[SC2154]: p_mountpoint is referenced but not assigned. # 107| exec("dpkg","--admindir",$vardir,"-iB","--",@invoke); # 108| die "failed to exec dpkg: $!\n"; # 109|-> ' -- "$p_mountpoint$p_main_binary" "$predep" # 110| done # 111| Error: SHELLCHECK_WARNING (CWE-457): [#def70] /usr/libexec/dpkg/methods/file/install:109:22: warning[SC2154]: p_main_binary is referenced but not assigned. # 107| exec("dpkg","--admindir",$vardir,"-iB","--",@invoke); # 108| die "failed to exec dpkg: $!\n"; # 109|-> ' -- "$p_mountpoint$p_main_binary" "$predep" # 110| done # 111| Error: SHELLCHECK_WARNING: [#def71] /usr/libexec/dpkg/methods/file/install:121:6: warning[SC3037]: In POSIX sh, echo flags are undefined. # 119| done # 120| # 121|-> echo -n 'Installation OK. Hit RETURN. ' # 122| read response # 123| Error: SHELLCHECK_WARNING (CWE-563): [#def72] /usr/libexec/dpkg/methods/file/install:122:6: warning[SC2034]: response appears unused. Verify use (or export if used externally). # 120| # 121| echo -n 'Installation OK. Hit RETURN. ' # 122|-> read response # 123| # 124| xit=0 Error: SHELLCHECK_WARNING: [#def73] /usr/libexec/dpkg/methods/file/setup:38:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 36| yesno () { # 37| while true; do # 38|-> echo -n "$2 [$1] " # 39| read response # 40| if [ -z "$response" ]; then Error: SHELLCHECK_WARNING (CWE-563): [#def74] /usr/libexec/dpkg/methods/file/setup:49:7: warning[SC2034]: yesno appears unused. Verify use (or export if used externally). # 47| ;; # 48| [Yy]*) # 49|-> yesno=yes # 50| return # 51| ;; Error: SHELLCHECK_WARNING (CWE-457): [#def75] /usr/libexec/dpkg/methods/file/setup:87:1: warning[SC2154]: fstype is referenced but not assigned. # 85| echo \ # 86| "All directory names should be entered relative to the root of the # 87|-> $fstype filesystem. # 88| " # 89| fi Error: SHELLCHECK_WARNING: [#def76] /usr/libexec/dpkg/methods/file/setup:126:8: warning[SC3037]: In POSIX sh, echo flags are undefined. # 124| fi # 125| fi # 126|-> echo -n \ # 127| "Distribution top level ? [$defhierbase] " # 128| read response Error: SHELLCHECK_WARNING (CWE-477): [#def77] /usr/libexec/dpkg/methods/file/setup:189:16: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 187| packages you made yourself." # 188| fi # 189|-> if [ $2 = nf -a -z "$this_binary" ]; then # 190| echo " # 191| Note: most media distributions of Debian do not include programs available Error: SHELLCHECK_WARNING: [#def78] /usr/libexec/dpkg/methods/file/setup:208:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 206| defaultbinary=none # 207| fi # 208|-> echo -n \ # 209| "Enter _$1_ binary dir. [$4] # 210| ? " Error: SHELLCHECK_WARNING: [#def79] /usr/libexec/dpkg/methods/file/setup:234:12: warning[SC3037]: In POSIX sh, echo flags are undefined. # 232| done # 233| while [ -z "$this_packages" ]; do # 234|-> echo -n " # 235| Cannot find the $1 'Packages' file. The information in the # 236| 'Packages' file is important for package selection during new Error: SHELLCHECK_WARNING (CWE-457): [#def80] /usr/libexec/dpkg/methods/file/setup:279:27: warning[SC2154]: p_main_binary is referenced but not assigned. # 277| } # 278| # 279|-> find_area main main main "$p_main_binary" "$p_main_packages" # 280| find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def81] /usr/libexec/dpkg/methods/file/setup:279:44: warning[SC2154]: p_main_packages is referenced but not assigned. # 277| } # 278| # 279|-> find_area main main main "$p_main_binary" "$p_main_packages" # 280| find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def82] /usr/libexec/dpkg/methods/file/setup:280:32: warning[SC2154]: p_ctb_binary is referenced but not assigned. # 278| # 279| find_area main main main "$p_main_binary" "$p_main_packages" # 280|-> find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282| find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def83] /usr/libexec/dpkg/methods/file/setup:280:48: warning[SC2154]: p_ctb_packages is referenced but not assigned. # 278| # 279| find_area main main main "$p_main_binary" "$p_main_packages" # 280|-> find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282| find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def84] /usr/libexec/dpkg/methods/file/setup:281:52: warning[SC2154]: p_nff_binary is referenced but not assigned. # 279| find_area main main main "$p_main_binary" "$p_main_packages" # 280| find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281|-> find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282| find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" # 283| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def85] /usr/libexec/dpkg/methods/file/setup:281:68: warning[SC2154]: p_nff_packages is referenced but not assigned. # 279| find_area main main main "$p_main_binary" "$p_main_packages" # 280| find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281|-> find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282| find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" # 283| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def86] /usr/libexec/dpkg/methods/file/setup:282:33: warning[SC2154]: p_nf_binary is referenced but not assigned. # 280| find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282|-> find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" # 283| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 284| Error: SHELLCHECK_WARNING (CWE-457): [#def87] /usr/libexec/dpkg/methods/file/setup:282:48: warning[SC2154]: p_nf_packages is referenced but not assigned. # 280| find_area contrib ctb contrib "$p_ctb_binary" "$p_ctb_packages" # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282|-> find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" # 283| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 284| Error: SHELLCHECK_WARNING (CWE-457): [#def88] /usr/libexec/dpkg/methods/file/setup:283:28: warning[SC2154]: p_lcl_binary is referenced but not assigned. # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282| find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" # 283|-> find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 284| # 285| echo -n ' Error: SHELLCHECK_WARNING (CWE-457): [#def89] /usr/libexec/dpkg/methods/file/setup:283:44: warning[SC2154]: p_lcl_packages is referenced but not assigned. # 281| find_area non-free-firmware nff non-free-firmware "$p_nff_binary" "$p_nff_packages" # 282| find_area non-free nf non-free "$p_nf_binary" "$p_nf_packages" # 283|-> find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 284| # 285| echo -n ' Error: SHELLCHECK_WARNING: [#def90] /usr/libexec/dpkg/methods/file/setup:285:6: warning[SC3037]: In POSIX sh, echo flags are undefined. # 283| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 284| # 285|-> echo -n ' # 286| Hit RETURN to continue. ' # 287| read response Error: SHELLCHECK_WARNING (CWE-457): [#def91] /usr/libexec/dpkg/methods/file/setup:295:30: warning[SC2154]: main_packages is referenced but not assigned. # 293| outputparam p_hierbase "$hierbase" # 294| # 295|-> outputparam p_main_packages "$main_packages" # 296| outputparam p_main_binary "$main_binary" # 297| outputparam p_ctb_packages "$ctb_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def92] /usr/libexec/dpkg/methods/file/setup:296:28: warning[SC2154]: main_binary is referenced but not assigned. # 294| # 295| outputparam p_main_packages "$main_packages" # 296|-> outputparam p_main_binary "$main_binary" # 297| outputparam p_ctb_packages "$ctb_packages" # 298| outputparam p_ctb_binary "$ctb_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def93] /usr/libexec/dpkg/methods/file/setup:297:29: warning[SC2154]: ctb_packages is referenced but not assigned. # 295| outputparam p_main_packages "$main_packages" # 296| outputparam p_main_binary "$main_binary" # 297|-> outputparam p_ctb_packages "$ctb_packages" # 298| outputparam p_ctb_binary "$ctb_binary" # 299| outputparam p_nf_packages "$nf_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def94] /usr/libexec/dpkg/methods/file/setup:298:27: warning[SC2154]: ctb_binary is referenced but not assigned. # 296| outputparam p_main_binary "$main_binary" # 297| outputparam p_ctb_packages "$ctb_packages" # 298|-> outputparam p_ctb_binary "$ctb_binary" # 299| outputparam p_nf_packages "$nf_packages" # 300| outputparam p_nf_binary "$nf_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def95] /usr/libexec/dpkg/methods/file/setup:299:28: warning[SC2154]: nf_packages is referenced but not assigned. # 297| outputparam p_ctb_packages "$ctb_packages" # 298| outputparam p_ctb_binary "$ctb_binary" # 299|-> outputparam p_nf_packages "$nf_packages" # 300| outputparam p_nf_binary "$nf_binary" # 301| outputparam p_nff_packages "$nff_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def96] /usr/libexec/dpkg/methods/file/setup:300:26: warning[SC2154]: nf_binary is referenced but not assigned. # 298| outputparam p_ctb_binary "$ctb_binary" # 299| outputparam p_nf_packages "$nf_packages" # 300|-> outputparam p_nf_binary "$nf_binary" # 301| outputparam p_nff_packages "$nff_packages" # 302| outputparam p_nff_binary "$nff_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def97] /usr/libexec/dpkg/methods/file/setup:301:29: warning[SC2154]: nff_packages is referenced but not assigned. # 299| outputparam p_nf_packages "$nf_packages" # 300| outputparam p_nf_binary "$nf_binary" # 301|-> outputparam p_nff_packages "$nff_packages" # 302| outputparam p_nff_binary "$nff_binary" # 303| outputparam p_lcl_packages "$lcl_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def98] /usr/libexec/dpkg/methods/file/setup:302:27: warning[SC2154]: nff_binary is referenced but not assigned. # 300| outputparam p_nf_binary "$nf_binary" # 301| outputparam p_nff_packages "$nff_packages" # 302|-> outputparam p_nff_binary "$nff_binary" # 303| outputparam p_lcl_packages "$lcl_packages" # 304| outputparam p_lcl_binary "$lcl_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def99] /usr/libexec/dpkg/methods/file/setup:303:29: warning[SC2154]: lcl_packages is referenced but not assigned. # 301| outputparam p_nff_packages "$nff_packages" # 302| outputparam p_nff_binary "$nff_binary" # 303|-> outputparam p_lcl_packages "$lcl_packages" # 304| outputparam p_lcl_binary "$lcl_binary" # 305| Error: SHELLCHECK_WARNING (CWE-457): [#def100] /usr/libexec/dpkg/methods/file/setup:304:27: warning[SC2154]: lcl_binary is referenced but not assigned. # 302| outputparam p_nff_binary "$nff_binary" # 303| outputparam p_lcl_packages "$lcl_packages" # 304|-> outputparam p_lcl_binary "$lcl_binary" # 305| # 306| mv shvar.$option.new shvar.$option Error: SHELLCHECK_WARNING (CWE-563): [#def101] /usr/libexec/dpkg/methods/file/update:18:1: warning[SC2034]: method appears unused. Verify use (or export if used externally). # 16| set -e # 17| vardir="$1" # 18|-> method=$2 # 19| option=$3 # 20| Error: SHELLCHECK_WARNING (CWE-457): [#def102] /usr/libexec/dpkg/methods/file/update:44:9: warning[SC2154]: this_packages is referenced but not assigned. # 42| for f in main ctb nf lcl; do # 43| eval 'this_packages=$p_'$f'_packages' # 44|-> case "$this_packages" in # 45| '') # 46| continue Error: SHELLCHECK_WARNING (CWE-457): [#def103] /usr/libexec/dpkg/methods/file/update:57:42: warning[SC2154]: p_mountpoint is referenced but not assigned. # 55| updatetype=merge # 56| fi # 57|-> echo Running dpkg --record-avail -R "$p_mountpoint$this_binary" # 58| dpkg --admindir $vardir --record-avail -R "$p_mountpoint$this_binary" # 59| ;; Error: SHELLCHECK_WARNING: [#def104] /usr/libexec/dpkg/methods/file/update:64:12: warning[SC3037]: In POSIX sh, echo flags are undefined. # 62| case "$packagesfile" in # 63| *.gz) # 64|-> echo -n "Uncompressing $packagesfile ... " # 65| zcat <"$packagesfile" >packages-$f # 66| echo done. Error: SHELLCHECK_WARNING: [#def105] /usr/libexec/dpkg/methods/file/update:81:6: warning[SC3037]: In POSIX sh, echo flags are undefined. # 79| done # 80| # 81|-> echo -n 'Update OK. Hit RETURN. ' # 82| read response # 83| Error: SHELLCHECK_WARNING (CWE-563): [#def106] /usr/libexec/dpkg/methods/file/update:82:6: warning[SC2034]: response appears unused. Verify use (or export if used externally). # 80| # 81| echo -n 'Update OK. Hit RETURN. ' # 82|-> read response # 83| # 84| xit=0 Error: SHELLCHECK_WARNING (CWE-563): [#def107] /usr/libexec/dpkg/methods/media/install:32:1: warning[SC2034]: iarch appears unused. Verify use (or export if used externally). # 30| true # 31| } # 32|-> iarch=$(dpkg --print-architecture) # 33| # 34| # 1/ mountpoint Error: SHELLCHECK_WARNING: [#def108] /usr/libexec/dpkg/methods/media/install:39:9: warning[SC3037]: In POSIX sh, echo flags are undefined. # 37| debug "$1" "$2" # 38| if [ -f $1/.disk/info ]; then # 39|-> echo -n $(head -1 "$1/.disk/info") # 40| elif [ -f $1$2/.disk/info ]; then # 41| echo -n $(head -1 "$1$2/.disk/info") Error: SHELLCHECK_WARNING (CWE-156): [#def109] /usr/libexec/dpkg/methods/media/install:39:12: warning[SC2046]: Quote this to prevent word splitting. # 37| debug "$1" "$2" # 38| if [ -f $1/.disk/info ]; then # 39|-> echo -n $(head -1 "$1/.disk/info") # 40| elif [ -f $1$2/.disk/info ]; then # 41| echo -n $(head -1 "$1$2/.disk/info") Error: SHELLCHECK_WARNING: [#def110] /usr/libexec/dpkg/methods/media/install:41:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 39| echo -n $(head -1 "$1/.disk/info") # 40| elif [ -f $1$2/.disk/info ]; then # 41|-> echo -n $(head -1 "$1$2/.disk/info") # 42| else # 43| echo -n 'Non-Debian disc' Error: SHELLCHECK_WARNING (CWE-156): [#def111] /usr/libexec/dpkg/methods/media/install:41:13: warning[SC2046]: Quote this to prevent word splitting. # 39| echo -n $(head -1 "$1/.disk/info") # 40| elif [ -f $1$2/.disk/info ]; then # 41|-> echo -n $(head -1 "$1$2/.disk/info") # 42| else # 43| echo -n 'Non-Debian disc' Error: SHELLCHECK_WARNING: [#def112] /usr/libexec/dpkg/methods/media/install:43:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 41| echo -n $(head -1 "$1$2/.disk/info") # 42| else # 43|-> echo -n 'Non-Debian disc' # 44| fi # 45| } Error: SHELLCHECK_WARNING (CWE-457): [#def113] /usr/libexec/dpkg/methods/media/install:62:13: warning[SC2154]: p_mountpoint is referenced but not assigned. # 60| # 61| if [ -n "$p_blockdev" ]; then # 62|-> umount="$p_mountpoint" # 63| echo mount -rt iso9660 -o nosuid,nodev${loop} "$p_blockdev" "$p_mountpoint"\; umount="$p_mountpoint" # 64| fi Error: SHELLCHECK_WARNING (CWE-156): [#def114] /usr/libexec/dpkg/methods/media/install:69:6: warning[SC2046]: Quote this to prevent word splitting. # 67| trap 'eval $(do_umount); exit $xit' 0 # 68| # 69|-> eval $(do_mount) # 70| # 71| predep="$vardir/predep-package" Error: SHELLCHECK_WARNING (CWE-457): [#def115] /usr/libexec/dpkg/methods/media/install:73:44: warning[SC2154]: p_hierbase is referenced but not assigned. # 71| predep="$vardir/predep-package" # 72| while true; do # 73|-> thisdisk="$(getdisklabel ${p_mountpoint} ${p_hierbase})" # 74| set +e # 75| dpkg --predep-package >"$predep" Error: SHELLCHECK_WARNING: [#def116] /usr/libexec/dpkg/methods/media/install:279:6: warning[SC3037]: In POSIX sh, echo flags are undefined. # 277| ' "$vardir" "$p_mountpoint" "$p_hierbase" "$(do_mount)" "$(do_umount)" # 278| # 279|-> echo -n 'Installation OK. Hit RETURN. ' # 280| read response # 281| Error: SHELLCHECK_WARNING (CWE-563): [#def117] /usr/libexec/dpkg/methods/media/install:280:6: warning[SC2034]: response appears unused. Verify use (or export if used externally). # 278| # 279| echo -n 'Installation OK. Hit RETURN. ' # 280|-> read response # 281| # 282| xit=0 Error: SHELLCHECK_WARNING: [#def118] /usr/libexec/dpkg/methods/media/setup:58:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 56| debug "$1" "$2" # 57| if [ -f $1/.disk/info ]; then # 58|-> echo -n $(head -1 "$1/.disk/info") # 59| elif [ -f $1$2/.disk/info ]; then # 60| echo -n $(head -1 "$1$2/.disk/info") Error: SHELLCHECK_WARNING (CWE-156): [#def119] /usr/libexec/dpkg/methods/media/setup:58:13: warning[SC2046]: Quote this to prevent word splitting. # 56| debug "$1" "$2" # 57| if [ -f $1/.disk/info ]; then # 58|-> echo -n $(head -1 "$1/.disk/info") # 59| elif [ -f $1$2/.disk/info ]; then # 60| echo -n $(head -1 "$1$2/.disk/info") Error: SHELLCHECK_WARNING: [#def120] /usr/libexec/dpkg/methods/media/setup:60:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 58| echo -n $(head -1 "$1/.disk/info") # 59| elif [ -f $1$2/.disk/info ]; then # 60|-> echo -n $(head -1 "$1$2/.disk/info") # 61| else # 62| echo -n 'Non-Debian disc' Error: SHELLCHECK_WARNING (CWE-156): [#def121] /usr/libexec/dpkg/methods/media/setup:60:13: warning[SC2046]: Quote this to prevent word splitting. # 58| echo -n $(head -1 "$1/.disk/info") # 59| elif [ -f $1$2/.disk/info ]; then # 60|-> echo -n $(head -1 "$1$2/.disk/info") # 61| else # 62| echo -n 'Non-Debian disc' Error: SHELLCHECK_WARNING: [#def122] /usr/libexec/dpkg/methods/media/setup:62:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 60| echo -n $(head -1 "$1$2/.disk/info") # 61| else # 62|-> echo -n 'Non-Debian disc' # 63| fi # 64| } Error: SHELLCHECK_WARNING: [#def123] /usr/libexec/dpkg/methods/media/setup:68:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 66| yesno () { # 67| while true; do # 68|-> echo -n "$2 [$1] " # 69| read response # 70| if [ -z "$response" ]; then Error: SHELLCHECK_WARNING: [#def124] /usr/libexec/dpkg/methods/media/setup:95:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 93| promptstring="$1" # 94| while [ -z "$blockdevice" ]; do # 95|-> echo -n "$promptstring [$defaultdevice]: " # 96| read response # 97| if [ -z "$response" ]; then Error: SHELLCHECK_WARNING (CWE-457): [#def125] /usr/libexec/dpkg/methods/media/setup:148:18: warning[SC2154]: p_blockdev is referenced but not assigned. # 146| if [ -f shvar.$option ]; then # 147| . ./shvar.$option # 148|-> defaultdevice="$p_blockdev" # 149| usedevel="$p_usedevel" # 150| fi Error: SHELLCHECK_WARNING: [#def126] /usr/libexec/dpkg/methods/media/setup:160:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 158| echo 'Several media discs (ISO9660 filesystems) are mounted:' # 159| grep -E 'type iso9660 \([^)]*\)$' <$tp.m | nl # 160|-> echo -n "Is it any of these ? Type a number, or 'n' for none. " # 161| read response # 162| response="$(echo "$response" | sed -e 's/[ ]*$//')" Error: SHELLCHECK_WARNING (CWE-477): [#def127] /usr/libexec/dpkg/methods/media/setup:164:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 162| response="$(echo "$response" | sed -e 's/[ ]*$//')" # 163| if expr "$response" : '[0-9][0-9]*$' >/dev/null && \ # 164|-> [ $response -ge 1 -a $response -le $ncdroms ]; then # 165| mountpoint="$(sed -n $response'p' <$tp.l)" # 166| echo Error: SHELLCHECK_WARNING: [#def128] /usr/libexec/dpkg/methods/media/setup:184:12: warning[SC3037]: In POSIX sh, echo flags are undefined. # 182| umount="$mountpoint" # 183| while true; do # 184|-> echo -n 'Please insert the right disc, and hit return: ' # 185| read response # 186| if mount -rt iso9660 -o nosuid,nodev \ Error: SHELLCHECK_WARNING (CWE-477): [#def129] /usr/libexec/dpkg/methods/media/setup:229:10: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 227| if [ -n "$p_hierbase" ]; then # 228| if [ -d "$mountpoint/$p_hierbase/dists/$dist/main/binary-$iarch" \ # 229|-> -o -n "$multi" ]; then # 230| echo "Last time you said '$p_hierbase', and that looks plausible." # 231| defhierbase="$p_hierbase" Error: SHELLCHECK_WARNING (CWE-477): [#def130] /usr/libexec/dpkg/methods/media/setup:243:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 241| # if ‘none’ was entered, we assume a media with a debian/ directory # 242| # 243|-> if [ none = "$defhierbase" -a -d "$mountpoint/debian/dists/$dist/main/binary-$iarch" ] # 244| then # 245| echo "'/debian' exists and looks plausible, so that's the default." Error: SHELLCHECK_WARNING: [#def131] /usr/libexec/dpkg/methods/media/setup:249:8: warning[SC3037]: In POSIX sh, echo flags are undefined. # 247| fi # 248| # 249|-> echo -n "Distribution top level ? [$defhierbase] " # 250| read response # 251| if [ -z "$response" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def132] /usr/libexec/dpkg/methods/media/setup:262:10: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 260| # 261| if ! [ -d "$mountpoint/$response/dists/$dist/main/binary-$iarch" \ # 262|-> -o -n "$multi" ]; then # 263| echo \ # 264| "Neither $response/dists/$dist/main/binary-$iarch does not exist, Error: SHELLCHECK_WARNING (CWE-138): [#def133] /usr/libexec/dpkg/methods/media/setup:316:23: error[SC2145]: Argument mixes string and array. Use * or separate argument. # 314| check_binary () { # 315| # args: area-in-messages directory # 316|-> debug "check_binary($@)" # 317| # 318| if [ ! -d "${mountpoint}$2" -a -z "$multi" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def134] /usr/libexec/dpkg/methods/media/setup:318:31: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 316| debug "check_binary($@)" # 317| # 318|-> if [ ! -d "${mountpoint}$2" -a -z "$multi" ]; then # 319| echo "'$2' does not exist." # 320| return Error: SHELLCHECK_WARNING: [#def135] /usr/libexec/dpkg/methods/media/setup:335:8: warning[SC3037]: In POSIX sh, echo flags are undefined. # 333| # 334| this_binary="$2" # 335|-> echo -n "Using '$this_binary' as $1 binary directory" # 336| # 337| if [ -n "$multi" ]; then Error: SHELLCHECK_WARNING (CWE-138): [#def136] /usr/libexec/dpkg/methods/media/setup:349:20: error[SC2145]: Argument mixes string and array. Use * or separate argument. # 347| # args: area-in-messages area-in-vars subdirectory-in-hier # 348| # last-time-binary last-time-packages # 349|-> debug "find_area($@)" # 350| this_binary='' # 351| this_packages='' Error: SHELLCHECK_WARNING (CWE-156): [#def137] /usr/libexec/dpkg/methods/media/setup:354:21: warning[SC2046]: Quote this to prevent word splitting. # 352| this_disk='' # 353| if [ -n "$hierbase" ]; then # 354|-> check_binary $1 $(echo "$hierbase/dists/$3/$1/binary-$iarch" | sed 's:/\+:/:g') # 355| debug "THIS_BINARY $this_binary" # 356| fi Error: SHELLCHECK_WARNING (CWE-477): [#def138] /usr/libexec/dpkg/methods/media/setup:357:16: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 355| debug "THIS_BINARY $this_binary" # 356| fi # 357|-> if [ $2 = nf -a -z "$this_binary" ]; then # 358| echo " # 359| Note: most media distributions of Debian do not include programs available Error: SHELLCHECK_WARNING (CWE-477): [#def139] /usr/libexec/dpkg/methods/media/setup:373:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 371| area (this directory is named '$3/binary' on the distribution site) ? # 372| Say 'none' if this area is not available." # 373|-> if [ $2 != main -a -z "$defaultbinary" ]; then # 374| defaultbinary=none # 375| fi Error: SHELLCHECK_WARNING: [#def140] /usr/libexec/dpkg/methods/media/setup:376:10: warning[SC3037]: In POSIX sh, echo flags are undefined. # 374| defaultbinary=none # 375| fi # 376|-> echo -n \ # 377| "Enter _$1_ binary directory. [$4] # 378| ? " Error: SHELLCHECK_WARNING (CWE-477): [#def141] /usr/libexec/dpkg/methods/media/setup:380:25: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 378| ? " # 379| read response # 380|-> if [ -z "$response" -a -n "$defaultbinary" ]; then # 381| response="$defaultbinary" # 382| fi Error: SHELLCHECK_WARNING: [#def142] /usr/libexec/dpkg/methods/media/setup:407:12: warning[SC3037]: In POSIX sh, echo flags are undefined. # 405| fi # 406| while [ -z "$this_packages" ]; do # 407|-> echo -n " # 408| Cannot find the $1 'Packages.cd' file. The information in the # 409| 'Packages.cd' file is important for package selection during new Error: SHELLCHECK_WARNING (CWE-477): [#def143] /usr/libexec/dpkg/methods/media/setup:426:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 424| ? " # 425| read response # 426|-> if [ -z "$response" -a -n "$5" ]; then # 427| response="$5" # 428| fi Error: SHELLCHECK_WARNING (CWE-457): [#def144] /usr/libexec/dpkg/methods/media/setup:453:38: warning[SC2154]: p_main_binary is referenced but not assigned. # 451| } # 452| # 453|-> find_area main main "$distribution" "$p_main_binary" "$p_main_packages" # 454| find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def145] /usr/libexec/dpkg/methods/media/setup:453:55: warning[SC2154]: p_main_packages is referenced but not assigned. # 451| } # 452| # 453|-> find_area main main "$distribution" "$p_main_binary" "$p_main_packages" # 454| find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def146] /usr/libexec/dpkg/methods/media/setup:454:40: warning[SC2154]: p_ctb_binary is referenced but not assigned. # 452| # 453| find_area main main "$distribution" "$p_main_binary" "$p_main_packages" # 454|-> find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456| find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def147] /usr/libexec/dpkg/methods/media/setup:454:56: warning[SC2154]: p_ctb_packages is referenced but not assigned. # 452| # 453| find_area main main "$distribution" "$p_main_binary" "$p_main_packages" # 454|-> find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456| find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def148] /usr/libexec/dpkg/methods/media/setup:455:50: warning[SC2154]: p_nff_binary is referenced but not assigned. # 453| find_area main main "$distribution" "$p_main_binary" "$p_main_packages" # 454| find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455|-> find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456| find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" # 457| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def149] /usr/libexec/dpkg/methods/media/setup:455:66: warning[SC2154]: p_nff_packages is referenced but not assigned. # 453| find_area main main "$distribution" "$p_main_binary" "$p_main_packages" # 454| find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455|-> find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456| find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" # 457| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def150] /usr/libexec/dpkg/methods/media/setup:456:40: warning[SC2154]: p_nf_binary is referenced but not assigned. # 454| find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456|-> find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" # 457| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 458| Error: SHELLCHECK_WARNING (CWE-457): [#def151] /usr/libexec/dpkg/methods/media/setup:456:55: warning[SC2154]: p_nf_packages is referenced but not assigned. # 454| find_area contrib ctb "$distribution" "$p_ctb_binary" "$p_ctb_packages" # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456|-> find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" # 457| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 458| Error: SHELLCHECK_WARNING (CWE-457): [#def152] /usr/libexec/dpkg/methods/media/setup:457:28: warning[SC2154]: p_lcl_binary is referenced but not assigned. # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456| find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" # 457|-> find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 458| # 459| echo -n ' Error: SHELLCHECK_WARNING (CWE-457): [#def153] /usr/libexec/dpkg/methods/media/setup:457:44: warning[SC2154]: p_lcl_packages is referenced but not assigned. # 455| find_area non-free-firmware nff "$distribution" "$p_nff_binary" "$p_nff_packages" # 456| find_area non-free nf "$distribution" "$p_nf_binary" "$p_nf_packages" # 457|-> find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 458| # 459| echo -n ' Error: SHELLCHECK_WARNING: [#def154] /usr/libexec/dpkg/methods/media/setup:459:6: warning[SC3037]: In POSIX sh, echo flags are undefined. # 457| find_area local lcl local "$p_lcl_binary" "$p_lcl_packages" # 458| # 459|-> echo -n ' # 460| Hit RETURN to continue. ' # 461| read response Error: SHELLCHECK_WARNING (CWE-457): [#def155] /usr/libexec/dpkg/methods/media/setup:470:30: warning[SC2154]: main_packages is referenced but not assigned. # 468| outputparam p_hierbase "$hierbase" # 469| outputparam p_usedevel "$usedevel" # 470|-> outputparam p_main_packages "$main_packages" # 471| outputparam p_main_binary "$main_binary" # 472| outputparam p_main_disk "$main_disk" Error: SHELLCHECK_WARNING (CWE-457): [#def156] /usr/libexec/dpkg/methods/media/setup:471:28: warning[SC2154]: main_binary is referenced but not assigned. # 469| outputparam p_usedevel "$usedevel" # 470| outputparam p_main_packages "$main_packages" # 471|-> outputparam p_main_binary "$main_binary" # 472| outputparam p_main_disk "$main_disk" # 473| outputparam p_ctb_packages "$ctb_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def157] /usr/libexec/dpkg/methods/media/setup:472:26: warning[SC2154]: main_disk is referenced but not assigned. # 470| outputparam p_main_packages "$main_packages" # 471| outputparam p_main_binary "$main_binary" # 472|-> outputparam p_main_disk "$main_disk" # 473| outputparam p_ctb_packages "$ctb_packages" # 474| outputparam p_ctb_binary "$ctb_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def158] /usr/libexec/dpkg/methods/media/setup:473:29: warning[SC2154]: ctb_packages is referenced but not assigned. # 471| outputparam p_main_binary "$main_binary" # 472| outputparam p_main_disk "$main_disk" # 473|-> outputparam p_ctb_packages "$ctb_packages" # 474| outputparam p_ctb_binary "$ctb_binary" # 475| outputparam p_ctb_disk "$ctb_disk" Error: SHELLCHECK_WARNING (CWE-457): [#def159] /usr/libexec/dpkg/methods/media/setup:474:27: warning[SC2154]: ctb_binary is referenced but not assigned. # 472| outputparam p_main_disk "$main_disk" # 473| outputparam p_ctb_packages "$ctb_packages" # 474|-> outputparam p_ctb_binary "$ctb_binary" # 475| outputparam p_ctb_disk "$ctb_disk" # 476| outputparam p_nff_packages "$nff_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def160] /usr/libexec/dpkg/methods/media/setup:475:25: warning[SC2154]: ctb_disk is referenced but not assigned. # 473| outputparam p_ctb_packages "$ctb_packages" # 474| outputparam p_ctb_binary "$ctb_binary" # 475|-> outputparam p_ctb_disk "$ctb_disk" # 476| outputparam p_nff_packages "$nff_packages" # 477| outputparam p_nff_binary "$nff_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def161] /usr/libexec/dpkg/methods/media/setup:476:29: warning[SC2154]: nff_packages is referenced but not assigned. # 474| outputparam p_ctb_binary "$ctb_binary" # 475| outputparam p_ctb_disk "$ctb_disk" # 476|-> outputparam p_nff_packages "$nff_packages" # 477| outputparam p_nff_binary "$nff_binary" # 478| outputparam p_nff_disk "$nff_disk" Error: SHELLCHECK_WARNING (CWE-457): [#def162] /usr/libexec/dpkg/methods/media/setup:477:27: warning[SC2154]: nff_binary is referenced but not assigned. # 475| outputparam p_ctb_disk "$ctb_disk" # 476| outputparam p_nff_packages "$nff_packages" # 477|-> outputparam p_nff_binary "$nff_binary" # 478| outputparam p_nff_disk "$nff_disk" # 479| outputparam p_nf_packages "$nf_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def163] /usr/libexec/dpkg/methods/media/setup:478:25: warning[SC2154]: nff_disk is referenced but not assigned. # 476| outputparam p_nff_packages "$nff_packages" # 477| outputparam p_nff_binary "$nff_binary" # 478|-> outputparam p_nff_disk "$nff_disk" # 479| outputparam p_nf_packages "$nf_packages" # 480| outputparam p_nf_binary "$nf_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def164] /usr/libexec/dpkg/methods/media/setup:479:28: warning[SC2154]: nf_packages is referenced but not assigned. # 477| outputparam p_nff_binary "$nff_binary" # 478| outputparam p_nff_disk "$nff_disk" # 479|-> outputparam p_nf_packages "$nf_packages" # 480| outputparam p_nf_binary "$nf_binary" # 481| outputparam p_nf_disk "$nf_disk" Error: SHELLCHECK_WARNING (CWE-457): [#def165] /usr/libexec/dpkg/methods/media/setup:480:26: warning[SC2154]: nf_binary is referenced but not assigned. # 478| outputparam p_nff_disk "$nff_disk" # 479| outputparam p_nf_packages "$nf_packages" # 480|-> outputparam p_nf_binary "$nf_binary" # 481| outputparam p_nf_disk "$nf_disk" # 482| outputparam p_lcl_packages "$lcl_packages" Error: SHELLCHECK_WARNING (CWE-457): [#def166] /usr/libexec/dpkg/methods/media/setup:481:24: warning[SC2154]: nf_disk is referenced but not assigned. # 479| outputparam p_nf_packages "$nf_packages" # 480| outputparam p_nf_binary "$nf_binary" # 481|-> outputparam p_nf_disk "$nf_disk" # 482| outputparam p_lcl_packages "$lcl_packages" # 483| outputparam p_lcl_binary "$lcl_binary" Error: SHELLCHECK_WARNING (CWE-457): [#def167] /usr/libexec/dpkg/methods/media/setup:482:29: warning[SC2154]: lcl_packages is referenced but not assigned. # 480| outputparam p_nf_binary "$nf_binary" # 481| outputparam p_nf_disk "$nf_disk" # 482|-> outputparam p_lcl_packages "$lcl_packages" # 483| outputparam p_lcl_binary "$lcl_binary" # 484| outputparam p_multi "$multi" Error: SHELLCHECK_WARNING (CWE-457): [#def168] /usr/libexec/dpkg/methods/media/setup:483:27: warning[SC2154]: lcl_binary is referenced but not assigned. # 481| outputparam p_nf_disk "$nf_disk" # 482| outputparam p_lcl_packages "$lcl_packages" # 483|-> outputparam p_lcl_binary "$lcl_binary" # 484| outputparam p_multi "$multi" # 485| outputparam p_multi_contentsfile "$multi_contentsfile" Error: SHELLCHECK_WARNING (CWE-457): [#def169] /usr/libexec/dpkg/methods/media/setup:485:35: warning[SC2154]: multi_contentsfile is referenced but not assigned. # 483| outputparam p_lcl_binary "$lcl_binary" # 484| outputparam p_multi "$multi" # 485|-> outputparam p_multi_contentsfile "$multi_contentsfile" # 486| # 487| mv shvar.$option.new shvar.$option Error: SHELLCHECK_WARNING (CWE-398): [#def170] /usr/libexec/dpkg/methods/media/update:43:4: error[SC1073]: Couldn't parse this test expression. Fix to allow more checks. # 41| done # 42| # 43|-> if [ $packages eq 0 ]; then # 44| echo ' # 45| No Packages files available, cannot update available packages list. Error: SHELLCHECK_WARNING (CWE-398): [#def171] /usr/libexec/dpkg/methods/media/update:43:16: error[SC1072]: Expected test to end here (don't wrap commands in []/[[]]). Fix any mentioned problems and try again. # 41| done # 42| # 43|-> if [ $packages eq 0 ]; then # 44| echo ' # 45| No Packages files available, cannot update available packages list. Error: SHELLCHECK_WARNING (CWE-563): [#def172] /usr/share/dpkg/sh/dpkg-error.sh:21:1: warning[SC2034]: COLOR_NORMAL appears unused. Verify use (or export if used externally). # 19| # 20| # Standard ANSI colors and attributes. # 21|-> COLOR_NORMAL='' # 22| COLOR_RESET='[0m' # 23| COLOR_BOLD='[1m' Error: SHELLCHECK_WARNING (CWE-563): [#def173] /usr/share/dpkg/sh/dpkg-error.sh:24:1: warning[SC2034]: COLOR_BLACK appears unused. Verify use (or export if used externally). # 22| COLOR_RESET='[0m' # 23| COLOR_BOLD='[1m' # 24|-> COLOR_BLACK='[30m' # 25| COLOR_RED='[31m' # 26| COLOR_GREEN='[32m' Error: SHELLCHECK_WARNING (CWE-563): [#def174] /usr/share/dpkg/sh/dpkg-error.sh:25:1: warning[SC2034]: COLOR_RED appears unused. Verify use (or export if used externally). # 23| COLOR_BOLD='[1m' # 24| COLOR_BLACK='[30m' # 25|-> COLOR_RED='[31m' # 26| COLOR_GREEN='[32m' # 27| COLOR_YELLOW='[33m' Error: SHELLCHECK_WARNING (CWE-563): [#def175] /usr/share/dpkg/sh/dpkg-error.sh:28:1: warning[SC2034]: COLOR_BLUE appears unused. Verify use (or export if used externally). # 26| COLOR_GREEN='[32m' # 27| COLOR_YELLOW='[33m' # 28|-> COLOR_BLUE='[34m' # 29| COLOR_MAGENTA='[35m' # 30| COLOR_CYAN='[36m' Error: SHELLCHECK_WARNING (CWE-563): [#def176] /usr/share/dpkg/sh/dpkg-error.sh:29:1: warning[SC2034]: COLOR_MAGENTA appears unused. Verify use (or export if used externally). # 27| COLOR_YELLOW='[33m' # 28| COLOR_BLUE='[34m' # 29|-> COLOR_MAGENTA='[35m' # 30| COLOR_CYAN='[36m' # 31| COLOR_WHITE='[37m' Error: SHELLCHECK_WARNING (CWE-563): [#def177] /usr/share/dpkg/sh/dpkg-error.sh:30:1: warning[SC2034]: COLOR_CYAN appears unused. Verify use (or export if used externally). # 28| COLOR_BLUE='[34m' # 29| COLOR_MAGENTA='[35m' # 30|-> COLOR_CYAN='[36m' # 31| COLOR_WHITE='[37m' # 32| COLOR_BOLD_BLACK='[1;30m' Error: SHELLCHECK_WARNING (CWE-563): [#def178] /usr/share/dpkg/sh/dpkg-error.sh:31:1: warning[SC2034]: COLOR_WHITE appears unused. Verify use (or export if used externally). # 29| COLOR_MAGENTA='[35m' # 30| COLOR_CYAN='[36m' # 31|-> COLOR_WHITE='[37m' # 32| COLOR_BOLD_BLACK='[1;30m' # 33| COLOR_BOLD_RED='[1;31m' Error: SHELLCHECK_WARNING (CWE-563): [#def179] /usr/share/dpkg/sh/dpkg-error.sh:32:1: warning[SC2034]: COLOR_BOLD_BLACK appears unused. Verify use (or export if used externally). # 30| COLOR_CYAN='[36m' # 31| COLOR_WHITE='[37m' # 32|-> COLOR_BOLD_BLACK='[1;30m' # 33| COLOR_BOLD_RED='[1;31m' # 34| COLOR_BOLD_GREEN='[1;32m' Error: SHELLCHECK_WARNING (CWE-563): [#def180] /usr/share/dpkg/sh/dpkg-error.sh:34:1: warning[SC2034]: COLOR_BOLD_GREEN appears unused. Verify use (or export if used externally). # 32| COLOR_BOLD_BLACK='[1;30m' # 33| COLOR_BOLD_RED='[1;31m' # 34|-> COLOR_BOLD_GREEN='[1;32m' # 35| COLOR_BOLD_YELLOW='[1;33m' # 36| COLOR_BOLD_BLUE='[1;34m' Error: SHELLCHECK_WARNING (CWE-563): [#def181] /usr/share/dpkg/sh/dpkg-error.sh:36:1: warning[SC2034]: COLOR_BOLD_BLUE appears unused. Verify use (or export if used externally). # 34| COLOR_BOLD_GREEN='[1;32m' # 35| COLOR_BOLD_YELLOW='[1;33m' # 36|-> COLOR_BOLD_BLUE='[1;34m' # 37| COLOR_BOLD_MAGENTA='[1;35m' # 38| COLOR_BOLD_CYAN='[1;36m' Error: SHELLCHECK_WARNING (CWE-563): [#def182] /usr/share/dpkg/sh/dpkg-error.sh:37:1: warning[SC2034]: COLOR_BOLD_MAGENTA appears unused. Verify use (or export if used externally). # 35| COLOR_BOLD_YELLOW='[1;33m' # 36| COLOR_BOLD_BLUE='[1;34m' # 37|-> COLOR_BOLD_MAGENTA='[1;35m' # 38| COLOR_BOLD_CYAN='[1;36m' # 39| COLOR_BOLD_WHITE='[1;37m' Error: SHELLCHECK_WARNING (CWE-563): [#def183] /usr/share/dpkg/sh/dpkg-error.sh:38:1: warning[SC2034]: COLOR_BOLD_CYAN appears unused. Verify use (or export if used externally). # 36| COLOR_BOLD_BLUE='[1;34m' # 37| COLOR_BOLD_MAGENTA='[1;35m' # 38|-> COLOR_BOLD_CYAN='[1;36m' # 39| COLOR_BOLD_WHITE='[1;37m' # 40| Error: SHELLCHECK_WARNING (CWE-563): [#def184] /usr/share/dpkg/sh/dpkg-error.sh:39:1: warning[SC2034]: COLOR_BOLD_WHITE appears unused. Verify use (or export if used externally). # 37| COLOR_BOLD_MAGENTA='[1;35m' # 38| COLOR_BOLD_CYAN='[1;36m' # 39|-> COLOR_BOLD_WHITE='[1;37m' # 40| # 41| setup_colors() Error: SHELLCHECK_WARNING (CWE-563): [#def185] /usr/share/dpkg/sh/dpkg-error.sh:63:5: warning[SC2034]: COLOR_INFO appears unused. Verify use (or export if used externally). # 61| if [ $USE_COLORS = yes ]; then # 62| COLOR_PROG="$COLOR_BOLD" # 63|-> COLOR_INFO="$COLOR_GREEN" # 64| COLOR_NOTICE="$COLOR_YELLOW" # 65| COLOR_WARN="$COLOR_BOLD_YELLOW" Error: SHELLCHECK_WARNING (CWE-563): [#def186] /usr/share/dpkg/sh/dpkg-error.sh:64:5: warning[SC2034]: COLOR_NOTICE appears unused. Verify use (or export if used externally). # 62| COLOR_PROG="$COLOR_BOLD" # 63| COLOR_INFO="$COLOR_GREEN" # 64|-> COLOR_NOTICE="$COLOR_YELLOW" # 65| COLOR_WARN="$COLOR_BOLD_YELLOW" # 66| COLOR_ERROR="$COLOR_BOLD_RED" Error: COMPILER_WARNING: [#def187] dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/mustlib.c:48:10: warning[-Walloc-size-larger-than=]: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 # 48 | return must_alloc(malloc(amount)); # | ^ /usr/include/stdlib.h: scope_hint: In member function 'initialsetup' /usr/include/stdlib.h:672:14: note: in a call to allocation function 'malloc' declared here # 672 | extern void *malloc (size_t __size) __THROW __attribute_malloc__ # | ^ # 46| # 47| void *m_malloc(size_t amount) { # 48|-> return must_alloc(malloc(amount)); # 49| } # 50| Error: COMPILER_WARNING (CWE-457): [#def188] dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/progress.c:52:22: warning[-Wmaybe-uninitialized]: 'MEM <unsigned char> [(struct progress *)&progress + 20B]' may be used uninitialized # 52 | if (!progress->on_tty) # | ^ dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/db-fsys-files.c: scope_hint: In function 'ensure_allinstfiles_available.part.0' dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/db-fsys-files.c:265:19: note: 'MEM <unsigned char> [(struct progress *)&progress + 20B]' was declared here # 265 | struct progress progress; # | ^ # 50| int cur_percent; # 51| # 52|-> if (!progress->on_tty) # 53| return; # 54| Error: COMPILER_WARNING (CWE-457): [#def189] dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/progress.c:57:21: warning[-Wmaybe-uninitialized]: 'progress.max' may be used uninitialized # 57 | cur_percent = (progress->cur * 100) / progress->max; # | ^ dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/db-fsys-files.c: scope_hint: In function 'ensure_allinstfiles_available.part.0' dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/db-fsys-files.c:265:19: note: 'progress.max' was declared here # 265 | struct progress progress; # | ^ # 55| progress->cur++; # 56| # 57|-> cur_percent = (progress->cur * 100) / progress->max; # 58| if (cur_percent <= progress->last_percent) # 59| return; Error: COMPILER_WARNING (CWE-457): [#def190] dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/progress.c:65:9: warning[-Wmaybe-uninitialized]: 'progress.text' may be used uninitialized # 65 | fputs(progress->text, stdout); # | ^ dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/db-fsys-files.c: scope_hint: In function 'ensure_allinstfiles_available.part.0' dpkg-1.22.11-build/dpkg-1.22.11/lib/dpkg/db-fsys-files.c:265:19: note: 'progress.text' was declared here # 265 | struct progress progress; # | ^ # 63| progress->last_percent = cur_percent; # 64| # 65|-> fputs(progress->text, stdout); # 66| /* TRANSLATORS: This is part of the progress output, it is a decimal # 67| * percentage. */ Error: CPPCHECK_WARNING (CWE-457): [#def191] dpkg-1.22.11-build/dpkg-1.22.11/src/query/main.c:765: warning[uninitvar]: Uninitialized variable: filename # 763| modstatdb_shutdown(); # 764| # 765|-> file_show(filename); # 766| # 767| return 0; Error: CPPCHECK_WARNING (CWE-476): [#def192] dpkg-1.22.11-build/dpkg-1.22.11/src/split/join.c:126: warning[nullPointer]: Possible null pointer dereference: refi # 124| internerr("empty deb part queue"); # 125| # 126|-> partlist = nfmalloc(sizeof(*partlist) * refi->maxpartn); # 127| for (i = 0; i < refi->maxpartn; i++) # 128| partlist[i] = NULL; Error: CPPCHECK_WARNING (CWE-476): [#def193] dpkg-1.22.11-build/dpkg-1.22.11/src/split/join.c:127: warning[nullPointer]: Possible null pointer dereference: refi # 125| # 126| partlist = nfmalloc(sizeof(*partlist) * refi->maxpartn); # 127|-> for (i = 0; i < refi->maxpartn; i++) # 128| partlist[i] = NULL; # 129| for (pq= queue; pq; pq= pq->nextinqueue) { Error: COMPILER_WARNING (CWE-457): [#def194] dpkg-1.22.11-build/dpkg-1.22.11/src/split/split.c: scope_hint: In function 'mksplit.isra' dpkg-1.22.11-build/dpkg-1.22.11/src/split/split.c:164:35: warning[-Wmaybe-uninitialized]: 'pkg' may be used uninitialized # 164 | version = versiondescribe(&pkg->available.version, vdew_nonambig); # | ^ dpkg-1.22.11-build/dpkg-1.22.11/src/split/split.c:62:25: note: 'pkg' was declared here # 62 | struct pkginfo *pkg; # | ^ # 162| # 163| pkg = deb_parse_control(file_src); # 164|-> version = versiondescribe(&pkg->available.version, vdew_nonambig); # 165| # 166| timestamp_str = getenv("SOURCE_DATE_EPOCH");
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-108.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | dpkg-1.22.11-1.fc42 |
store-results-to | /tmp/tmpzwjef5qz/dpkg-1.22.11-1.fc42.tar.xz |
time-created | 2024-11-12 23:40:10 |
time-finished | 2024-11-12 23:43:02 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpzwjef5qz/dpkg-1.22.11-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpzwjef5qz/dpkg-1.22.11-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |