]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-get-update-unauth-warning
3 # ensure we print warnings for unauthenticated repositories
7 TESTDIR
=$(readlink -f $(dirname $0))
11 configarchitecture
"i386"
12 configcompression
'.' 'gz'
14 # a "normal" package with source and binary
15 buildsimplenativepackage
'foo' 'all' '2.0'
17 setupaptarchive
--no-update
19 APTARCHIVE
="$(readlink -f ./aptarchive)"
20 find "$APTARCHIVE/dists/unstable" -name '*Release*' -delete
22 # update without authenticated files leads to warning
23 testfailureequal
"Get:1 file:$APTARCHIVE unstable InRelease
24 Ign:1 file:$APTARCHIVE unstable InRelease
26 Get:2 file:$APTARCHIVE unstable Release
27 Err:2 file:$APTARCHIVE unstable Release
29 Reading package lists...
30 E: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file.
31 N: Updating such a repository securily is impossible and therefore disabled by default.
32 N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update
--no-allow-insecure-repositories -q=0
35 testsuccessequal
'Listing...' apt list foo
37 partial' ls rootdir
/var
/lib
/apt
/lists
42 stat
-c%s
"$(aptget indextargets --no-release-info --format '$(URI)' "Created
-By: $CREATEDBY" "$@
" | cut -d'/' -f 3- ).gz"
45 #aptget update --allow-insecure-repositories -o Debug::pkgAcquire::worker=1
47 testwarningequal
"Get:1 file:$APTARCHIVE unstable InRelease
48 Ign:1 file:$APTARCHIVE unstable InRelease
50 Get:2 file:$APTARCHIVE unstable Release
51 Ign:2 file:$APTARCHIVE unstable Release
53 Get:3 file:$APTARCHIVE unstable/main Sources
54 Ign:3 file:$APTARCHIVE unstable/main Sources
56 Get:4 file:$APTARCHIVE unstable/main i386 Packages
57 Ign:4 file:$APTARCHIVE unstable/main i386 Packages
59 Get:5 file:$APTARCHIVE unstable/main all Packages
60 Ign:5 file:$APTARCHIVE unstable/main all Packages
62 Get:6 file:$APTARCHIVE unstable/main Translation-en
63 Ign:6 file:$APTARCHIVE unstable/main Translation-en
65 Get:3 file:$APTARCHIVE unstable/main Sources
66 Ign:3 file:$APTARCHIVE unstable/main Sources
68 Get:4 file:$APTARCHIVE unstable/main i386 Packages
69 Ign:4 file:$APTARCHIVE unstable/main i386 Packages
71 Get:5 file:$APTARCHIVE unstable/main all Packages
72 Ign:5 file:$APTARCHIVE unstable/main all Packages
74 Get:6 file:$APTARCHIVE unstable/main Translation-en
75 Ign:6 file:$APTARCHIVE unstable/main Translation-en
77 Get:3 file:$APTARCHIVE unstable/main Sources
78 Ign:3 file:$APTARCHIVE unstable/main Sources
80 Get:4 file:$APTARCHIVE unstable/main i386 Packages
81 Ign:4 file:$APTARCHIVE unstable/main i386 Packages
83 Get:5 file:$APTARCHIVE unstable/main all Packages
84 Ign:5 file:$APTARCHIVE unstable/main all Packages
86 Get:6 file:$APTARCHIVE unstable/main Translation-en
87 Ign:6 file:$APTARCHIVE unstable/main Translation-en
89 Get:3 file:$APTARCHIVE unstable/main Sources [$(filesize 'Sources') B]
90 Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages' 'Architecture: i386') B]
91 Get:5 file:$APTARCHIVE unstable/main all Packages [$(filesize 'Packages' 'Architecture: all') B]
92 Get:6 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B]
93 Reading package lists...
94 W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file.
95 N: Data from such a repository can not be authenticated and is therefore potentially dangerous to use.
96 N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update
--allow-insecure-repositories -q=0
97 # ensure we can not install the package
98 testfailureequal
"WARNING: The following packages cannot be authenticated!
100 E: There were unauthenticated packages and -y was used without --allow-unauthenticated" aptget
install -qq -y foo