+debhelper (1.2.19) unstable; urgency=low
+
+ * dh_listpackages: new command. Takes the standard options taken by other
+ debhelper commands, and just outputs a list of the binary packages a
+ debhelper command would act on. Added because of bug #30626, and because
+ of wn's truely ugly use of debhelper internals to get the same info (and
+ because it's just 4 lines of code ;-).
+ * dh_compress: is now smart about compressing files that are hardlinks.
+ When possible, will only compress one file, delete the hardlinks, and
+ re-make hardlinks to the compressed file, saving some disk space.
+
+ -- Joey Hess <joeyh@master.debian.org> Fri, 18 Dec 1998 22:26:41 -0500
+
debhelper (1.2.18) unstable; urgency=medium
* dh_fixperms: was not fixing permissions of files in usr/doc/ to 644,
#!/usr/bin/perl -w
#
-# Clean up $TMP and other tepmorary files generated by the
+# Clean up $TMP and other tepmorary files generated by the
# build process.
BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
}
@files=@new;
}
+
+ # Look for files with hard links. If we are going to compress both,
+ # we can preserve the hard link across the compression and save
+ # space in the end.
+ foreach (@files) {
+ ($dev, $inode, undef, $nlink)=stat($_);
+ if ($nlink > 1) {
+ @{$hardlinks{$_}}=($dev,$inode);
+ }
+ }
+ # TODO: with the info we have now, we could remove the hard link files
+ # from the list of files to compress and save some time.
if (@files) {
doit("gzip","-9f",@files);
}
+
+ # Now change over any files we can that used to be hard links so
+ # they are again.
+ my $old_dev='';
+ my $old_inode='';
+ my $old_fn='';
+ foreach (sort keys %hardlinks) {
+ if ($hardlinks{$_}[0] eq $old_dev &&
+ $hardlinks{$_}[1] eq $old_inode) {
+ doit("rm","-f","$_.gz");
+ doit("ln","$old_fn.gz","$_.gz");
+ }
+ $old_dev=$hardlinks{$_}[0];
+ $old_inode=$hardlinks{$_}[1];
+ $old_fn=$_;
+ }
chdir($olddir);
* all commands should print a warning message if non-cumulative parameters
are given more than once (ie, two -u's to dh_gencontrol). (#22588)
(Bug currently under dispute, I think this is bogus).
-* dh_compress doesn't preserve hard links
Wishlist items: