Explorar el Código

Use the perl POSIX module instead of the enoent helper binary

Guillem Jover hace 18 años
padre
commit
11cb48dd9a
Se han modificado 7 ficheros con 13 adiciones y 24 borrados
  1. 10 0
      ChangeLog
  2. 1 0
      debian/changelog
  3. 0 1
      debian/dpkg.install
  4. 1 3
      scripts/dpkg-divert.pl
  5. 1 3
      scripts/update-alternatives.pl
  6. 0 5
      utils/Makefile.am
  7. 0 12
      utils/enoent.c

+ 10 - 0
ChangeLog

@@ -1,3 +1,13 @@
+2008-01-16  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-divert.pl: Use :errno_h from POSIX.
+	($enoent): Remove variable.
+	(ENOENT): Remove function.
+	* scripts/update-alternatives.pl: Likewise.
+	* utils/Makefile.am (pkglib_PROGRAMS): Remove variable.
+	(enoent_SOURCES): Likewise.
+	* utils/enoent.c: Remove file.
+
 2008-01-16  Guillem Jover  <guillem@debian.org>
 
 	* dpkg-deb/build.c (do_build): Use NULL instead of 0.

+ 1 - 0
debian/changelog

@@ -5,6 +5,7 @@ dpkg (1.14.16) UNRELEASED; urgency=low
     Closes: #402901
   * Do not warn about unrecognized Homepage field in binary package stanzas
     in dpkg-genchanges and dpkg-source. Closes: #460309
+  * Do not use the enoent helper binary, and use perl POSIX module instead.
 
   [ Frank Lichtenheld ]
   * Make the -L option of dpkg-parsechangelog actually work (it's

+ 0 - 1
debian/dpkg.install

@@ -7,7 +7,6 @@ usr/bin/dpkg
 usr/bin/dpkg-deb
 usr/bin/dpkg-query
 usr/bin/dpkg-split
-usr/lib/dpkg/enoent
 usr/lib/dpkg/mksplit
 usr/sbin
 usr/share/dpkg

+ 1 - 3
scripts/dpkg-divert.pl

@@ -3,14 +3,12 @@
 use strict;
 use warnings;
 
+use POSIX qw(:errno_h);
 use Dpkg;
 use Dpkg::Gettext;
 
 textdomain("dpkg");
 
-my $enoent = `$dpkglibdir/enoent` || die sprintf(_g("Cannot get ENOENT value from %s: %s"), "$dpkglibdir/enoent", $!);
-sub ENOENT { $enoent; }
-
 sub version {
     printf _g("Debian %s version %s.\n"), $progname, $version;
 

+ 1 - 3
scripts/update-alternatives.pl

@@ -3,6 +3,7 @@
 use strict;
 use warnings;
 
+use POSIX qw(:errno_h);
 use Dpkg;
 use Dpkg::Gettext;
 
@@ -53,9 +54,6 @@ my @slavelinks;       # List of slavelinks (indexed by slave-index)
 my %slavepath;        # Map from (@version-index,slavename) to slave-path
 my %slavelinkcount;
 
-my $enoent = `$dpkglibdir/enoent` || die sprintf(_g("Cannot get ENOENT value from %s: %s"), "$dpkglibdir/enoent", $!);
-sub ENOENT { $enoent; }
-
 sub version {
     printf _g("Debian %s version %s.\n"), $progname, $version;
 

+ 0 - 5
utils/Makefile.am

@@ -16,8 +16,3 @@ if WITH_START_STOP_DAEMON
   start_stop_daemon_LDADD = ../getopt/libopt.a $(SSD_LIBS)
 endif
 
-
-pkglib_PROGRAMS = enoent
-
-enoent_SOURCES = \
-	enoent.c

+ 0 - 12
utils/enoent.c

@@ -1,12 +0,0 @@
-/* This program ensures that dpkg-divert and update-alternatives don't depend on POSIX.pm
- * being available and usable. This is probably a good thing since the perl packages have
- * known deficiencies to ensure that during upgrades. */
-
-#include <stdio.h>
-#include <errno.h>
-
-int main(int argc, char** argv) {
-	printf("%d", ENOENT);
-	return 0;
-}
-