Package: quilt
Version: 0.46-7
Severity: normal

/usr/share/quilt/scripts/backup-files, in the function process_file(),
calls 'chmod 000 "$backup"' when adding a new file.  This seems like a
truly strange thing to do.  Quilt already detects when the original
file is empty and uses /dev/null as the old file in the diff.  Why
does it have to do a chmod 000 too?  This causes things that copy
source directories to fail because of the unreadable file.  For
example, the ICU package copies the extracted, patched source
directory so that it can build multiple ways.  The only reason I can
think of for the chmod 000 was as a defensive coding technique to make
sure the empty file was never read.  Even looking at
/usr/share/quilt/scripts/patchfns, I see no evidence that anything
cares whether the file is readable or not.  In fact, the patch file
generated is the same whether the file is initially empty or initially
non-existent.  Observe:

mkdir z
touch b
quilt new p1
quilt add a
quilt add b
echo test > a
echo test >> b
quilt refresh

Now, ls -l .pc/p1 shows

total 0
-rw-r--r-- 1 ejb ejb 0 Jun 27 09:25 .timestamp
---------- 1 ejb ejb 0 Jun 27 09:25 a
-rw-r--r-- 1 ejb ejb 0 Jun 27 09:25 b

and patches/p1 contains

Index: z/a
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ z/a 2009-06-27 09:25:25.093286073 -0400
@@ -0,0 +1 @@
+test
Index: z/b
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ z/b 2009-06-27 09:25:25.093286073 -0400
@@ -0,0 +1 @@
+test

So the chmod 000 seems entirely superfluous, and I believe it should
be removed.


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'experimental'), (200, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages quilt depends on:
ii  bzip2                         1.0.5-2    high-quality block-sorting file co
ii  diffstat                      1.47-1     produces graph of changes introduc
ii  gettext                       0.17-6     GNU Internationalization utilities
ii  patch                         2.5.9-5    Apply a diff file to an original

quilt recommends no packages.

Versions of packages quilt suggests:
ii  graphviz                     2.20.2-3+b2 rich set of graph drawing tools
ii  procmail                     3.22-16     Versatile e-mail processor

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to