Package: debhelper
Version: 5.0.15
Severity: wishlist
Tags: patch

While packaging fish, I noticed that there were two copies of the
upstream changelog in /usr/share/doc/fish.  This was happening because
upstream's Makefile already installed the ChangeLog there.  The attached
patch checks for the upstream ChangeLog in /usr/share/doc/$package and
uses that if it exists instead of blindly installing the changelog from
the source tree.

James
-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (499, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-debil-3
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages debhelper depends on:
ii  binutils             2.16.1cvs20051214-1 The GNU assembler, linker and bina
ii  coreutils [fileutils 5.93-5              The GNU core utilities
ii  debconf-utils        1.4.67              debconf utilities
ii  dpkg-dev             1.13.11.1           package building tools for Debian
ii  file                 4.15-2              Determines file type using "magic"
ii  fileutils            5.93-5              The GNU file management utilities 
ii  html2text            1.3.2a-3            An advanced HTML to text converter
ii  perl                 5.8.7-10            Larry Wall's Practical Extraction 
ii  po-debconf           0.9.2               manage translated Debconf template

debhelper recommends no packages.

-- no debconf information

-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
diff -Nur debhelper-5.0.15/dh_installchangelogs 
debhelper-5.0.15.new/dh_installchangelogs
--- debhelper-5.0.15/dh_installchangelogs       2006-01-03 20:20:51.000000000 
-0500
+++ debhelper-5.0.15.new/dh_installchangelogs   2006-01-16 13:52:04.000000000 
-0500
@@ -110,8 +110,17 @@
                        $link_to='changelog.html';
                }
                else {
-                       doit("install","-o",0,"-g",0,"-p","-m644",
-                               
$upstream,"$tmp/usr/share/doc/$package/changelog");
+                       # Check whether upstream changelog has already been 
installed and use that.
+                       if (-e "$tmp/usr/share/doc/$package/$upstream") {
+                               doit("install","-o",0,"-g",0,"-p","-m644",
+                                       "$tmp/usr/share/doc/$package/$upstream",
+                                       
"$tmp/usr/share/doc/$package/changelog");
+                               
doit("rm","-f","$tmp/usr/share/doc/$package/$upstream");
+                       }
+                       else {
+                               doit("install","-o",0,"-g",0,"-p","-m644",
+                                       
$upstream,"$tmp/usr/share/doc/$package/changelog");
+                       }
                        $link_to='changelog';
                }
                if ($dh{K_FLAG}) {

Attachment: signature.asc
Description: Digital signature

Reply via email to