summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-progress-fd-conffile
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-28 00:31:01 +0100
committerMichael Vogt <mvo@debian.org>2013-12-28 00:31:01 +0100
commit35ac30ee373c5ed84d7c2c5a701ac2d54963504d (patch)
tree59da7e2385b396052c4f53ac187d520c00d2790c /test/integration/test-apt-progress-fd-conffile
parente5c2b7e8a5455e1dc6993ef9e151b3845fb53c60 (diff)
parentc035b6552ba4bd1c6fba5fd8f8d829c2efbefe3c (diff)
Merge branch 'debian/sid' into bugfix/bts731738-fancy-progess
Conflicts: apt-pkg/install-progress.cc
Diffstat (limited to 'test/integration/test-apt-progress-fd-conffile')
-rwxr-xr-xtest/integration/test-apt-progress-fd-conffile43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/integration/test-apt-progress-fd-conffile b/test/integration/test-apt-progress-fd-conffile
new file mode 100755
index 000000000..0b42b1b2f
--- /dev/null
+++ b/test/integration/test-apt-progress-fd-conffile
@@ -0,0 +1,43 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'native'
+
+# old conffile
+setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable'
+BUILDDIR='incoming/compiz-core-1.0'
+mkdir -p ${BUILDDIR}/debian/compiz-core/etc
+echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
+echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
+buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
+rm -rf "$BUILDDIR"
+
+# new conffile
+setupsimplenativepackage 'compiz-core' 'native' '2.0' 'unstable'
+BUILDDIR='incoming/compiz-core-2.0'
+mkdir -p ${BUILDDIR}/debian/compiz-core/etc
+echo 'foo2=bar2;' > ${BUILDDIR}/compiz.conf
+echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
+buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
+rm -rf "$BUILDDIR"
+
+setupaptarchive
+
+testsuccess aptget install compiz-core=1.0
+
+# fake conffile change
+echo "meep" >> rootdir/etc/compiz.conf/compiz.conf
+
+# install
+exec 3> apt-progress.log
+echo n | aptget install compiz-core=2.0 -o APT::Status-Fd=3 -o Dpkg::Use-Pty=false
+
+# and ensure there is a conffile message in the file
+msgtest "Conffile prompt in apt-progress.log"
+grep -q "pmconffile:/etc/compiz.conf/compiz.conf" apt-progress.log && msgpass || (cat apt-progress.log && msgfail)
+
+cat apt-progress.log \ No newline at end of file