#!/usr/bin/perl -- $admindir= "/var/lib/dpkg"; # This line modified by Makefile $dpkglibdir= "../utils"; # This line modified by Makefile $version= '0.93.80'; # This line modified by Makefile push (@INC, $dpkglibdir); require 'dpkg-gettext.pl'; textdomain("dpkg"); ($0) = $0 =~ m:.*/(.+):; # Global variables: # $alink Alternative we are managing (ie the symlink we're making/removing) (install only) # $name Name of the alternative (the symlink) we are processing # $apath Path of alternative we are offering # $apriority Priority of link (only when we are installing an alternative) # $mode action to perform (display / install / remove / display / auto / config) # $manual update-mode for alternative (manual / auto) # $state State of alternative: # expected: alternative with highest priority is the active alternative # expected-inprogress: busy selecting alternative with highest priority # unexpected: alternative another alternative is active / error during readlink # nonexistent: alternative-symlink does not exist # $link Link we are working with # @slavenames List with names of slavelinks # %slavenum Map from name of slavelink to slave-index (into @slavelinks) # @slavelinks List of slavelinks (indexed by slave-index) # %versionnum Map from currently available versions into @versions and @priorities # @versions List of available versions for alternative # %priorities Map from @version-index to priority # %slavepath Map from (@version-index,slavename) to slave-path $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"), $0, $version; printf _g(" Copyright (C) 1995 Ian Jackson. Copyright (C) 2000-2002 Wichert Akkerman."); printf _g(" This is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is NO warranty. "); } sub usage { printf _g( "Usage: %s [