From 2f8430eec5c258b8b85ea7d955d4dd6a21356dad Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 7 Nov 2000 00:59:40 +0000 Subject: [PATCH] scripts/dpkg-statoverride.8: fix typos scripts/dpkg-statoverride.pl: replace dpkglibdir with admindir (oops) scripts/update-alternatives.pl: handle the fact that the Makefile changes our $admindir assignment so we have to manually add "/alternatives" to the path --- ChangeLog | 8 ++++++++ debian/changelog | 8 ++++++++ scripts/dpkg-statoverride.8 | 2 +- scripts/dpkg-statoverride.pl | 16 ++++++++-------- scripts/update-alternatives.pl | 2 +- 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index b393da57..98370c6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Nov 7 00:45:00 CET 2000 Wichert Akkerman + + * scripts/dpkg-statoverride.8: fix typos + * scripts/dpkg-statoverride.pl: replace dpkglibdir with admindir (oops) + * scripts/update-alternatives.pl: handle the fact that the Makefile + changes our $admindir assignment so we have to manually add + "/alternatives" to the path + Mon 06 Nov 07:24:11 CET 2000 peter karlsson * po/sv.po: Updated. diff --git a/debian/changelog b/debian/changelog index 13168a6a..b2d99a93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +dpkg (1.7.1) unstable; urgency=medium + + * Fix a typo in the dpkg-statoveride manpage + * dpkg-statoverride reads and writes the right file now + * Make update-alternatives use the right dir for alternatives again + + -- Wichert Akkerman Tue, 7 Nov 2000 01:16:39 +0100 + dpkg (1.7.0) unstable; urgency=low * Allow the administrator to override file mode and ownership using the diff --git a/scripts/dpkg-statoverride.8 b/scripts/dpkg-statoverride.8 index 295546f0..bc2d7020 100644 --- a/scripts/dpkg-statoverride.8 +++ b/scripts/dpkg-statoverride.8 @@ -15,7 +15,7 @@ handles, including directories, devices, etc.). This can be used to force programs that are normall setuid to be install without a setuid flag, or only executable by a certain group. .P -\fBdpkg-statoverride\fR is a utility to manager the list of stat +\fBdpkg-statoverride\fR is a utility to manage the list of stat overrides. It has three basic functions: adding, removing and listing overrides. .SH OPTIONS diff --git a/scripts/dpkg-statoverride.pl b/scripts/dpkg-statoverride.pl index 6d74aaac..d621818d 100755 --- a/scripts/dpkg-statoverride.pl +++ b/scripts/dpkg-statoverride.pl @@ -1,6 +1,6 @@ #! /usr/bin/perl -$dpkglibdir= "/var/lib/dpkg"; # This line modified by Makefile +$admindir= "/var/lib/dpkg"; # This line modified by Makefile $version= '1.3.0'; # This line modified by Makefile $verbose= 1; @@ -51,7 +51,7 @@ while (@ARGV) { $force=1; } elsif (m/^--admindir$/) { @ARGV || &badusage("--admindir needs a directory argument"); - $dpkglibdir= shift(@ARGV); + $admindir= shift(@ARGV); } elsif (m/^--add$/) { &CheckModeConflict; $mode= 'add'; @@ -151,7 +151,7 @@ if ($mode eq "add") { exit(0); sub ReadOverrides { - open(SO,"$dpkglibdir/statoverride") || &quit("cannot open statoverride: $!"); + open(SO,"$admindir/statoverride") || &quit("cannot open statoverride: $!"); while () { my ($owner,$group,$mode,$file); chomp; @@ -170,17 +170,17 @@ sub ReadOverrides { sub WriteOverrides { my ($file); - open(SO,"$dpkglibdir/statoverride-new") || &quit("cannot open new statoverride file: $!"); + open(SO,"$admindir/statoverride-new") || &quit("cannot open new statoverride file: $!"); foreach $file (keys %owner) { print SO "$owner{$file} $group{$file} $mode{$file} $file\n"; } close(SO); - chmod(0644, "$dpkglibdir/statoverride-new"); - unlink("$dpkglibdir/statoverride-old") || + chmod(0644, "$admindir/statoverride-new"); + unlink("$admindir/statoverride-old") || $! == &ENOENT || &quit("error removing statoverride-old: $!"); - link("$dpkglibdir/statoverride","$dpkglibdir/statoverride-old") || + link("$admindir/statoverride","$admindir/statoverride-old") || $! == &ENOENT || &quit("error creating new statoverride-old: $!"); - rename("$dpkglibdir/statoverride-new","$dpkglibdir/statoverride") + rename("$admindir/statoverride-new","$admindir/statoverride") || &quit("error installing new statoverride: $!"); } diff --git a/scripts/update-alternatives.pl b/scripts/update-alternatives.pl index d1cd3f89..10cf5a20 100755 --- a/scripts/update-alternatives.pl +++ b/scripts/update-alternatives.pl @@ -52,7 +52,7 @@ sub quit { print STDERR "update-alternatives: @_\n"; exit(2); } sub badusage { print STDERR "update-alternatives: @_\n\n"; &usageversion; exit(2); } $altdir= '/etc/alternatives'; -$admindir= '/var/lib/dpkg/alternatives'; +$admindir= '/var/lib/dpkg' . '/alternatives'; $testmode= 0; $verbosemode= 0; $mode=''; -- 2.39.5