chiark / gitweb /
dgit.git
5 years agogit-debrebase: New feature `scrap'
Ian Jackson [Sat, 4 Aug 2018 12:40:15 +0000 (13:40 +0100)]
git-debrebase: New feature `scrap'

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: gdr-import-dgitview: Actually test convert-from-dgitview
Ian Jackson [Sat, 4 Aug 2018 11:02:21 +0000 (12:02 +0100)]
test suite: gdr-import-dgitview: Actually test convert-from-dgitview

This was always my intention with this test, of course.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Provide new convert-from-dgit-view operation.
Ian Jackson [Sat, 4 Aug 2018 11:01:50 +0000 (12:01 +0100)]
git-debrebase: Provide new convert-from-dgit-view operation.

The output is, unavoidably, not very pretty.

Closes:#905322.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Support --dgit option for finding dgit
Ian Jackson [Sat, 4 Aug 2018 10:18:29 +0000 (11:18 +0100)]
git-debrebase: Support --dgit option for finding dgit

Nothing uses this yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: gdr-import-dgitview: New test for dgit dsc imports
Ian Jackson [Sat, 4 Aug 2018 09:44:59 +0000 (10:44 +0100)]
test suite: gdr-import-dgitview: New test for dgit dsc imports

So far this just tests the bugfixes I've just done.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Improve error message formatting from $bomb in walk
Ian Jackson [Sat, 4 Aug 2018 09:42:42 +0000 (10:42 +0100)]
git-debrebase: Improve error message formatting from $bomb in walk

The : and ; were messed up.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Properly reject bare dgit dsc imports
Ian Jackson [Sat, 4 Aug 2018 09:35:58 +0000 (10:35 +0100)]
git-debrebase: Properly reject bare dgit dsc imports

A bare dgit dsc import is not a legal gdr branch, because the main
merge contains debian/patches/.  So it cannot be processed without
conversion.

Previously an attempt to launder such a branch would crash with a
stack trace, although keycommits would falsely claim it was OK

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Have resolve_upstream_commit set @$tried first
Ian Jackson [Sat, 4 Aug 2018 06:52:38 +0000 (07:52 +0100)]
git-debrebase: Have resolve_upstream_commit set @$tried first

This allows a caller to know what tag name was successfully found,
by looking at $tried[-1];

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Break out resolve_upstream_version
Ian Jackson [Sat, 4 Aug 2018 06:39:11 +0000 (07:39 +0100)]
git-debrebase: Break out resolve_upstream_version

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: resolve_upstream_version: Rename $upstream_version
Ian Jackson [Sat, 4 Aug 2018 06:35:05 +0000 (07:35 +0100)]
git-debrebase: resolve_upstream_version: Rename $upstream_version

This used to be called $new_upstream_version but this function is
called in other contexts too.

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase; Refactor resolve_upstream_version to take upstream version
Ian Jackson [Fri, 3 Aug 2018 14:36:03 +0000 (15:36 +0100)]
git-debrebase; Refactor resolve_upstream_version to take upstream version

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Use upstreamversion rather than open-coding
Ian Jackson [Fri, 3 Aug 2018 13:11:05 +0000 (14:11 +0100)]
git-debrebase: Use upstreamversion rather than open-coding

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Move upstreamversion from dgit
Ian Jackson [Fri, 3 Aug 2018 13:10:37 +0000 (14:10 +0100)]
Dgit.pm: Move upstreamversion from dgit

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Deconfuse argument orders of is_orig_file_of_p_v etc.
Ian Jackson [Fri, 3 Aug 2018 13:08:23 +0000 (14:08 +0100)]
Dgit.pm: Deconfuse argument orders of is_orig_file_of_p_v etc.

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Improve error message for unknown suite, to suggest -d
Ian Jackson [Fri, 3 Aug 2018 13:38:37 +0000 (14:38 +0100)]
dgit: Improve error message for unknown suite, to suggest -d

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Move is_orig_file_of_p_v and its dependencies from dgit
Ian Jackson [Fri, 3 Aug 2018 12:49:37 +0000 (13:49 +0100)]
Dgit.pm: Move is_orig_file_of_p_v and its dependencies from dgit

