Author: djpig
Date: 2007-07-01 13:57:58 +0000 (Sun, 01 Jul 2007)
New Revision: 827
Modified:
trunk/ChangeLog
trunk/debian/changelog
trunk/scripts/dpkg-source.pl
Log:
dpkg-source warns now about new empty files since those will
not be represented in the diff. Closes: #383394
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-06-30 23:35:58 UTC (rev 826)
+++ trunk/ChangeLog 2007-07-01 13:57:58 UTC (rev 827)
@@ -1,3 +1,8 @@
+2007-07-01 Frank Lichtenheld <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-source.pl: Warn that newly created empty files are
+ not currently represented in the diff.
+
2007-07-01 Ian Jackson <[EMAIL PROTECTED]>
* scripts/dpkg-source.pl: Don't remove setgid bits
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-06-30 23:35:58 UTC (rev 826)
+++ trunk/debian/changelog 2007-07-01 13:57:58 UTC (rev 827)
@@ -29,6 +29,8 @@
tar balls to match more the user's preferences instead of
ours or the ones from the originator of the tar ball. Patch
by Ian Jackson. Closes: #390915, #207289
+ * dpkg-source warns now about new empty files since those will
+ not be represented in the diff. Closes: #383394
[ Updated dselect translations ]
* French (Christian Perrier)
Modified: trunk/scripts/dpkg-source.pl
===================================================================
--- trunk/scripts/dpkg-source.pl 2007-06-30 23:35:58 UTC (rev 826)
+++ trunk/scripts/dpkg-source.pl 2007-07-01 13:57:58 UTC (rev 827)
@@ -510,6 +510,7 @@
$fn =~ s,^\./,,;
lstat("$dir/$fn") || &syserr(sprintf(_g("cannot stat file %s"),
"$dir/$fn"));
my $mode = S_IMODE((lstat(_))[2]);
+ my $size = (lstat(_))[7];
if (-l _) {
$type{$fn}= 'symlink';
checktype($origdir, $fn, '-l') || next;
@@ -526,13 +527,17 @@
if (!lstat("$origdir/$fn")) {
$! == ENOENT || &syserr(sprintf(_g("cannot stat orig file
%s"), "$origdir/$fn"));
$ofnread= '/dev/null';
- if( $mode & ( S_IXUSR | S_IXGRP | S_IXOTH ) ) {
- warning(sprintf(_g("executable mode %04o of '%s' will
not be represented in diff"), $mode, $fn))
- unless $fn eq 'debian/rules';
+ if( !$size ) {
+ warning(sprintf(_g("newly created empty file '%s' will
not be represented in diff"), $fn));
+ } else {
+ if( $mode & ( S_IXUSR | S_IXGRP | S_IXOTH ) ) {
+ warning(sprintf(_g("executable mode %04o of '%s'
will not be represented in diff"), $mode, $fn))
+ unless $fn eq 'debian/rules';
+ }
+ if( $mode & ( S_ISUID | S_ISGID | S_ISVTX ) ) {
+ warning(sprintf(_g("special mode %04o of '%s' will
not be represented in diff"), $mode, $fn));
+ }
}
- if( $mode & ( S_ISUID | S_ISGID | S_ISVTX ) ) {
- warning(sprintf(_g("special mode %04o of '%s' will not
be represented in diff"), $mode, $fn));
- }
} elsif (-f _) {
$ofnread= "$origdir/$fn";
} else {
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]