From ff7144ab274902514897ab18a76a37aced50b047 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 19 Jan 2014 01:58:32 +0000 Subject: [PATCH] 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). --- debian/changelog | 2 ++ dgit | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 594eadaa..29a7c26e 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 bb1d217e..a5736e1c 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').':'. -- 2.30.2