Package: quilt
Version: 0.67+really0.66-1
Severity: important
X-Debbugs-Cc: deb...@rocketjump.eu

Hi,

some patches imported by quilt may be patch series, which create a file in one
diff, but remove it again in another. In those cases quilt will correctly keep
the file from existing on `quilt push`. However, on `quilt pop` the spurious
file will be created. I have a minimal reproducer here:

---8<------8<------8<------8<------8<------8<------8<------8<------8<------8<---

23:01:22 [randall@batou:~/tmp] $ find
.
./tmp.patch
23:01:23 [randall@batou:~/tmp] $ cat tmp.patch 
--- /dev/null
+++ b/spurious_file
@@ -0,0 +1 @@
+some content here
--- a/spurious_file
+++ /dev/null
@@ -1 +0,0 @@
-some content here
23:01:28 [randall@batou:~/tmp] $ quilt import tmp.patch 
Importing patch tmp.patch (stored as tmp.patch)
23:01:32 [randall@batou:~/tmp] $ quilt push; quilt pop
Applying patch tmp.patch
patching file spurious_file
patching file spurious_file

Now at patch tmp.patch
Removing patch tmp.patch
Restoring spurious_file

No patches applied
23:01:39 [randall@batou:~/tmp] $ find
.
./.pc
./.pc/.version
./.pc/.quilt_series
./.pc/.quilt_patches
./spurious_file
./tmp.patch
./debian
./debian/patches
./debian/patches/tmp.patch
./debian/patches/series
23:01:43 [randall@batou:~/tmp] $ cat spurious_file 
some content here
23:01:48 [randall@batou:~/tmp] $ rm spurious_file 
23:03:07 [randall@batou:~/tmp] $ quilt push --refresh; quilt pop
Applying patch tmp.patch
patching file spurious_file
patching file spurious_file
Refreshed patch tmp.patch

Now at patch tmp.patch
Removing patch tmp.patch
Restoring spurious_file

No patches applied
23:03:23 [randall@batou:~/tmp] $ cat spurious_file 
some content here

---8<------8<------8<------8<------8<------8<------8<------8<------8<------8<---

As you can see above, "spurious_file" is created after `quilt push; quilt pop`,
even though it shouldn't exist (it's created on "pop"). This even persists when
refreshing the patch, where it should at least drop both diffs completely.

I've set the severity to important, as it breaks with the user's expectation,
and potentially could cause spurious files ending up in source packages that
shouldn't.

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-3-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages quilt depends on:
ii  bsdextrautils   2.38.1-4
ii  bzip2           1.0.8-5+b1
ii  diffstat        1.65-1
ii  ed              1.19-1
ii  gettext         0.21-11
ii  patch           2.7.6-7
ii  perl            5.36.0-7
ii  sensible-utils  0.0.17+nmu1

Versions of packages quilt recommends:
ii  less  590-1.1

Versions of packages quilt suggests:
pn  default-mta | mail-transport-agent  <none>
ii  graphviz                            2.42.2-7+b3
pn  procmail                            <none>

-- no debconf information

Reply via email to