Your message dated Sat, 12 Feb 2011 04:53:58 -0800 (PST)
with message-id <[email protected]>
and subject line To claim email us on, [email protected] your name & PIN 
0510ST to redeem.
has caused the Debian Bug report #79941,
regarding [U-A] update-alternatives: user alternatives
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
79941: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=79941
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dpkg
Version: 1.7.2
Severity: wishlist
File: /usr/sbin/update-alternatives

Below is a small path and a small shell script which will from now on
use ~/.alternatives/<prog> if its available and fallback to
/etc/alternatives/<prog> if not.

WARNING:
I'm assuming that e.g. /usr/bin/foo will allways link to
/etc/alternatives/foo, if some foo links to /etc/alternatives/bar this
will break on the next update.

--------------------[ update-alternatives patch ]---------------------
--- /usr/sbin/update-alternatives.orig  Sun Dec 10 22:50:50 2000
+++ update-alternatives Sun Dec 10 23:35:08 2000
@@ -51,6 +51,7 @@
 sub quit { print STDERR "update-alternatives: @_\n"; exit(2); }
 sub badusage { print STDERR "update-alternatives: @_\n\n"; &usageversion; 
exit(2); }
 
+$alternative_prog='/bin/alternatives';
 $altdir= '/etc/alternatives';
 $admindir="/var/lib/dpkg" . '/alternatives';
 $testmode= 0;
@@ -271,6 +272,18 @@
             &quit("unable to rename $link to $alink: $!");
     }
     $link= $alink;
+    if (!defined($linkname= readlink($link)) && $! != &ENOENT) {
+      &pr("warning: $link is supposed to be a symlink to $alternative_prog\n".
+         " (or nonexistent); however, readlink failed: $!")
+       if $verbosemode > 0;
+    } elsif ($linkname ne "$alternative_prog") {
+      unlink("$link.dpkg-tmp") || $! == &ENOENT ||
+       &quit("unable to ensure $link.dpkg-tmp nonexistent: $!");
+      symlink("$alternative_prog","$link.dpkg-tmp") ||
+       &quit("unable to make $link.dpkg-tmp a symlink to $altdir/$name: $!");
+      rename_mv("$link.dpkg-tmp",$link) ||
+       &quit("unable to install $link.dpkg-tmp as $link: $!");
+    }
     if (!defined($i= $versionnum{$apath})) {
         push(@versions,$apath);
         $versionnum{$apath}= $i= $#versions;
@@ -404,13 +417,13 @@
         exit(0);
     } else {
         if (!defined($linkname= readlink($link)) && $! != &ENOENT) {
-            &pr("warning: $link is supposed to be a symlink to 
$altdir/$name\n".
+            &pr("warning: $link is supposed to be a symlink to 
$alternative_prog\n".
                 " (or nonexistent); however, readlink failed: $!")
               if $verbosemode > 0;
-        } elsif ($linkname ne "$altdir/$name") {
+        } elsif ($linkname ne "$alternative_prog") {
             unlink("$link.dpkg-tmp") || $! == &ENOENT ||
                 &quit("unable to ensure $link.dpkg-tmp nonexistent: $!");
-            symlink("$altdir/$name","$link.dpkg-tmp") ||
+            symlink("$alternative_prog","$link.dpkg-tmp") ||
                 &quit("unable to make $link.dpkg-tmp a symlink to 
$altdir/$name: $!");
             rename_mv("$link.dpkg-tmp",$link) ||
                 &quit("unable to install $link.dpkg-tmp as $link: $!");


----------------------------------------------------------------------
------------------------[ /bin/alternatives ]-------------------------
#!/bin/sh

PROG="`basename "$0"`"

if [ -e "$HOME/.alternatives/$PROG" ]; then
  exec ~/.alternatives/$PROG "$@"
  echo "WARNING: invalid user alternative defined for $PROG!"
fi

if [ -e "/etc/alternatives/$PROG" ]; then
  exec /etc/alternatives/$PROG "$@"
  echo "WARNING: invalid system alternative defined for $PROG!"
fi

echo "ERROR: no valid alternative defined for $PROG!"
exit 1
----------------------------------------------------------------------

MfG
        Goswin

-- System Information
Debian Release: woody
Architecture: i386
Kernel: Linux dual 2.2.17 #1 SMP Mon Sep 4 06:13:20 CEST 2000 i686

Versions of packages dpkg depends on:
ii  libc6                        2.2-4       GNU C Library: Shared libraries an
ii  libncurses5                  5.0-8       Shared libraries for terminal hand
ii  libstdc++2.10-glibc2.2       1:2.95.2-18 The GNU stdc++ library            



--- End Message ---
--- Begin Message ---

SPRINT has Awarded your Email address GBP £1.000.000.00 in 2011 Anniversary 
draw to claim email us on, [email protected] your name & PIN 0510ST to redeem.

--- End Message ---

Reply via email to