X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib-reprepro;h=c304bf8c3c99ae6d257f6d84ecb124915ffdf5df;hp=87020444f8aa182614bc03e1ab9394f093fb1586;hb=8963f3d0cf1aa5478af5875a958a5129c0aff277;hpb=a88e7bbd4c9fda64ecd018a298684be2f625dc81 diff --git a/tests/lib-reprepro b/tests/lib-reprepro index 87020444..c304bf8c 100644 --- a/tests/lib-reprepro +++ b/tests/lib-reprepro @@ -4,24 +4,31 @@ t-reprepro () { t_archive_method=reprepro + t-reprepro-cfg +} + +t-reprepro-cfg () { + local etcapt=$tmp/etc-apt + local mir=$tmp/mirror + t-git-config dgit-distro.test-dummy.archive-query aptget: - t-git-config dgit-distro.test-dummy.mirror file://$tmp/mirror/ + t-git-config dgit-distro.test-dummy.mirror file://$mir/ - mkdir $tmp/etc-apt - cat >$tmp/etc-apt/conf <$etcapt/conf <han.pgp fakeroot apt-key add $rrc/distributions - local arch=`dpkg --print-architecture` + local arch; arch=`dpkg --print-architecture` for suitespec in $suitespecs; do local suite=${suitespec%%:*} local sname=${suitespec#*:} - mkdir $tmp/mirror/dists - rm -f $tmp/mirror/dists/$sname - ln -s $suite $tmp/mirror/dists/$sname + mkdir -p $mir/dists + if [ $sname != $suite ]; then + rm -f $mir/dists/$sname + ln -s $suite $mir/dists/$sname + fi cat >&3 <