X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/002b1bc46b18e9d309d337ddb15a6ccdfb6c9dde..920c367267398945ff48cac6ea7196f7151f181e:/test/integration/test-apt-get-update-unauth-warning diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning index f1515a9c8..d71569827 100755 --- a/test/integration/test-apt-get-update-unauth-warning +++ b/test/integration/test-apt-get-update-unauth-warning @@ -11,21 +11,27 @@ setupenvironment configarchitecture "i386" configcompression '.' 'gz' +echo 'Acquire::Progress::Ignore::ShowErrorText "false";' > rootdir/etc/apt/apt.conf.d/99show-no-ignore-errors.conf + # a "normal" package with source and binary buildsimplenativepackage 'foo' 'all' '2.0' setupaptarchive --no-update APTARCHIVE="$(readlink -f ./aptarchive)" -find "$APTARCHIVE/dists/unstable" -name '*Release*' -delete +find "$APTARCHIVE/dists/unstable" \( -name 'InRelease' -o -name 'Release.gpg' \) -delete +sed -i -n '/^SHA1:$/q;p' "${APTARCHIVE}/dists/unstable/Release" +testwarning aptget update + +rm -rf rootdir/var/lib/apt/lists +find "$APTARCHIVE/dists/unstable" -name '*Release*' -delete # update without authenticated files leads to warning testfailureequal "Get:1 file:$APTARCHIVE unstable InRelease Ign:1 file:$APTARCHIVE unstable InRelease - File not found Get:2 file:$APTARCHIVE unstable Release Err:2 file:$APTARCHIVE unstable Release - File not found + File not found - ${APTARCHIVE}/dists/unstable/Release (2: No such file or directory) Reading package lists... E: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. N: Updating such a repository securily is impossible and therefore disabled by default. @@ -37,47 +43,45 @@ testequal 'lock partial' ls rootdir/var/lib/apt/lists filesize() { - stat -c%s "$(aptget indextargets --no-release-info --format '$(URI)' "Created-By: $1" | cut -d'/' -f 3- ).gz" + local CREATEDBY="$1" + shift + stat -c%s "$(aptget indextargets --no-release-info --format '$(URI)' "Created-By: $CREATEDBY" "$@" | cut -d'/' -f 3- ).gz" } # allow override #aptget update --allow-insecure-repositories -o Debug::pkgAcquire::worker=1 #exit testwarningequal "Get:1 file:$APTARCHIVE unstable InRelease Ign:1 file:$APTARCHIVE unstable InRelease - File not found Get:2 file:$APTARCHIVE unstable Release Ign:2 file:$APTARCHIVE unstable Release - File not found Get:3 file:$APTARCHIVE unstable/main Sources Ign:3 file:$APTARCHIVE unstable/main Sources - File not found Get:4 file:$APTARCHIVE unstable/main i386 Packages Ign:4 file:$APTARCHIVE unstable/main i386 Packages - File not found -Get:5 file:$APTARCHIVE unstable/main Translation-en -Ign:5 file:$APTARCHIVE unstable/main Translation-en - File not found +Get:5 file:$APTARCHIVE unstable/main all Packages +Ign:5 file:$APTARCHIVE unstable/main all Packages +Get:6 file:$APTARCHIVE unstable/main Translation-en +Ign:6 file:$APTARCHIVE unstable/main Translation-en Get:3 file:$APTARCHIVE unstable/main Sources Ign:3 file:$APTARCHIVE unstable/main Sources - File not found Get:4 file:$APTARCHIVE unstable/main i386 Packages Ign:4 file:$APTARCHIVE unstable/main i386 Packages - File not found -Get:5 file:$APTARCHIVE unstable/main Translation-en -Ign:5 file:$APTARCHIVE unstable/main Translation-en - File not found +Get:5 file:$APTARCHIVE unstable/main all Packages +Ign:5 file:$APTARCHIVE unstable/main all Packages +Get:6 file:$APTARCHIVE unstable/main Translation-en +Ign:6 file:$APTARCHIVE unstable/main Translation-en Get:3 file:$APTARCHIVE unstable/main Sources Ign:3 file:$APTARCHIVE unstable/main Sources - File not found Get:4 file:$APTARCHIVE unstable/main i386 Packages Ign:4 file:$APTARCHIVE unstable/main i386 Packages - File not found -Get:5 file:$APTARCHIVE unstable/main Translation-en -Ign:5 file:$APTARCHIVE unstable/main Translation-en - File not found +Get:5 file:$APTARCHIVE unstable/main all Packages +Ign:5 file:$APTARCHIVE unstable/main all Packages +Get:6 file:$APTARCHIVE unstable/main Translation-en +Ign:6 file:$APTARCHIVE unstable/main Translation-en Get:3 file:$APTARCHIVE unstable/main Sources [$(filesize 'Sources') B] -Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages') B] -Get:5 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B] +Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages' 'Architecture: i386') B] +Get:5 file:$APTARCHIVE unstable/main all Packages [$(filesize 'Packages' 'Architecture: all') B] +Get:6 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B] Reading package lists... W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. N: Data from such a repository can not be authenticated and is therefore potentially dangerous to use.