quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] quilt corrupts a patch with space in dirname


From: Jean Delvare
Subject: Re: [Quilt-dev] quilt corrupts a patch with space in dirname
Date: Wed, 24 Jan 2024 13:02:25 +0100
User-agent: Evolution 3.42.4

Hi Matěj,

On Tue, 2024-01-23 at 16:55 +0100, Matěj Cepl wrote:
> On Tue Jan 23, 2024 at 4:43 PM CET, Matěj Cepl wrote:
> > It looks also similar to
> > https://bugs.launchpad.net/ubuntu/+source/quilt/+bug/1993080, but
> > I have never found anything close to the “official” statement on
> > this situation from any site describing format of patches, so I
> > am not really sure what is The Right Thing™ to do.
> 
> https://www.gnu.org/software/diffutils/manual/html_node/Unusual-File-Names.html#Unusual%20File%20Names
> 
> Oh. Does it mean that I cannot use diff/patch/quilt for managing
> patches over Python (with Misc/NEWS.d/next/Core and Builtins/
> directory)?

This piece of documentation may be somewhat old. Recent versions of GNU
diff do properly quote file names which include a space, as seen in
this example:

$ echo one > "a b"
$ echo two > "c d"
$ diff -u "a b" "c d"
--- "a b"       2024-01-24 12:51:18.918115713 +0100
+++ "c d"       2024-01-24 12:51:24.026143153 +0100
@@ -1 +1 @@
-one
+two

GNU patch is also able to deal with quoted file names for quite some
time now.

As far as quilt is concerned, we try to quote file names which contain
a space whenever this is needed, but there may be a few unhandled
corner cases left.

You said you use the quilt-0.67-3.4 openSUSE package. It is missing 2
upstream fixes related to file name quoting:

https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=cff443d3d151b61b412e6c4fb6e5aa8619348efa
https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=557ff21dfaf6beb0b65b4a2568e4612c817ed90c

The first commit may fix your problem. If it helps, I offer to backport
these commits to the openSUSE Tumbleweed quilt package. Or we could
release a new version of quilt (version 0.67 is almost 2 years old
after all) and I would package that new version in Tumbleweed.

-- 
Jean Delvare
SUSE L3 Support



reply via email to

[Prev in Thread] Current Thread [Next in Thread]