From 1957bfa6d464f8a331a82c19532d4d53c7b1e541 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 22 Aug 2013 14:45:18 +0100 Subject: New --distro option (helps with unknown suites). --- TODO | 1 - debian/changelog | 1 + dgit | 7 ++++++- dgit.1 | 21 +++++++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) delete mode 100644 TODO diff --git a/TODO b/TODO deleted file mode 100644 index 00d8337..0000000 --- a/TODO +++ /dev/null @@ -1 +0,0 @@ -distro option diff --git a/debian/changelog b/debian/changelog index fea1dd4..797db8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ dgit (0.4~~iwj) experimental; urgency=low * Better error checking when parsing RFC822-style control data. * Better checking that the supplied .dsc and debian/changes correspond. * Ordering improvement in push: don't add dsc field until git push done. + * New --distro option (helps with unknown suites). * Bugfixes. -- Ian Jackson Thu, 22 Aug 2013 13:36:44 +0100 diff --git a/dgit b/dgit index 93fb6fc..940c89b 100755 --- a/dgit +++ b/dgit @@ -28,6 +28,7 @@ use Dpkg::Version; use POSIX; our $isuite = 'unstable'; +our $idistro; our $package; our $sign = 1; @@ -246,7 +247,7 @@ sub access_distro () { sub access_cfg (@) { my (@keys) = @_; - my $distro = access_distro(); + my $distro = $idistro || access_distro(); my $value = cfg(map { ("dgit-distro.$distro.$_", "dgit.default.$_") } @keys); return $value; @@ -978,6 +979,8 @@ sub parseopts () { push @$om, $2; } elsif (m/^--existing-package=(.*)/s) { $existing_package = $1; + } elsif (m/^--distro=(.*)/s) { + $idistro = $1; } else { badusage "unknown long option \`$_'"; } @@ -994,6 +997,8 @@ sub parseopts () { $new_package=1; } elsif (s/^-c(.*=.*)//s) { push @git, '-c', $1; + } elsif (s/^-d(.*)//s) { + $idistro = $1; } elsif (s/^-C(.*)//s) { $changesfile = $1; } elsif (s/^-k(.*)//s) { diff --git a/dgit.1 b/dgit.1 index 9b3ffb2..28ec02e 100644 --- a/dgit.1 +++ b/dgit.1 @@ -321,6 +321,27 @@ or .BR mergechanges . Can be repeated as necessary. .TP +.BR -d "\fIdistro\fR | " --distro= \fIdistro\fR +Specifies that the suite to be operated on is part of distro +.IR distro . +This overrides the default value found from the git config option +.BR dgit-suite. \fIsuite\fR .distro . +The only effect is that other configuration variables (used +for accessing the archive and dgit-repos) used are +.BR dgit-distro. \fIdistro\fR .* . + +If your suite is part of a distro that dgit already knows about, you +can use this option to make dgit work even if your dgit doesn't know +about the suite. For example, specifying +.B -ddebian +will work when the suite is an unknown suite in the Debian archive. + +To define a new distro it is necessary to define methods and URLs +for fetching (and, for dgit push, altering) a variety of information both +in the archive and in dgit-repos. How to do this is not yet +documented, and currently the arrangements are unpleasant. See +BUGS. +.TP .BI -C changesfile Specifies the .changes file which is to be uploaded. By default dgit push looks for single .changes file in the parent directory whose -- cgit v1.2.3