our $dryrun = 0;
our $changesfile;
our $new_package = 0;
+our $existing_package = 'dpkg';
our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
}
sub canonicalise_suite () {
- archive_query();
+ archive_query() or die;
}
sub get_archive_dsc () {
if (@ARGV==0) {
$suite = $clogp->{Distribution};
if ($new_package) {
- local ($package) = 'dpkg';
+ local ($package) = $existing_package; # this is a hack
canonicalise_suite();
}
} else {
my $clogp = parsechangelog();
$suite = $clogp->{Distribution};
$package = $clogp->{Source};
- canonicalise_suite();
runcmd_ordryrun
qw(git-buildpackage -us -uc --git-no-sign-tags),
'--git-builder=dpkg-buildpackage -i\.git/ -I.git',
$om->[0] = $2;
} elsif (m/^--(\w+):(.*)/s && ($om = $opts_opt_map{$1})) {
push @$om, $2;
+ } elsif (m/^--existing-package=(.*)/s) {
+ $existing_package = $1;
} else {
die "$_ ?";
}
Specifies the .changes file which is to be uploaded. By default
dgit push looks for single .changes file in the parent directory whose
filename suggests it is for the right package and version.
+.TP
+.BI --existing-package= package
+dgit push needs to canonicalise the suite name. But currently
+there is no way to ask the archive to do this without knowing the
+name of an existing package. Without --new we can just use the
+package we are trying to push. But with --new that will not work, so
+we guess that
+.B dpkg
+exists in the target suite. If it doesn't, you can use this option to
+specify a package which does. If the suite is empty, bad luck.
.SH CONFIGURATION
dgit looks at the following git config keys to control its behaviour.
You may set them with git-config (either in system-global or per-tree
field (and to specify that it is an RC bug for that field to refer
to an unavailable commit).
-dgit cannot currently introduce a package into a suite.
+The method of canonicalising suite names is bizarre. See the
+.B --existing-package
+option for one of the implication.s
dgit push should perhaps do `git push origin', or something similar,
by default.