Browse Source

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

Wichert Akkerman 26 years ago
parent
commit
2f8430eec5
5 changed files with 26 additions and 10 deletions
  1. 8 0
      ChangeLog
  2. 8 0
      debian/changelog
  3. 1 1
      scripts/dpkg-statoverride.8
  4. 8 8
      scripts/dpkg-statoverride.pl
  5. 1 1
      scripts/update-alternatives.pl

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+Tue Nov  7 00:45:00 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * 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 <peterk@debian.org>
 
   * po/sv.po: Updated.

+ 8 - 0
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 <wakkerma@debian.org>  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

+ 1 - 1
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

+ 8 - 8
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 (<SO>) {
 		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: $!");
 }
 

+ 1 - 1
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='';