Package: debhelper
Version: 8.9.3~bpo60+1
Severity: wishlist
Tags: patch

While splitting a package into smaller parts, I came accross a little
problem: the old package installed logcheck files, and I wanted to move
those to the new one, keeping the filename.

For logrotate, I could do this easily, as dh_installlogrotate supports a
--name option, so that my debian/$package.$name.logrotate gets installed
as /etc/logrotate.d/$name (instead of as $package). I wanted to do the
same with dh_installlogcheck, but unfortunately, that helper has no such
feature.

Attached below is a trivial patch that adds the option, along with
documentation (might need a little rewording, perhaps, but this is the
best I could do at the moment), against debhelper's git head.

-- System Information:
Debian Release: 6.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages debhelper depends on:
ii  binutils               2.20.1-16         The GNU assembler, linker and bina
ii  dpkg-dev               1.15.8.11         Debian package development tools
ii  file                   5.04-5            Determines file type using "magic"
ii  html2text              1.3.2a-15         advanced HTML to text converter
ii  man-db                 2.5.7-8           on-line manual pager
ii  perl                   5.10.1-17squeeze2 Larry Wall's Practical Extraction 
ii  perl-base              5.10.1-17squeeze2 minimal Perl system
ii  po-debconf             1.0.16+nmu1       tool for managing templates file t

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make                       0.55       tool that converts source archives

-- no debconf information

-- 
|8]

>From 2a580656d01355c7fcd52d3441362bc0d3daf166 Mon Sep 17 00:00:00 2001
From: Gergely Nagy <alger...@madhouse-project.org>
Date: Tue, 23 Aug 2011 20:36:57 +0200
Subject: [PATCH] dh_installlogcheck: Add support for --name.

This patch makes dh_installlogcheck be similar to other helpers, like
dh_installlogrotate that already support a --name option: to install
the files as if they were installed by a different package.

Signed-off-by: Gergely Nagy <alger...@madhouse-project.org>
---
 dh_installlogcheck |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/dh_installlogcheck b/dh_installlogcheck
index b6956fa..982e75f 100755
--- a/dh_installlogcheck
+++ b/dh_installlogcheck
@@ -39,6 +39,16 @@ subdirectories of F<etc/logcheck/> in package build directories.
 
 =back
 
+=head1 OPTIONS
+
+=over 4
+
+=item B<--name=>I<name>
+
+Look for files named F<debian/package.name.logcheck.*> and install
+them into the corresponding subdirectories of F<etc/logcheck/>, but
+use the specified name instead of that of the package.
+
 =cut
 
 init();
@@ -56,7 +66,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 			if (! -d "$tmp/etc/logcheck/$type") {
 				doit("install","-o",0,"-g",0,"-d","$tmp/etc/logcheck/$type");
 			}
-			my $packagenodot=$package; # run-parts..
+			my $packagenodot=pkgfilename($package); # run-parts..
 			$packagenodot=~s/\./_/g;
 			doit("install","-m","0644",$logcheck,"$tmp/etc/logcheck/$type/$packagenodot");
 		}
-- 
1.7.2.5

Reply via email to