]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-604401-files-are-directories
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture "i386
"
10 test ! -e rootdir/etc/apt/apt.conf || mv rootdir/etc/apt/apt.conf rootdir/etc/apt/apt.conf.d/000move-away-apt.conf
12 msgtest "Directory instead of a
file as apt.conf ignored
"
13 mkdir -p rootdir/etc/apt/apt.conf
14 testsuccess --nomsg aptconfig dump
15 rmdir rootdir/etc/apt/apt.conf
17 msgtest "Good link instead of a
file as apt.conf ignored
"
18 echo 'Test::APT::Link "good
";' > rootdir/etc/apt/good-link.conf
19 ln -s rootdir/etc/apt/good-link.conf rootdir/etc/apt/apt.conf
20 test -n "$(aptconfig shell TestLink 'Test::APT::Link')" && msgfail || msgpass
21 rm rootdir/etc/apt/apt.conf
23 msgtest "Broken link instead of a
file as apt.conf ignored
"
24 ln -s /tmp/doesnt-exist rootdir/etc/apt/apt.conf
25 testsuccess --nomsg aptconfig dump
26 rm rootdir/etc/apt/apt.conf
29 test ! -e rootdir/etc/apt/sources.list || mv rootdir/etc/apt/sources.list rootdir/etc/apt/sources.list.d/000move-away-sources.list
31 msgtest "Directory instead of a
file as sources.list ignored
"
32 mkdir -p rootdir/etc/apt/sources.list
33 testsuccess --nomsg aptget update --print-uris
34 rmdir rootdir/etc/apt/sources.list
36 msgtest "Good link instead of a
file as sources.list ignored
"
37 echo 'deb file:///tmp/debian sid main' > rootdir/etc/apt/good-link.list
38 ln -s rootdir/etc/apt/good-link.list rootdir/etc/apt/sources.list
39 test -n "$(aptget update --print-uris)" && msgfail || msgpass
40 rm rootdir/etc/apt/sources.list
42 msgtest "Broken link instead of a
file as sources.list ignored
"
43 ln -s /tmp/doesnt-exist rootdir/etc/apt/sources.list
44 test -n "$(aptget update --print-uris)" && msgfail || msgpass
45 rm rootdir/etc/apt/sources.list
48 test ! -e rootdir/etc/apt/preferences || mv rootdir/etc/apt/preferences rootdir/etc/apt/preferences.d/000move-away-preferences
50 msgtest "Directory instead of a
file as preferences ignored
"
51 mkdir -p rootdir/etc/apt/preferences
52 testsuccess --nomsg aptcache policy
53 rmdir rootdir/etc/apt/preferences
55 msgtest "Good link instead of a
file as preferences ignored
"
58 Pin-Value: 1000' > rootdir/etc/apt/good-link.pref
59 ln -s rootdir/etc/apt/good-link.pref rootdir/etc/apt/preferences
60 test -n "$(aptcache policy | grep '1000 ')" && msgfail || msgpass
61 rm rootdir/etc/apt/preferences
63 msgtest "Broken link instead of a
file as preferences ignored
"
64 ln -s /tmp/doesnt-exist rootdir/etc/apt/preferences
65 testsuccess --nomsg aptcache policy
66 rm rootdir/etc/apt/preferences