]> git.donarmstrong.com Git - debhelper.git/commitdiff
r522: * Set DH_ALWAYS_EXCLUDE=CVS and debhelper will exclude CVS directories
authorjoey <joey>
Sun, 19 May 2002 03:06:41 +0000 (03:06 +0000)
committerjoey <joey>
Sun, 19 May 2002 03:06:41 +0000 (03:06 +0000)
     from processing by any command that takes a -X option, and dh_builddeb
     will also go in and rm -rf any that still sneak into the build tree.
   * dh_install: A patch from Eric Dorland <eric@debian.org> adds support for
     --sourcedir, which allows debian/package.files files to be moved over to
     debian/package.install, and just work. Closes: #146847
   * dh_movefiles: don't do file tests in no-act mode. Closes: #144573
   * dh_installdebconf: pass --drop-old-templates to debconf-mergetemplate.
     Means debhelper has to depend on debconf-utils 1.1.1.

Debian/Debhelper/Dh_Getopt.pm
Debian/Debhelper/Dh_Lib.pm
debhelper.pod
debian/changelog
debian/control
debian/rules
dh_builddeb
dh_install
dh_installdebconf
dh_movefiles
examples/rules.multi2

index 81d206181bc5f96feae10d55e54811429955cbb2..16851a04902999cd2cb929e184e07080ba77f783 100644 (file)
@@ -177,13 +177,6 @@ sub parseopts {
        }
        @{$options{DOPACKAGES}}=@package_list;
 
-       # Generate EXCLUDE_FIND.
-       $options{EXCLUDE_FIND}='';
-       foreach (@{$options{EXCLUDE}}) {
-               $options{EXCLUDE_FIND}.="-regex .*".quotemeta($_).".* -or ";
-       }
-       $options{EXCLUDE_FIND}=~s/ -or $//;
-
        # If there are no packages to act on now, it's an error.
        if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
                error("I have no package to build");