We want is_orig_file_of_p_v, so move it and all the things it depends
on.

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: factor out getoptions for subcommand
Ian Jackson [Fri, 3 Aug 2018 11:53:10 +0000 (12:53 +0100)]
git-debrebase: factor out getoptions for subcommand

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Provide print-unapplied-treeish subcommand.
Ian Jackson [Fri, 3 Aug 2018 11:18:00 +0000 (12:18 +0100)]
dgit: Provide print-unapplied-treeish subcommand.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Break out quilt_fakedsc2unapplied.
Ian Jackson [Fri, 3 Aug 2018 10:09:21 +0000 (11:09 +0100)]
dgit: Break out quilt_fakedsc2unapplied.

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Rename --dgit-view-save to --save-dgit-view, leaving an alias.
Ian Jackson [Fri, 3 Aug 2018 06:59:34 +0000 (07:59 +0100)]
dgit: Rename --dgit-view-save to --save-dgit-view, leaving an alias.

This name makes more sense.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Refactor %internal_object_save from $dgit_view_save
Ian Jackson [Fri, 3 Aug 2018 06:55:31 +0000 (07:55 +0100)]
dgit: Refactor %internal_object_save from $dgit_view_save

Preparatory to allow saving other internal objects.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: editing a test script overrides DGIT_TESTS_PROGRESSIVE.
Ian Jackson [Fri, 3 Aug 2018 06:31:09 +0000 (07:31 +0100)]
test suite: editing a test script overrides DGIT_TESTS_PROGRESSIVE.

By making the script a dependency of the .ok stamp file.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Add t-tstunt-parsechangelog to many gdr tests.
Ian Jackson [Fri, 3 Aug 2018 06:29:52 +0000 (07:29 +0100)]
test suite: Add t-tstunt-parsechangelog to many gdr tests.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: start 6.5
Ian Jackson [Thu, 2 Aug 2018 07:31:30 +0000 (08:31 +0100)]
changelog: start 6.5

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: finalise 6.4 archive/debian/6.4 debian/6.4
Ian Jackson [Thu, 2 Aug 2018 07:24:52 +0000 (08:24 +0100)]
changelog: finalise 6.4

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase(1): Fix typo "unappled".
Ian Jackson [Thu, 2 Aug 2018 06:39:12 +0000 (07:39 +0100)]
git-debrebase(1): Fix typo "unappled".

Closes:#905064.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: start 6.4
Ian Jackson [Thu, 2 Aug 2018 02:48:03 +0000 (03:48 +0100)]
changelog: start 6.4

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: finalise 6.3 archive/debian/6.3 debian/6.3
Ian Jackson [Thu, 2 Aug 2018 02:46:24 +0000 (03:46 +0100)]
changelog: finalise 6.3

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Implement --help, providing a summary.
Ian Jackson [Tue, 31 Jul 2018 13:05:20 +0000 (14:05 +0100)]
git-debrebase: Implement --help, providing a summary.

Provide a usage message.

I'm not convinced an option summary here is a good idea, mainly there
aren't any really important options.  (-f will be advertised when it
is relevant.)  So I have just summarised the most important operations.

Closes:#904990.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit-maint-debrebase(7): Warn more against plain git rebase.
Ian Jackson [Tue, 31 Jul 2018 12:56:46 +0000 (13:56 +0100)]
dgit-maint-debrebase(7): Warn more against plain git rebase.

Specifically,
 - warn that pseudomerges must not be rebased over
 - warn and that git-rebase without a base should not be used
 - say to run gdr instead

Closes:#905004.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase(1): Warn against plain git rebase.
Ian Jackson [Tue, 31 Jul 2018 12:55:28 +0000 (13:55 +0100)]
git-debrebase(1): Warn against plain git rebase.

Re #905004.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase(5): Add ILLEGAL OPERATIONS section.
Ian Jackson [Tue, 31 Jul 2018 12:52:03 +0000 (13:52 +0100)]
git-debrebase(5): Add ILLEGAL OPERATIONS section.

Re #905004.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite; convert-from-gbp: test not identical in upstream files
Ian Jackson [Tue, 31 Jul 2018 12:40:47 +0000 (13:40 +0100)]
test suite; convert-from-gbp: test not identical in upstream files

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Improve error message for convert-from-gbp upstream discrepancy
Ian Jackson [Tue, 31 Jul 2018 12:37:39 +0000 (13:37 +0100)]
git-debrebase: Improve error message for convert-from-gbp upstream discrepancy

Closes:#905078.

I don't intend to print `small' diffs because I think that kind of
dwim is probably more annoying than helpful.

I don't intend to factor this kind of pattern out throughout because:
The messages for these commands are generally not the actual diff rune
dgit or gdr ran, for various reasons (notably that dgit/gdr often use
object hashes).  The result is that there is little duplication.

So I think the situation now is OK.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Improve error messages for bad options.
Ian Jackson [Tue, 31 Jul 2018 12:28:41 +0000 (13:28 +0100)]
git-debrebase: Improve error messages for bad options.

* GetOptions calls warn().  So we need a wrapper which disables
  or $SIG{__WARN__} (which prints a stack trace).
* Put the call to badusage in the wrapper.
* Change the messages to be clearer about what is meant.
* Add the program name to the badusage message.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: convert-from-gbp: Use same algorithm for finding upstream
Ian Jackson [Tue, 31 Jul 2018 12:16:53 +0000 (13:16 +0100)]
git-debrebase: convert-from-gbp: Use same algorithm for finding upstream

The version is in the changelog, and thus upstream commitish can then
be found from as new-upstream.

This also means we now give the same error message, which is much
better than the one we had before.

