| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
And hoist it into all callers. In fact there is only one caller that
doesn't have it already.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we might be doing quilt fixup, then the quilt fixup's attempt to
merge back into master might fail if there are uncommitted
debian/patches. So it is sometimes wrong to just not clean at all.
We don't want the behaviour to depend on the source package format,
and ideally not on the clean mode.
Also, the user may have forgotten to `git add', in which case they
will thank us for spotting their mistake.
In the original design table in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910705#56
says this for this case
/: disregarded
would be fine to delete but
** better to trip ? **
** want opt to disregard **
but this was not implemented at the time.
So implement that now.
I think I have concluded that with -wg and -wgf the right way to turn
these new failures into successes is to have a way to have the clean
actually done. If that is not wanted, one can say -wn instead.
This is particularly true given that ignoring the problem can produce
confusing failure, as seen in #914317.
So there will be a new --clean=git[-ff],always shortly.
Closes: #914317
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
We've dealt with all the cases now, so we can add the default.
Also, in the test suite.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
Handle this explicitly in the clean_tree_check conditional and in the
test suite.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
Document this, and handle it explicitly in the clean_tree_check
conditional and in the test suite.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would like to spot if the user forgot to `git add' a file.
This can be done by calling clean_tree_check_git, after rules
clean (if applicable).
We need to make this configurable. We do so via the clean mode, with
a comma-separated checking control suffix (and short aliases) like we
did for --clean=git,ignores.
The default should be cautious, ie to do this check, but often the
user will want to disable it because the source package has a buggy
clean target or no or insufficient .gitignore. Existing users should
probably get the new check until they choose otherwise (which we have
made easier for them with the .clean-mode-newer config option).
So we change the meanings of -wd and -wdd to include the new check,
and provide new build modes ...,no-check aka -wdn / -wddn to disable
it.
To implement this we introduce a new clean_tree_check_git_wd function
to do the actual work, particularly because both during cleaning and
cleanliness checking, we want to print some hints to the user if the
check fails.
We can't do the new check if we applied patches dirtily to run the
rules target, because it will trip over the result of patch
application. This way of working is just too poor to support this new
check.
The test suite generally tests the default versions, not the no-check
versions. We must teach the test to expect the new check. This is
most easily done with a separate case for the check side of the -wd
clean modes. And we need to support the no-check variant too,
because:
The push-source-with-changes test does in fact work with a built tree
and needs to test the no-check variant.
The gbp tests sometimes involve patch application. Rather than trying
to predict which of them do (in which cases there would be no clean
check), we force them all to ,no-check.
The oldnewtagalt test can use -wgf.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
Nothing sets this now so NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
This will make forthcoming change a less disruptive diff.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
This will make it easier to make the command vary.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This part of the fix for #910705. This makes -wc actually work with
build_source.
But per the discussion in #910705 we want to implement some checking
in dpkg-source[-d] mode too.
We need to teach the test suite about this notion of checking
cleanlines rather than cleaning. For now we wildcard C*.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
This speeds it up from about 105 seconds to about 90, on my laptop.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
It's not expected to work.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
No overall functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
To split the sbuild test out, we want this to be reusable.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
This updates "Test suite: When sbuild fails, do not crash", to arrange
that in this situation we do leave a message in the $bmlog, where it
will be reported (eg) by diff. This makes debugging less confusing in
cases where the log is indeed missing.
|
|
|
|
| |
This will allow other tests to check dgit sbuild.
|
|
|
|
|
| |
Teach bm-guess-e-source-e-targets about sbuild, so this knowledge can
be reused.
|
|
|
|
|
| |
Teach bm-guess-e-source-e-targets about dgit build-source, so this
knowledge can be reused.
|
|
|
|
|
| |
We are going to want to run some build modes tests on other exciting
trees.
|
|
|
|
|
|
|
|
|
| |
We are going to introduce this option soon. It is not supposed to
actually have very much overall effect, although it will replumb the
way dgit goes about making the source package.
So the tests are just the same as the normal tests only with the
additional option.
|
| |
|
|
|
|
|
|
| |
Soon, we are going to be stricter about detecting ambiguity about
which .changes file is intended when different build modes have been
used.
|
| |
|
| |
|
| |
|
|
run the right targets as expected (ie, that we are massaging the arguments to dpkg-buildpackage, and suppressing our clean target, etc., correctly).
|