* Break out t-reprepro-cfg.
* Introduce the variables `mir' and `etcapt' to many functions.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
t_archive_method=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.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 <<END
-Dir::Etc "$tmp/etc-apt";
+ mkdir $etcapt
+ cat >$etcapt/conf <<END
+Dir::Etc "$etcapt";
- export APT_CONFIG=$tmp/etc-apt/conf
+ export APT_CONFIG=$etcapt/conf
gpg --export Hannibal >han.pgp
fakeroot apt-key add <han.pgp
gpg --export Hannibal >han.pgp
fakeroot apt-key add <han.pgp
- mkdir $tmp/etc-apt/apt.conf.d
+ mkdir $etcapt/apt.conf.d
}
t-archive-none-reprepro () {
}
t-archive-none-reprepro () {
- local rrc=$tmp/mirror/conf
+ local mir=$tmp/mirror
+ local rrc=$mir/conf
- mkdir -p $tmp/mirror/pool/main
+ mkdir -p $mir/pool/main
exec 3>$rrc/distributions
exec 3>$rrc/distributions
local suite=${suitespec%%:*}
local sname=${suitespec#*:}
local suite=${suitespec%%:*}
local sname=${suitespec#*:}
- mkdir -p $tmp/mirror/dists
if [ $sname != $suite ]; then
if [ $sname != $suite ]; then
- rm -f $tmp/mirror/dists/$sname
- ln -s $suite $tmp/mirror/dists/$sname
+ rm -f $mir/dists/$sname
+ ln -s $suite $mir/dists/$sname
- --outdir $tmp/mirror \
- --basedir $tmp/mirror \
+ --outdir $mir \
+ --basedir $mir \