Closes:#905062.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Break out resolve_upstream_version (nfc)
Ian Jackson [Tue, 31 Jul 2018 08:21:47 +0000 (09:21 +0100)]
git-debrebase: Break out resolve_upstream_version (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: new-upstream: Fix handling of epochs.
Ian Jackson [Tue, 31 Jul 2018 09:21:57 +0000 (10:21 +0100)]
git-debrebase: new-upstream: Fix handling of epochs.

Dpkg::Version->version() is only the middle part.  ->epoch() doesn't
have the colon.  This is inconvenient enough that we convert it to a
string and use a regexp :-/.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: gdr-unprocessable: new test
Ian Jackson [Tue, 31 Jul 2018 08:13:55 +0000 (09:13 +0100)]
test suite: gdr-unprocessable: new test

Test git-debrebase messages about unprocessable commits.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: gdr-convert-gbp: Provide some unprocessable branches
Ian Jackson [Tue, 31 Jul 2018 08:12:52 +0000 (09:12 +0100)]
test suite: gdr-convert-gbp: Provide some unprocessable branches

We'll add a test which uses these, in a moment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: new-upstream: Fix error message for new version with bad syntax
Ian Jackson [Tue, 31 Jul 2018 08:09:35 +0000 (09:09 +0100)]
git-debrebase: new-upstream: Fix error message for new version with bad syntax

Calling
  new Dpkg::Version , check => 1
does not die or anything if it's wrong; it just returns undef.

The result is an error message about calling is_valid on an undefined
value.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: keycommits: Pass correct argument to fail
Ian Jackson [Tue, 31 Jul 2018 06:58:15 +0000 (07:58 +0100)]
git-debrebase: keycommits: Pass correct argument to fail

We got the array index wrong and would print HASH(0x55be4dba1f88) or
whatever.

Closes:#905003.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: walk: unprocessable: use fail, not die, and clean up
Ian Jackson [Tue, 31 Jul 2018 06:55:47 +0000 (07:55 +0100)]
git-debrebase: walk: unprocessable: use fail, not die, and clean up

Make this message like the one printed by $x->($fatal, ...) in
keycommits.  That is more consistent and also nicer.  There is no need
for the line number etc. either.

This is mentioned in #905003.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: start 6.3~
Ian Jackson [Sun, 29 Jul 2018 12:03:21 +0000 (13:03 +0100)]
changelog: start 6.3~

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: finalise 6.2 archive/debian/6.2 debian/6.2
Ian Jackson [Sun, 29 Jul 2018 12:00:06 +0000 (13:00 +0100)]
changelog: finalise 6.2

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit-maint-debrebase(7): fix command to just launder
Sean Whitton [Sun, 29 Jul 2018 09:52:38 +0000 (17:52 +0800)]
dgit-maint-debrebase(7): fix command to just launder

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agochangelog: document manpage updates (gbp dch)
Ian Jackson [Sun, 29 Jul 2018 10:08:30 +0000 (11:08 +0100)]
changelog: document manpage updates (gbp dch)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit-sponsorship(7): add references to push-source
Sean Whitton [Sun, 29 Jul 2018 07:00:59 +0000 (15:00 +0800)]
dgit-sponsorship(7): add references to push-source

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit-maint-gbp(7): update references to --*-dirty
Sean Whitton [Sun, 29 Jul 2018 07:00:43 +0000 (15:00 +0800)]
dgit-maint-gbp(7): update references to --*-dirty

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit-maint-gbp(7): discuss dgit.default.build-products-dir
Sean Whitton [Sun, 29 Jul 2018 07:00:25 +0000 (15:00 +0800)]
dgit-maint-gbp(7): discuss dgit.default.build-products-dir

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agomanpages: add references to pbuilder and cowbuilder
Sean Whitton [Sun, 29 Jul 2018 07:00:13 +0000 (15:00 +0800)]
manpages: add references to pbuilder and cowbuilder

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agomanpages: alioth->salsa
Sean Whitton [Sun, 29 Jul 2018 06:58:47 +0000 (14:58 +0800)]
manpages: alioth->salsa

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit build: Warn if --build-products-dir is not `..'.
Ian Jackson [Sun, 29 Jul 2018 04:31:37 +0000 (05:31 +0100)]
dgit build: Warn if --build-products-dir is not `..'.

Closes:#904859.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit(1): Improve and correct --build-products-dir description.
Ian Jackson [Sun, 29 Jul 2018 04:27:45 +0000 (05:27 +0100)]
dgit(1): Improve and correct --build-products-dir description.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Test dgit import-dsc --build-products-dir.
Ian Jackson [Sun, 29 Jul 2018 04:13:15 +0000 (05:13 +0100)]
test suite: Test dgit import-dsc --build-products-dir.

Add t-buildproductsdir-config to import-nonnative, which will do as a
test I think.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib-import-chk: Honour $bpd
Ian Jackson [Sun, 29 Jul 2018 04:06:15 +0000 (05:06 +0100)]
test suite: lib-import-chk: Honour $bpd

No functional change because none of the import tests set this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoRemove // from inside conditionals
Ian Jackson [Sun, 29 Jul 2018 03:51:02 +0000 (04:51 +0100)]
Remove // from inside conditionals

This idiom is terse, but quite confusing.  Instead, handle the undef
case explicitly.

While we are editing these:
 * Change two internal errors from die to confess
 * Fix a die in git-debrebase which ought to be badusage

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: start 6.2
Ian Jackson [Sun, 29 Jul 2018 02:55:52 +0000 (03:55 +0100)]
changelog: start 6.2

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: finalise 6.1 archive/debian/6.1 debian/6.1
Sean Whitton [Sat, 28 Jul 2018 12:14:29 +0000 (20:14 +0800)]
changelog: finalise 6.1

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agochangelog: close bug requesting pbuilder support
Sean Whitton [Sat, 28 Jul 2018 12:13:26 +0000 (20:13 +0800)]
changelog: close bug requesting pbuilder support

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit(1): replace use of 'recalled'
Sean Whitton [Sat, 28 Jul 2018 10:22:29 +0000 (18:22 +0800)]
dgit(1): replace use of 'recalled'

Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit(1): don't have pbuilder description refer to sbuild description
Sean Whitton [Sat, 28 Jul 2018 10:22:08 +0000 (18:22 +0800)]
dgit(1): don't have pbuilder description refer to sbuild description

Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agotest suite: add stubbed test for pbuilder subcommand
Sean Whitton [Fri, 27 Jul 2018 06:30:13 +0000 (14:30 +0800)]
test suite: add stubbed test for pbuilder subcommand

pbuilder requires root, but we want to be able to test the subcommand
outside of autopkgtest too.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agotest suite: add t-pushed-good-check-changes
Sean Whitton [Sat, 28 Jul 2018 04:26:04 +0000 (12:26 +0800)]
test suite: add t-pushed-good-check-changes

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agotest suite: add t-push-included
Sean Whitton [Sat, 28 Jul 2018 04:26:24 +0000 (12:26 +0800)]
test suite: add t-push-included

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodebian: suggest sbuild | pbuilder | cowbuilder
Sean Whitton [Fri, 27 Jul 2018 04:35:57 +0000 (12:35 +0800)]
debian: suggest sbuild | pbuilder | cowbuilder

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit(1): document new pbuilder and cowbuilder subcommands
Sean Whitton [Fri, 27 Jul 2018 02:48:30 +0000 (10:48 +0800)]
dgit(1): document new pbuilder and cowbuilder subcommands

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: move cmd_sbuild
Sean Whitton [Sat, 28 Jul 2018 10:18:36 +0000 (18:18 +0800)]
dgit: move cmd_sbuild

No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: new 'pbuilder' and 'cowbuilder' subcommands
Sean Whitton [Fri, 27 Jul 2018 04:35:12 +0000 (12:35 +0800)]
dgit: new 'pbuilder' and 'cowbuilder' subcommands

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: remove dead $need_split_build_invocation code path
Sean Whitton [Fri, 27 Jul 2018 02:08:57 +0000 (10:08 +0800)]
dgit: remove dead $need_split_build_invocation code path

No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: factor out build_with_binary_builder()
Sean Whitton [Fri, 27 Jul 2018 04:08:53 +0000 (12:08 +0800)]
dgit: factor out build_with_binary_builder()

The pbuilder and cowbuilder subcommands will reuse this code.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: fix a reference to parent directory
Sean Whitton [Fri, 27 Jul 2018 04:40:07 +0000 (12:40 +0800)]
dgit: fix a reference to parent directory

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: set $dscfn in build_or_push_prep_early()
Sean Whitton [Fri, 27 Jul 2018 02:51:55 +0000 (10:51 +0800)]
dgit: set $dscfn in build_or_push_prep_early()

No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: opts_opt_multi_cmd: New @$extra feature
Ian Jackson [Sat, 28 Jul 2018 02:58:32 +0000 (03:58 +0100)]
dgit: opts_opt_multi_cmd: New @$extra feature

Adjust the existing call sites.  NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoUpdate copyright years
Sean Whitton [Fri, 22 Jun 2018 07:04:35 +0000 (08:04 +0100)]
Update copyright years

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: start 6.1
Ian Jackson [Thu, 26 Jul 2018 13:47:08 +0000 (14:47 +0100)]
changelog: start 6.1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: finalise 6.0, and document remaining things archive/debian/6.0 debian/6.0
Ian Jackson [Thu, 26 Jul 2018 13:44:20 +0000 (14:44 +0100)]
changelog: finalise 6.0, and document remaining things

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: categorise, and add a few missing things
Sean Whitton [Thu, 26 Jul 2018 10:10:37 +0000 (18:10 +0800)]
changelog: categorise, and add a few missing things

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Abolish move_dsc_to_bpd
Ian Jackson [Thu, 26 Jul 2018 12:08:25 +0000 (13:08 +0100)]
dgit: Abolish move_dsc_to_bpd

This subroutine only has one caller.  It also contains a bit of
duplication both within itself and compared to its caller - the calls
to mv and its error handling - which is annoying to remove as it is.

Instead, put its code into build_source, and break out a private
subroutine $mv for the rename.

No functional change other than to messages.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Add t-buildproductsdir-config to some sbuild tests
Ian Jackson [Thu, 26 Jul 2018 12:01:55 +0000 (13:01 +0100)]
test suite: Add t-buildproductsdir-config to some sbuild tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoRevert "dgit: Move up $sourcechanges"
Ian Jackson [Thu, 26 Jul 2018 11:40:28 +0000 (12:40 +0100)]
Revert "dgit: Move up $sourcechanges"

This reverts commit 07437a3fe514da7990300b2fd594adff49685de5.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Move cmd_push_source down the file
Ian Jackson [Thu, 26 Jul 2018 11:41:50 +0000 (12:41 +0100)]
dgit: Move cmd_push_source down the file

Pure code motion.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Add a couple of t-buildproductsdir-config
Ian Jackson [Wed, 25 Jul 2018 04:34:26 +0000 (05:34 +0100)]
test suite: Add a couple of t-buildproductsdir-config

Add t-buildproductsdir-config to all build-modes tests and to
push-source.  This will probably catch almost all of the ../
bugs (#863582).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Use $bpd in several places where it is needed
Ian Jackson [Thu, 26 Jul 2018 06:28:59 +0000 (07:28 +0100)]
test suite: Use $bpd in several places where it is needed

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Provide a gbp.conf which sets --export-dir to $bpd
Ian Jackson [Thu, 26 Jul 2018 06:28:46 +0000 (07:28 +0100)]
test suite: Provide a gbp.conf which sets --export-dir to $bpd

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Introduce $bpd variable (nfc)
Ian Jackson [Thu, 26 Jul 2018 06:28:30 +0000 (07:28 +0100)]
test suite: Introduce $bpd variable (nfc)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite lib: add t-buildproductsdir-config
Sean Whitton [Tue, 24 Jul 2018 03:15:56 +0000 (11:15 +0800)]
test suite lib: add t-buildproductsdir-config

No users yet so NFC.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: push_source no longer cleans the tree.
Ian Jackson [Thu, 26 Jul 2018 10:16:54 +0000 (11:16 +0100)]
dgit: push_source no longer cleans the tree.

This is no longer needed because we always build in a playtree.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: build_source mostly uses a playtree, not $maindir
Ian Jackson [Thu, 26 Jul 2018 10:08:45 +0000 (11:08 +0100)]
dgit: build_source mostly uses a playtree, not $maindir

In particular, it uses a playtree unless we are trying to include
uncommitted changes in the source package (which is not supported in
split brain mode).

This change allows build_source to respect $buildproductsdir.  It will
also enable, later, building a source package from HEAD, or arbitrary
git ref, when the working tree is dirty.

This change also requires modifying build_prep to only conditionally
clean $maindir.  It should clean $maindir only when it's $maindir that
we're packing into a source package, or when we are running any
builder in $maindir.

When we are using a playtree we must build the changes file there too,
because dpkg-genchanges cannot be persuaded to look for the .dsc
anywhere but ../.

Right now build-source still cleans the tree needlessly.

We need to change the test suite to not expect a clean unless running
a builder:

dgit now cleans the tree only when including uncommitted changes in a
source package, and when running a builder in $maindir.  The code in
lib-build-modes does not test the including of uncommitted changes in
a source package.  Thus, it should expect the tree to be cleaned only
when running a builder.

Also, we need to not expect a clean with sbuild, for the same reason.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Drop alwayssplit tests
Ian Jackson [Thu, 26 Jul 2018 11:48:42 +0000 (12:48 +0100)]
test suite: Drop alwayssplit tests

Since
  dgit: make $need_split_build_invocation always true
this option has had no effect, so these tests are redundant.

And change the comment in dgit near the option parsing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: quilt-splitbrains: Drop non-wgf dpm test of gbp package
Ian Jackson [Thu, 26 Jul 2018 07:55:32 +0000 (08:55 +0100)]
test suite: quilt-splitbrains: Drop non-wgf dpm test of gbp package

Soon, dgit push-source will no longer clean the tree.  So this test
will be of no use.  Also, it will fail because the error message changes.

Delete it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: build_prep: Provide it with $wantsrc
Ian Jackson [Thu, 26 Jul 2018 09:36:01 +0000 (10:36 +0100)]
dgit: build_prep: Provide it with $wantsrc

No functional change yet as it doesn't use it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: build_source: drop call to build_prep
Ian Jackson [Thu, 26 Jul 2018 07:09:32 +0000 (08:09 +0100)]
dgit: build_source: drop call to build_prep

We want the callers to do this so they can control it better.  They
mostly already do.  In detail:

* cmd_push_source

  This one is most complicated.  It already calls prep_push, which
  does a variety of things which overlap with build_prep.  The things
  which are in build_prep but not in prep_push are:
   - notpushing (via build_prep_early), which seems to be a mistake
   - clean_tree(), which is needed, so we add it (for now...)
   - build_maybe_quilt_fixup, which is needed, so we add it
   - remove old changes, which is not actually needed

* cmd_build, cmd_gbp_build

  build_prep was already called by the if arm which didn't call
  build_source; so we can just move it up outside the if.  No
  functional change here.

* cmd_build_source, cmd_sbuild

  We need to replace the call.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: build_source: Drop call to build_prep_early
Ian Jackson [Thu, 26 Jul 2018 07:02:09 +0000 (08:02 +0100)]
dgit: build_source: Drop call to build_prep_early

build_prep starts with a call to build_prep_early so this is redundant
(and confusing).

Effect is to sometimes no longer duplicate some effort.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Abolish build_source_for_push
Ian Jackson [Thu, 26 Jul 2018 06:59:30 +0000 (07:59 +0100)]
dgit: Abolish build_source_for_push

This sub has only one caller and the indirection is not really
helpful IMO.

NFC.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: build_source_for_push does not try to unapply patches
Sean Whitton [Wed, 25 Jul 2018 11:36:52 +0000 (19:36 +0800)]
dgit: build_source_for_push does not try to unapply patches

build_source_for_push should now always build in a worktree, so
patches should never be applied dirtily to $maindir.  Die if it turns
out they were.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
5 years agodgit: Move up $sourcechanges
Ian Jackson [Thu, 26 Jul 2018 07:20:54 +0000 (08:20 +0100)]
dgit: Move up $sourcechanges

This is not really ideal, but cmd_push_source needs it.  For now do it
like this.  I may move cmd_push_source further down the file, later,
and then we can revert this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Support run-all -p, DGIT_TESTS_PROGRESSIVE
Ian Jackson [Thu, 26 Jul 2018 05:36:51 +0000 (06:36 +0100)]
test suite: Support run-all -p, DGIT_TESTS_PROGRESSIVE

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Drop dependency arrangement for tests/tmp
Ian Jackson [Thu, 26 Jul 2018 08:56:37 +0000 (09:56 +0100)]
test suite: Drop dependency arrangement for tests/tmp

run-all makes the directory now adays so this is not needed.  It's
going to be harmful for --progressive, since it would make make want
to rerun things every time tests/tmp/ is updated.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: run-all: Minor refactoring etc.
Ian Jackson [Thu, 26 Jul 2018 05:35:31 +0000 (06:35 +0100)]
test suite: run-all: Minor refactoring etc.

* Makefile: Move the DGIT_TEST_RETRY_COUNT if/else into the rule.
  This removes a small amount of duplication.

* run-all: Document the option to pass explicitly list of scripts.

* run-all: Add an option parser, which currently supports no options.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>