@@ -203,7 +196,7 @@ sub parseopts {
        @ARGV=@{$options{ARGV}} if exists $options{ARGV};
 
        return %options;
-}      
+}
 
 sub import {
        # Enable bundling of short command line options.
index 0ed7c477cb0c5a7a9d60571b5ed35c690b4bbac9..0f910f1d0c549781831398b20635f78f134b08c0 100644 (file)
@@ -43,6 +43,20 @@ sub init {
                %dh=Debian::Debhelper::Dh_Getopt::parseopts();
        }
 
+       # Another way to set excludes.
+       if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
+               push @{$dh{EXCLUDE}}, $ENV{DH_ALWAYS_EXCLUDE};
+       }
+       
+       # Generate EXCLUDE_FIND.
+       if ($dh{EXCLUDE}) {
+               $dh{EXCLUDE_FIND}='';
+               foreach (@{$dh{EXCLUDE}}) {
+                       $dh{EXCLUDE_FIND}.="-regex ".escape_shell(".*$_.*")." -or ";
+               }
+       }
+       $dh{EXCLUDE_FIND}=~s/ -or $//;
+       
        # Check to see if DH_VERBOSE environment variable was set, if so,
        # make sure verbose is on.
        if (defined $ENV{DH_VERBOSE} && $ENV{DH_VERBOSE} ne "") {
@@ -92,7 +106,7 @@ sub escape_shell {
                if ($word=~/\s/) {
                        # Escape only a few things since it will be quoted.
                        # Note we use double quotes because you cannot
-                       # escape ' in qingle quotes, while " can be escaped
+                       # escape ' in single quotes, while " can be escaped
                        # in double.
                        # This does make -V"foo bar" turn into "-Vfoo bar",
                        # but that will be parsed identically by the shell
index d8efb52997a380bd436e062744f4d5f86f82be5f..67cfbe73eb80505e58febf039bc5e0a470933808 100644 (file)
@@ -354,6 +354,19 @@ older debhelpers will ignore it and do things you don't want them to. One very
 good way to set DH_OPTIONS is by using "Target-specific Variable Values" in
 your debian/rules file. See the make documentation for details on doing this.
 
+=item DH_ALWAYS_EXCLUDE
+
+If set, this adds the value the variable is set to to the -X options of all
+commands that support the -X option. Moreover, dh_builddeb will rm -rf
+anything that matches the value in your package build tree.
+
+This can be useful if you are doing a build from a CVS source tree, in
+which case setting DH_ALWAYS_EXCLUDE=CVS will prevent any CVS directories
+from sneaking into the package you build. Or, if a package has a source
+tarball that (unwisely) includes CVS directories, you might want to export
+DH_ALWAYS_EXCLUDE=CVS in debian/rules, to make it take effect wherever
+your package is built.
+
 =back
 
 =head1 SEE ALSO
index 22328b36a626764446738a344ace05749b98165a..72ccbbe9d4b878f2c08be478b2b1af828dd03979 100644 (file)
@@ -1,3 +1,17 @@
+debhelper (4.0.4) unstable; urgency=low
+
+  * Set DH_ALWAYS_EXCLUDE=CVS and debhelper will exclude CVS directories
+    from processing by any command that takes a -X option, and dh_builddeb 
+    will also go in and rm -rf any that still sneak into the build tree.
+  * dh_install: A patch from Eric Dorland <eric@debian.org> adds support for
+    --sourcedir, which allows debian/package.files files to be moved over to
+    debian/package.install, and just work. Closes: #146847
+  * dh_movefiles: don't do file tests in no-act mode. Closes: #144573
+  * dh_installdebconf: pass --drop-old-templates to debconf-mergetemplate.
+    Means debhelper has to depend on debconf-utils 1.1.1.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 18 May 2002 21:38:03 -0400
+
 debhelper (4.0.3) unstable; urgency=low
 
   * Corrects misbuild with CVS dirs in deb. Closes: #146576
index 24e913242156a047a5a47210c679b6de8ede48f4..c97b8c6fd2d87c60283d057f1e76e0ab2ad11483 100644 (file)
@@ -2,7 +2,7 @@ Source: debhelper
 Section: devel
 Priority: optional
 Maintainer: Joey Hess <joeyh@debian.org>
-Build-Depends-Indep: perl (>= 5.6.1), fileutils (>= 4.0-2.1), file (>= 3.23-1), debconf-utils
+Build-Depends-Indep: perl (>= 5.6.1), fileutils (>= 4.0-2.1), file (>= 3.23-1), debconf-utils (>= 1.1.1)
 Standards-Version: 3.5.6.1
 
 Package: debhelper
index a9b6bae10ff03da77a4ed81a2b9a2fec90552693..af24fb5ffba30ddcb544264e629f30e213008883 100755 (executable)
@@ -83,10 +83,8 @@ binary-indep: build
        ./dh_perl
        ./dh_installdeb
        ./dh_gencontrol
-       # Clean up CVS directories copied in if I build from CVS tree.
-       find debian/debhelper -type d -name CVS | xargs rm -rf
        ./dh_md5sums
-       ./dh_builddeb
+       ./dh_builddeb -v
 
 # Update the debhelper web page. Not intended for use by anyone except the
 # author.
index d259b0163fe790361c8281b7682f4bd26da61354..07029c076dbe22fc9696b40f9e8a62582a2df42d 100755 (executable)
@@ -59,6 +59,9 @@ else {
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp=tmpdir($package);
+       if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
+               complex_doit("find $tmp -name $ENV{DH_ALWAYS_EXCLUDE} | xargs rm -rf");
+       }
        doit("dpkg","--build",$tmp,"$dh{DESTDIR}$dh{FILENAME}",@{$dh{U_PARAMS}});
 }
 
index 019d0f1baa2679b982c7cd53cad2c87295de5c23..4aa7142d2e94e4e2490d76c346b8e238ed63d69f 100755 (executable)
@@ -65,6 +65,18 @@ Note that if you list only a filename on a line by itself in a
 debian/package.install file, with no explicit destination, then dh_install
 will automatically guess the destination even if this flag is not set.
 
+=item B<--sourcedir=dir>
+
+Makes all source files relative to "dir". If this is specified, it is akin 
+to all the source files having "dir" prepended to them. By default, "dir"
+is '.'.
+
+To make dh_install behave like the old dh_movefiles, move your
+package.files file to package.install and call dh_install with
+"--sourcedir=debian/tmp" appended to the command. This will
+approximate dh_movefiles behaviour, except it will copy files instead
+of moving them.
+
 =item I<file [...] dest>
 
 Lists files (or directories) to install and where to install them to.
@@ -81,12 +93,15 @@ my $ret=0;
 foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp=tmpdir($package);
        my $file=pkgfile($package,"install");
+       my $srcdir = '.';
 
        my @install;
        if ($file) {
                @install=filedoublearray($file); # no globbing yet
        }
        
+       $srcdir = $dh{SOURCEDIR} if defined $dh{SOURCEDIR};
+       
        if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @install, [@ARGV];
        }
@@ -114,6 +129,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                                $dest=dirname($dest);
                        }
                        
+                       $src = "$srcdir/$src"; # do this now, to avoid the parsing above
+                       
                        # Make sure the destination directory exists.
                        if (! -e "$tmp/$dest") {
                                doit("install","-d","$tmp/$dest");
index 2b6bdc70a4050e02275e96249fb30ab7c7a103f6..0d83eea0be70e15734b8b0fbcab8b3fe0cf7ad36 100755 (executable)
@@ -31,14 +31,14 @@ Note that if you use debconf, your package probably needs to depend on it
 =head1 LOCALIZED TEMPLATE FILES
 
 Debconf also supports localized template files, and this program has some
-support to aid working with them. You may find it easiest to keep the
-translations in separate files, and merge them only at build time. See
+support to aid working with them. It is best to keep the translations in
+separate files, and merge them only at build time. See 
 L<debconf-mergetemplate(1)> and L<debconf-getlang(1)> for details.
 
 This program will automatically call debconf-mergetemplate and merge 
 templates on the fly if it finds your template files are accompanied
 by translated files that have the same name as the template file, with a
-dot and a locale name repended.
+dot and a locale name prepended.
 
 For example, if you have a German translation,
 debian/package.templates.de is merged with debian/package.templates.
@@ -84,7 +84,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                # Are there translated templates too?
                my @trans=(glob("$templates.??"), glob("$templates.??_??"));
                if (@trans) {
-                       complex_doit("debconf-mergetemplate @extraparams @trans $templates > $tmp/DEBIAN/templates");
+                       complex_doit("debconf-mergetemplate --drop-old-templates @extraparams @trans $templates > $tmp/DEBIAN/templates");
                        chmod 0644, "$tmp/DEBIAN/templates";
                        chown 0, 0, "$tmp/DEBIAN/templates";
                }
index 6a33cc90abaee08c4827aa1bfca7170beb11707e..97427b8d08d3604ef979492c181d8bbac57b41a5 100755 (executable)
@@ -121,7 +121,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                doit("rm","-f","debian/movelist");
                foreach (@tomove) {
                        my $file=$_;
-                       if (! -e $file && ! -l $file) {
+                       if (! -e $file && ! -l $file && ! $dh{NO_ACT}) {
                                $ret=1;
                                warning("$file not found (supposed to put it in $package)");
                        }
index edde0b8d5906b0d0a8513e26958ae3fce4e23c3d..042cdd282f374ea3ac3d45fdf55d426d8ba184a0 100755 (executable)
@@ -64,7 +64,6 @@ binary-common:
 #      dh_installcron
 #      dh_installinfo
 #      dh_undocumented
-       dh_installman
        dh_strip
        dh_link
        dh_compress