]> git.donarmstrong.com Git - debhelper.git/blob - dh_suidregister
r421: use strict
[debhelper.git] / dh_suidregister
1 #!/usr/bin/perl -w
2 #
3 # Obsolete.
4
5 use strict;
6 use Debian::Debhelper::Dh_Lib;
7 init();
8
9 my $notused=1;
10
11 foreach my $package (@{$dh{DOPACKAGES}}) {
12         my $tmp=tmpdir($package);
13         my $suid=pkgfile($package,"suid");
14
15         # All this code is here just to see if we would have done something
16         # before..
17
18         my @files;
19         if ($suid) {
20                 @files=filearray($suid, $tmp);
21         }
22
23         if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
24                 push @files, @ARGV;
25         }
26
27         if (! @files && ! $suid) {
28                 # No files specified (and no empty debian/suid file), so
29                 # guess what files to process.
30                 @files=split(/\n/,`find $tmp -type f -perm +6000`);
31         }
32
33         if (@files) {
34                 # So we would have registered some files before.
35                 error("This program should no longer be used, but you need to add a conflicts with \"suidmanager (<< 0.50)\". Please read the dh_suidregister(1) man page.");
36         }
37 }
38
39 # Although they called it, it's not going to do anything.
40 if ($notused) {
41         warning("This program is obsolete and may be safely removed from your rules file.");
42 }