[maemo-commits] [maemo-commits] r16641 - in projects/haf/trunk/dpkg: debian scripts

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Nov 12 18:48:40 EET 2008
Author: marivoll
Date: 2008-11-12 18:48:38 +0200 (Wed, 12 Nov 2008)
New Revision: 16641

Modified:
   projects/haf/trunk/dpkg/debian/changelog
   projects/haf/trunk/dpkg/scripts/update-alternatives.pl
Log:
  * Applied altdocs.patch.  Ignore errors in update-alternatives that
    happen in /usr/share/{doc,man,info}.


Modified: projects/haf/trunk/dpkg/debian/changelog
===================================================================
--- projects/haf/trunk/dpkg/debian/changelog	2008-11-12 15:47:22 UTC (rev 16640)
+++ projects/haf/trunk/dpkg/debian/changelog	2008-11-12 16:48:38 UTC (rev 16641)
@@ -1,3 +1,10 @@
+dpkg (1.14.22maemo2~unreleased) unstable; urgency=low
+
+  * Applied altdocs.patch.  Ignore errors in update-alternatives that
+    happen in /usr/share/{doc,man,info}.
+
+ -- Marius Vollmer <marius.vollmer at nokia.com>  Mon, 10 Nov 2008 17:02:19 +0200
+
 dpkg (1.14.22maemo1) unstable; urgency=low
 
   * Don't make dpkg-dev depend on lzma, only suggest it.

Modified: projects/haf/trunk/dpkg/scripts/update-alternatives.pl
===================================================================
--- projects/haf/trunk/dpkg/scripts/update-alternatives.pl	2008-11-12 15:47:22 UTC (rev 16640)
+++ projects/haf/trunk/dpkg/scripts/update-alternatives.pl	2008-11-12 16:48:38 UTC (rev 16641)
@@ -113,6 +113,21 @@
     exit(2);
 }
 
+# Same as 'quit', but ignore errors related to documentation.
+#
+sub maybe_quit {
+    my ($file, $msg) = @_;
+    printf STDERR "%s: %s\n", $progname, $msg;
+    if ($file =~ "^/usr/share/man/" ||
+	$file =~ "^/usr/share/info/" ||
+	$file =~ "^/usr/share/doc/")
+    {
+	printf STDERR "%s: ignoring error.\n", $progname;
+    } else {
+	exit (2);
+    }
+}
+
 sub badusage
 {
     printf STDERR "%s: %s\n\n", $progname, "@_";
@@ -705,12 +720,12 @@
 sub checked_symlink {
     my ($filename, $linkname) = @_;
     symlink($filename, $linkname) ||
-	&quit(sprintf(_g("unable to make %s a symlink to %s: %s"), $linkname, $filename, $!));
+	&maybe_quit($linkname, sprintf(_g("unable to make %s a symlink to %s: %s"), $linkname, $filename, $!));
 }
 sub checked_mv {
     my ($source, $dest) = @_;
     rename_mv($source, $dest) ||
-	&quit(sprintf(_g("unable to install %s as %s: %s"), $source, $dest, $!));
+	&maybe_quit($source, sprintf(_g("unable to install %s as %s: %s"), $source, $dest, $!));
 }
 sub config_all {
     opendir ADMINDIR, $admindir or die sprintf(_g("Serious problem: %s"), $!);


More information about the maemo-commits mailing list