From: Wichert Akkerman Date: Fri, 8 Sep 2000 16:39:57 +0000 (+0000) Subject: scripts/dpkg-divert.pl: change $dpkglibdir to $admindir X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c70b6b097fa1cdfc30b1c1074a81eabaff6276a7;p=dpkg scripts/dpkg-divert.pl: change $dpkglibdir to $admindir scripts/Makefile.in: set $admindir as well in scripts --- diff --git a/ChangeLog b/ChangeLog index fb7619ee..6435ee78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Fri Sep 8 12:28:34 CEST 2000 Wichert Akkerman * po/de.po: New German translation from Hartmut Koptein * THANKS: Add Hartmut * main/enquiry.c: fix silly type error + * scripts/dpkg-divert.pl: change $dpkglibdir to $admindir + * scripts/Makefile.in: set $admindir as well in scripts Sat Sep 2 18:29:56 CEST 2000 Wichert Akkerman diff --git a/po/dpkg.pot b/po/dpkg.pot index d7d47d83..528ea48c 100644 --- a/po/dpkg.pot +++ b/po/dpkg.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-09-08 07:19-0400\n" +"POT-Creation-Date: 2000-09-08 18:34+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2639,86 +2639,86 @@ msgid "" "dpkg-deb: building an unknown package in `%s'.\n" msgstr "" -#: dpkg-deb/build.c:217 +#: dpkg-deb/build.c:215 msgid "package name has characters that aren't lowercase alphanums or `-+.'" msgstr "" -#: dpkg-deb/build.c:219 +#: dpkg-deb/build.c:217 #, c-format msgid "warning, `%s' contains user-defined Priority value `%s'\n" msgstr "" -#: dpkg-deb/build.c:224 +#: dpkg-deb/build.c:222 #, c-format msgid "warning, `%s' contains user-defined field `%s'\n" msgstr "" -#: dpkg-deb/build.c:230 +#: dpkg-deb/build.c:228 #, c-format msgid "%d errors in control file" msgstr "" -#: dpkg-deb/build.c:241 +#: dpkg-deb/build.c:239 #, c-format msgid "dpkg-deb: building package `%s' in `%s'.\n" msgstr "" -#: dpkg-deb/build.c:249 +#: dpkg-deb/build.c:247 #, c-format msgid "control directory has bad permissions %03lo (must be >=0755 and <=0775)" msgstr "" -#: dpkg-deb/build.c:260 +#: dpkg-deb/build.c:258 #, c-format msgid "maintainer script `%.50s' is not a plain file or symlink" msgstr "" -#: dpkg-deb/build.c:262 +#: dpkg-deb/build.c:260 #, c-format msgid "" "maintainer script `%.50s' has bad permissions %03lo (must be >=0555 and " "<=0775)" msgstr "" -#: dpkg-deb/build.c:266 +#: dpkg-deb/build.c:264 #, c-format msgid "maintainer script `%.50s' is not stattable" msgstr "" -#: dpkg-deb/build.c:276 +#: dpkg-deb/build.c:274 msgid "empty string from fgets reading conffiles" msgstr "" -#: dpkg-deb/build.c:278 +#: dpkg-deb/build.c:276 #, c-format msgid "" "warning, conffile name `%.50s...' is too long, or missing final newline\n" msgstr "" -#: dpkg-deb/build.c:290 +#: dpkg-deb/build.c:288 #, c-format msgid "conffile `%.250s' does not appear in package" msgstr "" -#: dpkg-deb/build.c:292 +#: dpkg-deb/build.c:290 #, c-format msgid "conffile `%.250s' is not stattable" msgstr "" -#: dpkg-deb/build.c:294 +#: dpkg-deb/build.c:292 #, c-format msgid "warning, conffile `%s' is not a plain file\n" msgstr "" -#: dpkg-deb/build.c:299 +#: dpkg-deb/build.c:297 msgid "error reading conffiles file" msgstr "" -#: dpkg-deb/build.c:302 +#: dpkg-deb/build.c:300 msgid "error opening conffiles file" msgstr "" -#: dpkg-deb/build.c:305 +#: dpkg-deb/build.c:303 #, c-format msgid "dpkg-deb: ignoring %d warnings about the control file(s)\n" msgstr "" @@ -2726,107 +2726,103 @@ msgstr "" #. Now that we have verified everything its time to actually #. * build something. Lets start by making the ar-wrapper. #. -#: dpkg-deb/build.c:318 +#: dpkg-deb/build.c:312 #, c-format msgid "unable to create `%.255s'" msgstr "" -#: dpkg-deb/build.c:319 +#: dpkg-deb/build.c:313 #, c-format msgid "unable to unbuffer `%.255s'" msgstr "" -#: dpkg-deb/build.c:324 dpkg-deb/build.c:396 dpkg-deb/build.c:416 +#: dpkg-deb/build.c:318 dpkg-deb/build.c:390 dpkg-deb/build.c:410 #, c-format msgid "failed to chdir to `%.255s'" msgstr "" -#: dpkg-deb/build.c:325 +#: dpkg-deb/build.c:319 msgid "failed to chdir to .../DEBIAN" msgstr "" -#: dpkg-deb/build.c:326 dpkg-deb/build.c:418 +#: dpkg-deb/build.c:320 dpkg-deb/build.c:412 msgid "failed to exec tar -cf" msgstr "" #. Create a temporary file to store the control data in. Immediately unlink #. * our temporary file so others can't mess with it. #. -#: dpkg-deb/build.c:332 +#: dpkg-deb/build.c:326 msgid "failed to make tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:333 +#: dpkg-deb/build.c:327 #, c-format msgid "failed to open tmpfile (control), %s" msgstr "" #. make sure it's gone, the fd will remain until we close it -#: dpkg-deb/build.c:336 +#: dpkg-deb/build.c:330 #, c-format msgid "failed to unlink tmpfile (control), %s" msgstr "" -#: dpkg-deb/build.c:344 +#: dpkg-deb/build.c:338 msgid "failed to exec gzip -9c" msgstr "" -#: dpkg-deb/build.c:349 +#: dpkg-deb/build.c:343 msgid "failed to fstat tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:372 +#: dpkg-deb/build.c:366 msgid "failed to rewind tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:373 +#: dpkg-deb/build.c:367 msgid "control" msgstr "" -#: dpkg-deb/build.c:380 +#: dpkg-deb/build.c:374 msgid "failed to make tmpfile (data)" msgstr "" -#: dpkg-deb/build.c:381 +#: dpkg-deb/build.c:375 #, c-format msgid "failed to open tmpfile (data), %s" msgstr "" #. make sure it's gone, the fd will remain until we close it -#: dpkg-deb/build.c:384 +#: dpkg-deb/build.c:378 #, c-format msgid "failed to unlink tmpfile (data), %s" msgstr "" -#: dpkg-deb/build.c:398 +#: dpkg-deb/build.c:392 msgid "failed to exec find" msgstr "" -#: dpkg-deb/build.c:431 +#: dpkg-deb/build.c:425 msgid "no compression copy loop" msgstr "" -#: dpkg-deb/build.c:437 +#: dpkg-deb/build.c:431 #, c-format msgid "failed to exec gzip %s from tar -cf" msgstr "" -#: dpkg-deb/build.c:443 dpkg-deb/build.c:446 +#: dpkg-deb/build.c:437 dpkg-deb/build.c:440 msgid "failed to write filename to tar pipe (data)" msgstr "" -#: dpkg-deb/build.c:464 +#: dpkg-deb/build.c:458 msgid "failed to rewind tmpfile (data)" msgstr "" -#: dpkg-deb/build.c:467 +#: dpkg-deb/build.c:461 msgid "failed to exec cat (data)" msgstr "" -#: dpkg-deb/build.c:481 -msgid "_control" -msgstr "" - #: dpkg-deb/extract.c:48 msgid "failed to exec sh -c mv foo/* &c" msgstr "" diff --git a/scripts/Makefile.in b/scripts/Makefile.in index ced41de2..696fa868 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -101,6 +101,7 @@ install-doc: %: %.pl $(SED) -e "s:^#![:space:]*/usr/bin/perl:#! $(PERL):; \ s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(dpkglibdir)\":; \ + s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":; \ s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(VERSION)\":" \ < $< > $@ diff --git a/scripts/dpkg-divert.pl b/scripts/dpkg-divert.pl index 7b68d61c..782d2054 100755 --- a/scripts/dpkg-divert.pl +++ b/scripts/dpkg-divert.pl @@ -5,7 +5,7 @@ sub ENOENT { 2; } # Sorry about this, but the errno-part of POSIX.pm isn't in perl-*-base $version= '1.0.11'; # This line modified by Makefile -$dpkglibdir= "."; # This line modified by Makefile +$admindir= "."; # This line modified by Makefile sub showversion { print("Debian GNU/Linux dpkg-divert $version.\n") || &quit("failed to write version: $!"); @@ -93,7 +93,7 @@ while (@ARGV) { $divertto =~ m/\n/ && &badusage("package may not contain newlines"); } elsif (m/^--admindir$/) { @ARGV || &badusage("--admindir needs a directory argument"); - $dpkglibdir= shift(@ARGV); + $admindir= shift(@ARGV); } else { &badusage("unknown option \`$_'"); } @@ -101,7 +101,7 @@ while (@ARGV) { $mode='add' unless $mode; -open(O,"$dpkglibdir/diversions") || &quit("cannot open diversions: $!"); +open(O,"$admindir/diversions") || &quit("cannot open diversions: $!"); while() { s/\n$//; push(@contest,$_); $_=; s/\n$// || &badfmt("missing altname"); @@ -234,18 +234,18 @@ sub dorename { sub save { return if $testmode; - open(N,"> $dpkglibdir/diversions-new") || &quit("create diversions-new: $!"); - chmod 0644, "$dpkglibdir/diversions-new"; + open(N,"> $admindir/diversions-new") || &quit("create diversions-new: $!"); + chmod 0644, "$admindir/diversions-new"; for ($i=0; $i<=$#contest; $i++) { print(N "$contest[$i]\n$altname[$i]\n$package[$i]\n") || &quit("write diversions-new: $!"); } close(N) || &quit("close diversions-new: $!"); - unlink("$dpkglibdir/diversions-old") || + unlink("$admindir/diversions-old") || $! == &ENOENT || &quit("remove old diversions-old: $!"); - link("$dpkglibdir/diversions","$dpkglibdir/diversions-old") || + link("$admindir/diversions","$admindir/diversions-old") || $! == &ENOENT || &quit("create new diversions-old: $!"); - rename("$dpkglibdir/diversions-new","$dpkglibdir/diversions") + rename("$admindir/diversions-new","$admindir/diversions") || &quit("install new diversions: $!"); } @@ -254,4 +254,4 @@ sub infon { &infol($contest[$i],$altname[$i],$package[$i]); } sub quit { print STDERR "dpkg-divert: @_\n"; exit(2); } sub badusage { print STDERR "dpkg-divert: @_\n\n"; print("You need --help.\n"); exit(2); } -sub badfmt { &quit("internal error: $dpkglibdir/diversions corrupt: $_[0]"); } +sub badfmt { &quit("internal error: $admindir/diversions corrupt: $_[0]"); }