[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problem setting uplibglide



I got the following error during my upgrade from potatoe to woody this
morning.

Setting up libglide2 (2000.08.08) ...
Undefined subroutine &Debian::DebConf::Client::ConfModule::version called at /usr/lib/glide2/libglide2.conf line 29.
dpkg: error processing libglide2 (--configure):
 subprocess post-installation script returned error exit status 29
dpkg: dependency problems prevent configuration of glide2-bin:
 glide2-bin depends on libglide2; however:
  Package libglide2 is not configured yet.
dpkg: error processing glide2-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of glide2-base:
 glide2-base depends on libglide2; however:
  Package libglide2 is not configured yet.
 glide2-base depends on glide2-bin; however:
  Package glide2-bin is not configured yet.
dpkg: error processing glide2-base (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libglide2
 glide2-bin
 glide2-base
and here is the conf file they were talking about.

#!/usr/bin/perl -w
# Copyright (C) 2000  Zephaniah E. Hull.
# This code is under the GNU GPL, see /usr/share/common-licenses/GPL.

use strict;
use Debian::DebConf::Client::ConfModule;
# This is not elegant, nor clean, it was written at 4am and works.

main();

my (%types, %type_map);
BEGIN {
    %types = (
	"Voodoo"		=> "sst1",
	"Voodoo 2"		=> "cvg",
	"Voodoo Banshee"	=> "h3",
	"Voodoo Banshee [Velocity 100]" => "h3",
	"Voodoo 3"		=> "h3",
    );
    %type_map = (
	"sst1"	=> "/usr/lib/glide2/libglide_sst1.so.2.46",
	"cvg"	=> "/usr/lib/glide2/libglide_cvg.so.2.53",
	"h3"	=> "/usr/lib/glide2/libglide_h3.so.2.60",
    );
}

sub main {
    my (@cards, $driver);
    Debian::DebConf::Client::ConfModule::version('2.0');
    Debian::DebConf::Client::ConfModule::title('glide2 configuration');

    @cards = get_devices();
    if ($#cards == -1) {
	my ($choice);
	Debian::DebConf::Client::ConfModule::input('critical', 'libglide2/no_card');
	Debian::DebConf::Client::ConfModule::go();
	$choice = Debian::DebConf::Client::ConfModule::get('libglide2/no_card');
	if ($choice eq "true") {
	    Debian::DebConf::Client::ConfModule::input('critical', 'libglide2/driver');
	    Debian::DebConf::Client::ConfModule::go();
	} else {
#	    Debian::DebConf::Client::ConfModule::stop();
	    exit(1);
	}
    } elsif ($#cards == 0) {
	Debian::DebConf::Client::ConfModule::set('libglide2/driver', ${$cards[0]}{'Driver'});
	Debian::DebConf::Client::ConfModule::go();
    } else {
	my (%card, $card, $choices, %choices, $choice, $tmp);

	for $card (@cards) {
	    %card = %$card;
	    if (defined($card{'SVendor'})) {
		$tmp = sprintf("%s %s (%s)", $card{'SVendor'}, $card{'SDevice'}, $card{'Device'});
	    } else {
		$tmp = sprintf("3Dfx %s", $card{'Device'});
	    }
	    $tmp =~ s/,//g;

	    $choices{$tmp} = $card{'Driver'};
	}

	$choices = join(', ', keys(%choices));
	Debian::DebConf::Client::ConfModule::subst('libglide2/card', 'choices', $choices);
	Debian::DebConf::Client::ConfModule::input('high', 'libglide2/card');
	Debian::DebConf::Client::ConfModule::go();
	$choice = Debian::DebConf::Client::ConfModule::get('libglide2/card');

	$tmp = $choices{$choice};
	Debian::DebConf::Client::ConfModule::set('libglide2/driver', $tmp);
    }
	
#    Debian::DebConf::Client::ConfModule::stop();
}

sub select_device {
    my ($type, $file, $target);
    $target = '/usr/lib/libglide.so.2';
    $type = shift;

    if (!defined($type_map{$type})) { die("No mapping for type " . $type); }
    $file = $type_map{$type};
    if (!-f $file) { die($file . " does not exist."); }

    if (-e $target) {
	if (-l $target) { unlink($target); } else {
	    die($target . " exists but is NOT a symlink!")
	}
    }
    symlink($file, "/usr/lib/libglide.so.2");
}

sub get_devices {
    my ($raw, $dev, $line, $tmp, @cards);
    $raw = `lspci -vm`;


    foreach $dev (split(/\n\n/, $raw)) {
	my (%info);
	foreach $line (split(/\n/, $dev)) {
	    if($line =~ /^(Class|Vendor|Device|SVendor|SDevice|Rev):\s+(.*)$/){
		$info{$1} = $2;
	    }
	}
	if (defined($types{$info{'Device'}})) {
	    $info{"Driver"} = $types{$info{"Device"}};
	    push(@cards, \%info);
	}
    }

    return @cards;
}

Now I am not sure what is going on so how do I fix this?

Any assistance would be appreciated.

-- 
         John Covici
         covici@ccs.covici.com



Reply to: