summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit15
2 files changed, 16 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 594eada..29a7c26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ dgit (0.21~~iwj) unstable; urgency=low
with all the building methods.
* Refuse to do quilt fixup (explicitly or as a result of build).
Closes:#731632.
+ * Be able to clone or fetch from Debian backports suites (which are
+ a bit like main Debian suites but also a bit not like them).
--
diff --git a/dgit b/dgit
index bb1d217..a5736e1 100755
--- a/dgit
+++ b/dgit
@@ -457,6 +457,8 @@ our %defcfg = ('dgit.default.distro' => 'debian',
'dgit-distro.debian.sshpsql-dbname' => 'service=projectb',
'dgit-distro.debian.upload-host' => 'ftp-master', # for dput
'dgit-distro.debian.mirror' => 'http://ftp.debian.org/debian/',
+ 'dgit-distro.debian.backports-quirk' => '%-backports*',
+ 'dgit-distro.debian-backports.mirror' => 'http://backports.debian.org/debian-backports/',
'dgit-distro.test-dummy.ssh' => "$td/ssh",
'dgit-distro.test-dummy.username' => "alice",
'dgit-distro.test-dummy.git-check' => "ssh-cmd",
@@ -497,6 +499,17 @@ sub access_basedistro () {
sub access_quirk () {
# returns (quirk name, distro to use instead, quirk-specific info)
my $basedistro = access_basedistro();
+ my $backports_quirk = cfg("dgit-distro.$basedistro.backports-quirk",
+ 'RETURN-UNDEF');
+ if (defined $backports_quirk) {
+ my $re = $backports_quirk;
+ $re =~ s/[^-0-9a-z_\%*]/\\$&/ig;
+ $re =~ s/\*/.*/g;
+ $re =~ s/\%/([-0-9a-z_]+)/ or badcfg "backports-quirk needs \%";
+ if ($isuite =~ m/^$re$/) {
+ return ('backports',"$basedistro-backports",$1);
+ }
+ }
return ('none',$basedistro);
}
@@ -614,7 +627,7 @@ sub archive_query ($) {
my ($method) = @_;
my $query = access_cfg('archive-query','RETURN-UNDEF');
if (!defined $query) {
- my $distro = access_distro();
+ my $distro = access_basedistro();
if ($distro eq 'debian') {
$query = "sshpsql:".
access_someuserhost('sshpsql').':'.