chiark / gitweb /
New --distro option (helps with unknown suites).
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 22 Aug 2013 13:45:18 +0000 (14:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 22 Aug 2013 13:45:18 +0000 (14:45 +0100)
TODO [deleted file]
debian/changelog
dgit
dgit.1

diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index 00d8337..0000000
--- a/TODO
+++ /dev/null
@@ -1 +0,0 @@
-distro option
index fea1dd499b7af3866bbecb6e05f1dea394812c77..797db8a4a929eabc3a3a33eaff468c6b25b69560 100644 (file)
@@ -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.
   * 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 <ijackson@chiark.greenend.org.uk>  Thu, 22 Aug 2013 13:36:44 +0100
   * Bugfixes.
 
  -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Thu, 22 Aug 2013 13:36:44 +0100
diff --git a/dgit b/dgit
index 93fb6fcd2a47beff177cab661b9a316ef2046958..940c89b5cb608c1cf69e046a6659b4ecf8d68b32 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -28,6 +28,7 @@ use Dpkg::Version;
 use POSIX;
 
 our $isuite = 'unstable';
 use POSIX;
 
 our $isuite = 'unstable';
+our $idistro;
 our $package;
 
 our $sign = 1;
 our $package;
 
 our $sign = 1;
@@ -246,7 +247,7 @@ sub access_distro () {
 
 sub access_cfg (@) {
     my (@keys) = @_;
 
 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;
     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;
                push @$om, $2;
            } elsif (m/^--existing-package=(.*)/s) {
                $existing_package = $1;
+           } elsif (m/^--distro=(.*)/s) {
+               $idistro = $1;
            } else {
                badusage "unknown long option \`$_'";
            }
            } else {
                badusage "unknown long option \`$_'";
            }
@@ -994,6 +997,8 @@ sub parseopts () {
                    $new_package=1;
                } elsif (s/^-c(.*=.*)//s) {
                    push @git, '-c', $1;
                    $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) {
                } elsif (s/^-C(.*)//s) {
                    $changesfile = $1;
                } elsif (s/^-k(.*)//s) {
diff --git a/dgit.1 b/dgit.1
index 9b3ffb2cb517756bd4304b2f396fc9bf5fade3d6..28ec02ee9f6854a8e1a9c8c943a467dd8869c9e8 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -321,6 +321,27 @@ or
 .BR mergechanges .
 Can be repeated as necessary.
 .TP
 .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
 .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