| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
| |
The logic here was correct only with bpd = `..'.
Closes: #913259
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
squash!! dgit: import-dsc: Handle relative symlinks correctly
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
This may help a bit pending a fuller fix to #844206/#870496.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
This drops an indentation level. No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the second half of #904878.
When fetching we want to avoid downloading once again origs that are
already in `..', but not in bpd. So call the facility we now have for
making clones of things from `..' to bpd.
`..' might contain various junk. We try to treat it with a bit of
suspicion. In particular, when we have a dsc we know exactly which
orig files we are looking for.
So only try to link those. We don't do this transfer for debian
tarballs or diffs, or for origs that would be related according to
their filenames, but aren't in the dsc.
This maximises the probability that fetch will succeed even if there
is garbage in the `..'. (Garbage in the `..' will sometimes
unavoidably cause source builds to fail, because when doing a source
build we don't know what origs to expect.)
Closes: #904878
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is apropos of #904878.
When building we need to consider anything in .. that would
be (accordingg to its filename) a possible orig for the package we are
building, since we do not know what origs there are supposed to be,
and missing ones generate unhelpful error messages.
We `copy' things from .. to bpd, rather than just trying to use them
directly from .., because otherwise lots of other things won't work
right. For example, we might generate .dsc's in the bpd which expect
the files alongside, but without the files.
But we don't actually copy any files. We prefer to:
* If the thing in .. is a symlink, copy the link text, adjusting
it into an absolute link.
* If the thing in .. is a file, try to hardlink it, or failing
that make a symlink to it.
The result is that we never duplicate the file contents, but still,
where possible, we prefer to make the thing in bpd stand alone so that
if the `copy' in .. is deleted everything is still fine.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
No callers yet so no functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
Evidently I had forgotten that $b is weird in Perl and should not by
used for things other than sorting.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
We will want this in a moment. No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
And add a newline.
We will want this in a moment. No functional change.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Provide a new $ignmessage parameter to clean_tree_check_git and use
that. This makes it a bit easier to:
* Only print the additional message if the clean mode actually
honoured ignores. If it didn't then the problem is not `due
to missing .gitignore entries' because they would not have helped.
* Change all callers other than clean_tree_check_git_wd to
pass the empty string, so no other overall functional change.
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>
|
|
|
|
|
|
|
|
| |
This will make it convenient to add new suffix letter(s) to -wg.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
| |
We are going to have some ,... suffixes on this, so we need more
general matching.
No functional change with the current set of clean modes.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
In fetch/clone, and build. Others are less likely to be an irritating
problem.
Closes: #913648.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
| |
We are going to want to check the bpd (apropos of #913648), which
might be a relative path. We should fail quickly in this case.
No significant functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
This will break with older versions of pbuilder and cowbuilder,
unfortunately. That breakage can be worked around by passing dgit one
or both of the new options:
--pbuilder!:--no-source-only-changes
--cowbuilder!:--no-source-only-changes
Closes: #904862.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
Apropos of #904862.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
It's not -wdu/-wddu.
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>
|
|
|
|
|
|
| |
That would be an internal error.
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>
|
|
|
|
|
|
| |
This seems logically necessary and could help debug a clean target.
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>
|
|
|
|
|
|
|
|
| |
We are going to introduce more variants, so we need to refactor this.
No functionalk change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
This will make it easier to handle the other clean modes more clearly.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
This will make it easier to introduce new variants.
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>
|
|
|
|
|
|
| |
Code motion. No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
This will make it easier to introduce new variants.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
Nothing ever sets this to a trueish value. Abolish it.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Replace the open-coded $includedirty with the equivalent
building_source_in_playtree(), because the latter is what we actually
care about here.
2. Reformat into if blocks.
3. Introuce and call clean_tree_check (currently a no-op). Now,
writing clean_tree_check will be part of fixing #910705.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
This will allow us to extend the set of clean modes without causing
irresolvable compatibility problems for users.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
The config machinery now defends us from newlines.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
If we find something like this our regexp-based checking approaches
are likely to fail and other strange may will go wrong.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
Notably, d/source/format and options, and the forbidden files.
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>
|