for METH in $(find $OLDMETHODS ! -type d); do
ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
done
-rm $NEWMETHODS/file
-cat >$NEWMETHODS/file <<EOF
+rm "${NEWMETHODS}/file" "${NEWMETHODS}/http"
+cat >"${NEWMETHODS}/file" <<EOF
#!/bin/sh
while read line; do
echo "\$line"
if [ -z "\$line" ]; then
sleep 0.5
fi
-done | $OLDMETHODS/file
+done | "$OLDMETHODS/\${0##*/}"
EOF
-chmod +x $NEWMETHODS/file
+chmod +x "${NEWMETHODS}/file"
+ln -s "${NEWMETHODS}/file" "${NEWMETHODS}/http"
tworepos() {
msgtest "Downloading the same repository twice over $1" "$3"
testsuccess --nomsg aptget update -o Debug::pkgAcquire::Worker=1
cp rootdir/tmp/testsuccess.output download.log
#cat download.log
- aptget files --format '$(FILENAME)' --no-release-info | sort > file.lst
+ aptget indextargets --format '$(FILENAME)' --no-release-info | sort > file.lst
testequal "$(find $(readlink -f ./rootdir/var/lib/apt/lists) -name '*_dists_*' \( ! -name '*InRelease' \) -type f | sort)" cat file.lst
testsuccess aptcache policy
testequal "foo:
Installed: (none)
Candidate: 1.0
Version table:
- 1.0 0
+ 1.0 500
500 $1:$2 jessie/main amd64 Packages
500 $1:$2 stable/main amd64 Packages" aptcache policy foo
testfailure aptcache show foo/unstable