[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] Potential quilt bug?
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] Potential quilt bug? |
Date: |
Tue, 19 Sep 2017 12:14:28 +0200 |
Hi Marty,
On lun., 2017-09-18 at 20:50 -0500, Marty E. Plummer wrote:
> Greetings.
>
> I've been using quilt primarily to generate patches for use with
> gentoo's portage tree, instead of the old proj-ver && proj-ver.new
> scheme.
>
> I just discovered what I believe to be a bug in quilt while fixing the
> dev-util/mingw64-runtime package so dev-libs/icu could be built against
> it. To replicate, the following steps must be taken:
>
> $ mkdir -p /tmp/work/patches
> $ cd /tmp/work
> $ tar xf bzip2-1.0.6.tar.gz
> $ cd bzip2-1.0.6/
> $ quilt new test.patch
> $ quilt edit README
> <insert some text, just to make a patch>
> $ quilt refresh
>
> At this point, you would normally expect test.patch to exist at
> /tmp/work/bzip2-1.0.6/patches, with the .pc database at
> /tmp/work/bzip2-1.0.6/.pc; instead, you will find that the patch ends up
> in /tmp/work/patches, and the database in /tmp/work/.pc !
This is the intended behavior. In order to be able to use quilt
anywhere in the working tree, there is a project's root discovery
mechanism. This is done by walking directories up towards the
filesystem root and stopping as soon as either .pc/ or patches/ is
found. If nothing is found then the current directory is assumed to be
your project's root.
In your case you created patches/ above your project root, but quilt
can't know that, so it considers that the projet's root must be the
directory containing patches/.
You can easily solve the problem by creating /tmp/work/bzip2-
1.0.6/patches/ manually before invoking "quilt new". Quilt will see it
before /tmp/work/patches/ and will thus consider /tmp/work/bzip2-1.0.6/
as the project's root.
There was once a project to create a new quilt command for the purpose,
but it was never implemented.
--
Jean Delvare
SUSE L3 Support