From: Ian Jackson Date: Thu, 15 Dec 2016 00:54:21 +0000 (+0000) Subject: By default, generate a DEP-14 tag as well as a dgit archive/* tag X-Git-Tag: archive/debian/2.12~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=a99b94f7071fb3d3db2d679af5a736627ef10102;hp=2d8ed57a73f0b8cc4ca31e60f85b24d4f6437075 By default, generate a DEP-14 tag as well as a dgit archive/* tag Even in non-split-view quilt modes. Closes:#844129. This breaks one of the test suite test cases, so disable it there. Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 91f52da3..bb5db14a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ dgit (2.12~) unstable; urgency=medium instead. Closes:#844570. * Suppress some leftover debugging output from import-dsc. Closes:#847658. + * By default, generate a DEP-14 tag as well as a dgit archive/* + tag, even in non-split-view quilt modes. Closes:#844129. Test suite: * Provide and use stunt lintian and debuild, to avoid lintian diff --git a/dgit b/dgit index 1a23d1a7..7996227a 100755 --- a/dgit +++ b/dgit @@ -69,6 +69,8 @@ our $rmchanges; our $overwrite_version; # undef: not specified; '': check changelog our $quilt_mode; our $quilt_modes_re = 'linear|smash|auto|nofix|nocheck|gbp|dpm|unapplied'; +our $dodep14tag; +our $dodep14tag_re = 'want|no|always'; our $split_brain_save; our $we_are_responder; our $initiator_tempdir; @@ -3674,7 +3676,21 @@ sub push_tagwants ($$$$) { TfSuffix => '-maintview', View => 'maint', }; - } + } elsif ($dodep14tag eq 'no' ? 0 + : $dodep14tag eq 'want' ? access_cfg_tagformats_can_splitbrain + : $dodep14tag eq 'always' + ? (access_cfg_tagformats_can_splitbrain or fail < \&debiantag_maintview, + Objid => $dgithead, + TfSuffix => '-dgit', + View => 'dgit', + }; + }; foreach my $tw (@tagwants) { $tw->{Tag} = $tw->{TagFn}($cversion, access_nomdistro); $tw->{Tfn} = sub { $tfbase.$tw->{TfSuffix}.$_[0]; }; @@ -6095,6 +6111,15 @@ sub parseopts () { } elsif (m/^--overwrite=(.+)$/s) { push @ropts, $_; $overwrite_version = $1; + } elsif (m/^--dep14tag$/s) { + push @ropts, $_; + $dodep14tag= 'want'; + } elsif (m/^--no-dep14tag$/s) { + push @ropts, $_; + $dodep14tag= 'no'; + } elsif (m/^--always-dep14tag$/s) { + push @ropts, $_; + $dodep14tag= 'always'; } elsif (m/^--delayed=(\d+)$/s) { push @ropts, $_; push @dput, $_; @@ -6279,6 +6304,14 @@ if (!defined $quilt_mode) { $quilt_mode = $1; } +if (!defined $dodep14tag) { + local $access_forpush; + $dodep14tag = access_cfg('dep14tag', 'RETURN-UNDEF') // 'want'; + $dodep14tag =~ m/^($dodep14tag_re)$/ + or badcfg "unknown dep14tag setting \`$dodep14tag'"; + $dodep14tag = $1; +} + $need_split_build_invocation ||= quiltmode_splitbrain(); if (!defined $cleanmode) { diff --git a/dgit.1 b/dgit.1 index 33d24a95..63a70217 100644 --- a/dgit.1 +++ b/dgit.1 @@ -665,6 +665,24 @@ By default, dgit looks in the parent directory .BI --no-rm-on-error Do not delete the destination directory if clone fails. .TP +.BI --dep14tag +Generates a DEP-14 tag (eg +.BR debian/ \fIversion\fR) +as well as a dgit tag (eg +.BR archive/debian/ \fIversion\fR) +where possible. This is the default. +.TP +.BI --no-dep14tag +Do not generate a DEP-14 tag, except in split quilt view mode. +(On servers where only the old tag format is supported, +the dgit tag will have the DEP-14 name. +This option does not prevent that.) +.TP +.BI --dep14tag-always +Insist on generating a DEP-14 tag +as well as a dgit tag. +If the server does not support that, dgit push will fail. +.TP .BI -D Prints debugging information to stderr. Repeating the option produces more output (currently, up to -DDDD is meaningfully different). @@ -999,6 +1017,8 @@ or when pushing and .TP .BI dgit-distro. distro .dgit-tag-format .TP +.BR dgit-distro. \fIdistro\fR .dep14tag " " want | no | always +.TP .BI dgit-distro. distro .ssh .TP .BI dgit-distro. distro .sshpsql-dbname diff --git a/tests/tests/trustingpolicy-replay b/tests/tests/trustingpolicy-replay index 8cc205ce..2039ec6c 100755 --- a/tests/tests/trustingpolicy-replay +++ b/tests/tests/trustingpolicy-replay @@ -4,6 +4,8 @@ set -e t-tstunt-parsechangelog +t-git-config dgit.default.dep14tag no + t-dsd t-policy dgit-repos-policy-trusting t-prep-newpackage example 1.0