[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Patch that should apply cleanly doesn't using gbp pq import



On Thu, Nov 20, 2025 at 02:05:01PM -0300, Aeliton G. Silva wrote:
I'm proceeding with my learning process of packaging a new upstream
version of python-lsp-server and a question came up:

Question A: What to do when gbp pq import/rebase fails applying a patch
that should apply cleanly? Can I just apply the patch using other means
(patch or git apply -3) and move on?

You can do anything that works for you as long as the resulting debian/patches is correct, as that's the only thing actually published.

Question B: And if a patch requires tweaking to apply, what is the
recommended procedure?

Rebasing the old patch-queue branch. If you don't have one, generate it with gbp pq import --time-machine=<something>.

More details about Question A:

The following steps were executed on debian/testing (forky), git
version is 2.51.0 and everything I did was:

1. Checkout the repo

debcheckout -a python-lsp-server
cd python-lsp-server

2. Make sure we have the branches locally, or gbp import-orig will
complain

git checkout pristine-tar
git checkout upstream
git checkout debian/master

gbp clone vcs-git:python-lsp-server

3. Get the new upstream version (v1.13.2)

gbp import-orig --pristine-tar --uscan

You don't need to pass --pristine-tar explicitly when debian/gbp.conf already enables it.


4. Rebase / import

gbp pq rebase



The step 4 fail to applying debian/patches/0002-Increase-test-
timeout.patch, which applies cleanly using either:

patch -p1 < debian/patches/0002-Increase-test-timeout.patch

No, it applies with fuzz.

or

git apply -3 debian/patches/0002-Increase-test-timeout.patch

Try without -3.

I've checked the sources of gbp and what it does to apply the patch is:

git apply --index --whitespace=fix debian/patches/0002-Increase-test-
timeout.patch

Which in my view should apply the patch cleanly, but I can't explain
why it doesn't.

It doesn't, because the patch cannot be applied cleanly.

--
WBR, wRAR

Attachment: signature.asc
Description: PGP signature


Reply to: