+2007-07-22 Guillem Jover <guillem@debian.org>
+
+ * scripts/cleanup-info.pl: Use new Dpkg module, and remove variable
+ declarations already done in the module.
+ * scripts/controllib.pl: Likewise.
+ * scripts/dpkg-architecture.pl: Likewise.
+ * scripts/dpkg-checkbuilddeps.pl: Likewise.
+ * scripts/dpkg-distaddfile.pl: Likewise.
+ * scripts/dpkg-divert.pl: Likewise.
+ * scripts/dpkg-genchanges.pl: Likewise.
+ * scripts/dpkg-gencontrol.pl: Likewise.
+ * scripts/dpkg-parsechangelog.pl: Likewise.
+ * scripts/dpkg-scanpackages.pl: Likewise.
+ * scripts/dpkg-scansources.pl: Likewise.
+ * scripts/dpkg-shlibdeps.pl: Likewise.
+ * scripts/dpkg-source.pl: Likewise.
+ * scripts/dpkg-statoverride.pl: Likewise.
+ * scripts/install-info.pl: Likewise.
+ * scripts/update-alternatives.pl: Likewise.
+
+ * scripts/controllib.pl (init_substvars): Remove comment about
+ $version needing to be a global variable set elsewhere.
+
+ * scripts/dpkg-scanpackages.pl: Remove $0 mangling.
+ (version, usage): Use $progname instead of $0.
+ * scripts/dpkg-statoverride.pl: Likewise.
+ * scripts/install-info.pl: Likewise.
+ * scripts/dpkg-divert.pl: Likewise.
+ (quit, badusage): Use $progname instead of $0.
+ * scripts/update-alternatives.pl: Likewise.
+ * scripts/dpkg-scansources.pl ($Me): Remove declaration.
+ (xwarndie_mess, version, usage): Use $progname instead of $Me.
+
2007-07-21 Guillem Jover <guillem@debian.org>
* m4/perl.m4 (DPKG_PROG_PERL): Add support for user overridable
- Split option descriptions so that it gets easier to distinguish.
- Unify author and copyright information formatting.
* Move variables automatically modified at build time to a new style perl
- module.
+ module and make all programs use the new module..
[ Updated scripts translations ]
* French (Frédéric Bothamy, Christian Perrier).
use strict;
use warnings;
-my $dpkglibdir = "."; # This line modified by Makefile
+use Dpkg;
+
push(@INC,$dpkglibdir);
require 'dpkg-gettext.pl';
textdomain("dpkg");
($0) = $0 =~ m:.*/(.+):;
-my $version = '1.1.6'; # This line modified by Makefile
sub version {
printf _g("Debian %s version %s.\n"), $0, $version;
use English;
use POSIX qw(:errno_h);
-
-our $dpkglibdir;
-our $pkgdatadir;
+use Dpkg;
push(@INC,$dpkglibdir);
require 'dpkg-gettext.pl';
our $warnable_error = 1;
our $quiet_warnings = 0;
-our $version;
-our $progname = $0;
-$progname = $& if $progname =~ m,[^/]+$,;
-
sub getfowner
{
$substvar{'source:Upstream-Version'} = $fi{"L Version"};
$substvar{'source:Upstream-Version'} =~ s/-[^-]*$//;
- # FIXME: this needs all progs using controllib to set $version as 'our'.
- # We expect the calling program to set $version.
$substvar{"dpkg:Version"} = $version;
$substvar{"dpkg:Upstream-Version"} = $version;
$substvar{"dpkg:Upstream-Version"} =~ s/-[^-]+$//;
use strict;
use warnings;
-our $progname;
-our $version = "1.0.0"; # This line modified by Makefile
-our $dpkglibdir = "."; # This line modified by Makefile
-our $pkgdatadir = ".."; # This line modified by Makefile
+use Dpkg;
push(@INC,$dpkglibdir);
require 'controllib.pl';
use strict;
use warnings;
-our $progname;
-our $dpkglibdir = "."; # This line modified by Makefile
-our $pkgdatadir = ".."; # This line modified by Makefile
-
use Getopt::Long;
+use Dpkg;
-my $admindir = "/var/lib/dpkg";
push(@INC,$dpkglibdir);
require 'controllib.pl';
use strict;
use warnings;
-our $progname;
-our $version = '1.3.0'; # This line modified by Makefile
-our $dpkglibdir = "."; # This line modified by Makefile
-
use POSIX;
use POSIX qw(:errno_h :signal_h);
+use Dpkg;
push(@INC,$dpkglibdir);
require 'controllib.pl';
use strict;
use warnings;
-my $version = '1.0.11'; # This line modified by Makefile
-my $admindir = "/var/lib/dpkg"; # This line modified by Makefile
-my $dpkglibdir = "../utils"; # This line modified by Makefile
-($0) = $0 =~ m:.*/(.+):;
+use Dpkg;
push (@INC, $dpkglibdir);
require 'dpkg-gettext.pl';
sub ENOENT { $enoent; }
sub version {
- printf _g("Debian %s version %s.\n"), $0, $version;
+ printf _g("Debian %s version %s.\n"), $progname, $version;
printf _g("
Copyright (C) 1995 Ian Jackson.
When adding, default is --local and --divert <original>.distrib.
When removing, --package or --local and --divert must match if specified.
Package preinst/postrm scripts should always specify --package and --divert.
-"), $0);
+"), $progname);
}
my $testmode = 0;
sub quit
{
- printf STDERR "%s: %s\n", $0, "@_";
+ printf STDERR "%s: %s\n", $progname, "@_";
exit(2);
}
sub badusage
{
- printf STDERR "%s: %s\n\n", $0, "@_";
+ printf STDERR "%s: %s\n\n", $progname, "@_";
&usage;
exit(2);
}
use strict;
use warnings;
-our $progname;
-our $version = '1.3.0'; # This line modified by Makefile
-our $dpkglibdir = "."; # This line modified by Makefile
-our $pkgdatadir = ".."; # This line modified by Makefile
-
use POSIX;
use POSIX qw(:errno_h :signal_h);
+use Dpkg;
push(@INC,$dpkglibdir);
require 'controllib.pl';
use strict;
use warnings;
-our $version = '1.3.0'; # This line modified by Makefile
-our $dpkglibdir = "."; # This line modified by Makefile
-our $pkgdatadir = ".."; # This line modified by Makefile
-
use POSIX;
use POSIX qw(:errno_h);
+use Dpkg;
push(@INC,$dpkglibdir);
require 'controllib.pl';
-our $progname;
our %substvar;
our (%f, %fi);
our %fieldimps;
use strict;
use warnings;
-our $progname;
-our $version = '1.3.0'; # This line modified by Makefile
-our $dpkglibdir = "/usr/lib/dpkg"; # This line modified by Makefile
-
use POSIX;
use POSIX qw(:errno_h);
+use Dpkg;
push(@INC,$dpkglibdir);
require 'controllib.pl';
use IO::Handle;
use IO::File;
-
-my $version= '1.2.6'; # This line modified by Makefile
-my $dpkglibdir= "."; # This line modified by Makefile
-
-($0) = $0 =~ m:.*/(.+):;
+use Dpkg;
push(@INC,$dpkglibdir);
require 'controllib.pl';
my $result = GetOptions(\%options,'help|h|?','version','udeb|u!','arch|a=s','multiversion|m!');
sub version {
- printf _g("Debian %s version %s.\n"), $0, $version;
+ printf _g("Debian %s version %s.\n"), $progname, $version;
exit;
}
-m, --multiversion allow multiple versions of a single package.
-h, --help show this help message.
--version show the version.
-"), $0;
+"), $progname;
}
sub load_override
use strict;
use warnings;
-my $dpkglibdir= "."; # This line modified by Makefile
+use Dpkg;
+
push(@INC,$dpkglibdir);
require 'dpkg-gettext.pl';
textdomain("dpkg-dev");
use Getopt::Long ();
my $Exit = 0;
-(my $Me = $0) =~ s-.*/--;
-my $version= '1.6.2.1'; # This line modified by Makefile
# %Override is a hash of lists. The subs following describe what's in
# the lists.
}
sub xwarndie_mess {
- my @mess = ("$Me: ", @_);
+ my @mess = ("$progname: ", @_);
$mess[$#mess] =~ s/:$/: $!\n/; # XXX loses if it's really /:\n/
return @mess;
}
}
sub version {
- printf _g("Debian %s version %s.\n"), $Me, $version;
+ printf _g("Debian %s version %s.\n"), $progname, $version;
exit;
}
--version show the version.
See the man page for the full documentation.
-"), $Me;
+"), $progname;
exit;
}
use strict;
use warnings;
-our $progname;
-our $version = "1.4.1.19"; # This line modified by Makefile
-our $dpkglibdir = "/usr/lib/dpkg";
-my $admindir = "/var/lib/dpkg";
-
use English;
use POSIX qw(:errno_h :signal_h);
+use Dpkg;
my $shlibsoverride= '/etc/dpkg/shlibs.override';
my $shlibsdefault= '/etc/dpkg/shlibs.default';
use strict;
use warnings;
-our $progname;
-our $version = "1.3.0"; # This line modified by Makefile
-our $dpkglibdir = "."; # This line modified by Makefile
-our $pkgdatadir = ".."; # This line modified by Makefile
+use Dpkg;
my @filesinarchive;
my %dirincluded;
use POSIX;
use POSIX qw(:errno_h :signal_h);
+use Dpkg;
-my $admindir = "/var/lib/dpkg"; # This line modified by Makefile
-my $version = '1.3.0'; # This line modified by Makefile
-
-($0) = $0 =~ m:.*/(.+):;
-
-my $dpkglibdir= "."; # This line modified by Makefile
push (@INC, $dpkglibdir);
require 'dpkg-gettext.pl';
textdomain("dpkg");
my %mode;
sub version {
- printf _g("Debian %s version %s.\n"), $0, $version;
+ printf _g("Debian %s version %s.\n"), $progname, $version;
printf _g("
Copyright (C) 2000 Wichert Akkerman.");
--quiet quiet operation, minimal output.
--help show this help message.
--version show the version.
-"), $0;
+"), $progname;
}
sub CheckModeConflict {
#!/usr/bin/perl --
use Text::Wrap;
+use Dpkg;
-my $dpkglibdir = "."; # This line modified by Makefile
push (@INC, $dpkglibdir);
require 'dpkg-gettext.pl';
textdomain("dpkg");
-($0) = $0 =~ m:.*/(.+):;
-
# fixme: sort entries
# fixme: send to FSF ?
-$version= '0.93.42.2'; # This line modified by Makefile
sub version {
- printf _g("Debian %s version %s.\n"), $0, $version;
+ printf _g("Debian %s version %s.\n"), $progname, $version;
printf _g("
Copyright (C) 1994,1995 Ian Jackson.");
--quiet do not show output messages.
--help show this help message.
--version show the version.
-"), $0;
+"), $progname;
}
$dirfile = '/usr/share/info/dir';
use strict;
use warnings;
-my $admindir = "/var/lib/dpkg"; # This line modified by Makefile
-my $dpkglibdir = "../utils"; # This line modified by Makefile
-my $version = '0.93.80'; # This line modified by Makefile
+use Dpkg;
+
push (@INC, $dpkglibdir);
require 'dpkg-gettext.pl';
textdomain("dpkg");
-($0) = $0 =~ m:.*/(.+):;
-
# Global variables:
my $altdir = '/etc/alternatives';
sub ENOENT { $enoent; }
sub version {
- printf _g("Debian %s version %s.\n"), $0, $version;
+ printf _g("Debian %s version %s.\n"), $progname, $version;
printf _g("
Copyright (C) 1995 Ian Jackson.
--quiet quiet operation, minimal output.
--help show this help message.
--version show the version.
-"), $0, $altdir;
+"), $progname, $altdir;
}
sub quit
{
- printf STDERR "%s: %s\n", $0, "@_";
+ printf STDERR "%s: %s\n", $progname, "@_";
exit(2);
}
sub badusage
{
- printf STDERR "%s: %s\n\n", $0, "@_";
+ printf STDERR "%s: %s\n\n", $progname, "@_";
&usage;
exit(2);
}