]>
git.saurik.com Git - apt.git/blob - test/integration/test-disappearing-packages
4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
"i386"
9 buildsimplenativepackage
"old-pkg" "i386" "1.0" "stable"
10 buildsimplenativepackage
"unrelated" "all" "0.5" "unstable"
12 setupsimplenativepackage
"new-pkg" "i386" "2.0" "unstable" "Provides: old-pkg
14 Conflicts: old-pkg (<< 2.0)"
15 local BUILDDIR
="incoming/new-pkg-2.0"
16 echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian
/new
-pkg.links
17 buildpackage
"$BUILDDIR" "unstable" "main"
20 setupsimplenativepackage
"old-pkg" "all" "2.0" "unstable" "Depends: new-pkg"
21 local BUILDDIR
="incoming/old-pkg-2.0"
22 echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian
/old
-pkg.links
25 rm -rf debian/old-pkg/usr/share/doc/old-pkg/
26 dh_link" >> ${BUILDDIR}/debian
/rules
27 buildpackage
"$BUILDDIR" "unstable" "main"
32 aptget
install old
-pkg=1.0 --trivial-only -qq 2>&1 > /dev
/null
34 testmarkedauto
# old-pkg is manual installed
36 local CMD
="aptget dist-upgrade -y -q=0"
37 msgtest
"Test for equality of" "$CMD"
38 local COMPAREFILE
=$(mktemp)
39 echo "The following package disappeared from your system as
40 all files have been overwritten by other packages:
42 Note: This is done automatic and on purpose by dpkg." > $COMPAREFILE
43 $CMD 2>&1 | tail -n 4 | diff $COMPAREFILE - && msgpass
|| msgfail
46 sed -i rootdir
/var
/log
/apt
/history.log
-e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d'
47 testfileequal
"rootdir/var/log/apt/history.log" "
48 Install: old-pkg:i386 (1.0)
50 Install: new-pkg:i386 (2.0, automatic)
51 Upgrade: old-pkg:i386 (1.0, 2.0)
52 Disappeared: old-pkg (1.0)"
54 testmarkedauto
# new-pkg should have get the manual flag from old-pkg