diff options
-rw-r--r-- | perl-install/install_any.pm | 5 | ||||
-rw-r--r-- | perl-install/install_interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/keyboard.pm | 2 | ||||
-rw-r--r-- | perl-install/mouse.pm | 9 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 33 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 5 | ||||
-rw-r--r-- | tools/Makefile | 6 |
7 files changed, 35 insertions, 27 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 38ca70d54..8485fc163 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -290,7 +290,7 @@ sub setPackages($) { #- must be done after selecting base packages (to save memory) pkgs::getProvides($o->{packages}); - $o->{compss} = pkgs::readCompss($o->{packages}); + $o->{compss} = pkgs::readCompss($o->{prefix}, $o->{packages}); #- must be done after getProvides $o->{compssListLevels} = pkgs::readCompssList($o->{packages}); ($o->{compssUsers}, $o->{compssUsersSorted}) = pkgs::readCompssUsers($o->{packages}, $o->{compss}); @@ -304,7 +304,8 @@ sub setPackages($) { $_->{values} = [ map { $_ + 50 } @{$_->{values}} ] foreach grep {$_} map { pkgs::packageByName($o->{packages}, $_) } @l; } else { - #- this has to be done to make sure the hdlist files and depslist file are present. + #- this has to be done to make sure necessary files for urpmi are + #- present. pkgs::psUpdateHdlistsDeps($o->{prefix}, $o->{method}); #- remove upgrade flag with selection one. TOCHECK diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index 62cd9858c..83b6c0a16 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -182,7 +182,7 @@ sub setup_thiskind { if ($allow_probe) { @l = $o->load_thiskind($type); - if (my @err = grep { $_->{error} } map { $_->{error} } @l) { + if (my @err = grep { $_ } map { $_->{error} } @l) { $o->ask_warn('', join("\n", @err)); } return @l if $auto && (@l || !$at_least_one); diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index be74d2375..f5c4dc5a7 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -263,7 +263,7 @@ sub setup($) { load(cat_($f)); } else { local *F; - open F, "extract_archive $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].kmap |"; + open F, "packdrake -x $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].kmap |"; local $/ = undef; eval { load(<F>) }; } diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 30f3eaa31..af0a35a79 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -101,7 +101,7 @@ sub list { @mouses } sub name2mouse { my ($name) = @_; foreach (@mouses) { - return { %$_ } if $name eq $_->{FULLNAME}; + $name eq $_->{FULLNAME} and return $_; } die "$name not found"; } @@ -167,7 +167,7 @@ sub detect() { return name2mouse("Apple ADB Mouse"); } - detect_devices::hasMousePS2 and return { unsafe => 1, %{name2mouse("Generic Mouse (PS/2)")} }; + detect_devices::hasMousePS2 and return { %{name2mouse("Generic Mouse (PS/2)")}, unsafe => 1 }; eval { commands::modprobe("serial") }; my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r; @@ -186,6 +186,7 @@ sub detect() { modules::unload("usbmouse"); } - #- defaults to generic ttyS0 - { device => "ttyS0", unsafe => 1, %{name2mouse("Generic Mouse (serial)")} }; + #- defaults to generic serial mouse on ttyS0. + #- Oops? using return let return a hash ref, if not using it, it return a list directly :-) + return { %{name2mouse("Generic Mouse (serial)")}, device => "ttyS0", unsafe => 1 }; } diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 021d61657..4f300e226 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -399,16 +399,17 @@ sub psUpdateHdlistsDeps { #- copy hdlist file directly to $prefix/var/lib/urpmi, this will be used #- for getting header of package during installation or after by urpmi. my $fakemedium = $method . $medium; - my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz2"; + my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz2" . ($hdlist =~ /\.cz2/ && "2"); -e $newf and do { unlink $newf or die "cannot remove $newf: $!"; }; install_any::getAndSaveFile($hdlist, $newf) or die "no $hdlist found"; symlinkf $newf, "/tmp/$hdlist"; ++$medium; } - #- this is necessary for urpmi, but also as hdlist are copied here, - #- we can make consistent the directory. - install_any::getAndSaveFile("depslist", "$prefix/var/lib/urpmi/depslist"); + #- this is necessary for urpmi. + install_any::getAndSaveFile("depslist.ordered", "$prefix/var/lib/urpmi/depslist.ordered"); + install_any::getAndSaveFile("provides", "$prefix/var/lib/urpmi/provides"); + install_any::getAndSaveFile("compss", "$prefix/var/lib/urpmi/compss"); } sub psUsingHdlists { @@ -461,7 +462,7 @@ sub psUsingHdlist { #- copy hdlist file directly to $prefix/var/lib/urpmi, this will be used #- for getting header of package during installation or after by urpmi. - my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz2"; + my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz" . ($hdlist =~ /\.cz2/ && "2"); -e $newf and do { unlink $newf or die "cannot remove $newf: $!"; }; install_any::getAndSaveFile($fhdlist || $hdlist, $newf) or die "no $hdlist found"; symlinkf $newf, "/tmp/$hdlist"; @@ -549,11 +550,9 @@ sub getOtherDeps($$) { sub getDeps($) { my ($prefix, $packages) = @_; - #- this is necessary for urpmi, but also as hdlist are copied here, - #- we can make consistent the directory. - install_any::getAndSaveFile("depslist", "$prefix/var/lib/urpmi/depslist"); - - my $f = install_any::getFile("depslist.ordered") or die "can't find dependencies list"; + #- this is necessary for urpmi. + install_any::getAndSaveFile("depslist.ordered", "$prefix/var/lib/urpmi/depslist.ordered"); + install_any::getAndSaveFile("provides", "$prefix/var/lib/urpmi/provides"); #- beware of heavily mismatching depslist.ordered file against hdlist files. my $mismatch = 0; @@ -562,7 +561,9 @@ sub getDeps($) { #- cross reference to be resolved on id (think of loop requires) #- provides should be updated after base flag has been set to save #- memory. - foreach (<$f>) { + local *F; + open F, "$prefix/var/lib/urpmi/depslist.ordered" or die "cann't find dependancies list"; + foreach (<F>) { my ($name, $version, $release, $sizeDeps) = /^(\S*)-([^-\s]+)-([^-\s]+)\s+(.*)/; my $pkg = $packages->[0]{$name}; @@ -612,11 +613,15 @@ sub getProvides($) { } sub readCompss { - my ($packages) = @_; + my ($prefix, $packages) = @_; my ($p, @compss); - my $f = install_any::getFile("compss") or die "can't find compss"; - foreach (<$f>) { + #- this is necessary for urpmi. + install_any::getAndSaveFile("compss", "$prefix/var/lib/urpmi/compss"); + + local *F; + open F, "$prefix/var/lib/urpmi/compss" or die "can't find compss"; + foreach (<F>) { /^\s*$/ || /^#/ and next; s/#.*//; diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 1f041140d..7e023b74d 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -127,10 +127,11 @@ sub setup_gsdriver($$$;$) { do { $printer->{DBENTRY} ||= $printer::thedb_gsdriver{$printer->{GSDRIVER}}{ENTRY}; eval { $printer->{DBENTRY} = $printer::descr_to_db{ - $in->ask_from_list_with_help_(_("Configure Printer"), +# $in->ask_from_list_with_help_(_("Configure Printer"), #- tempory sucks TODO + $in->ask_from_list_(_("Configure Printer"), _("What type of printer do you have?"), [ @printer::entry_db_description ], - { %printer::descr_to_help }, + # { %printer::descr_to_help }, $printer::db_to_descr{$printer->{DBENTRY}}, ) }; diff --git a/tools/Makefile b/tools/Makefile index 834d727cd..0854d15ae 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -24,16 +24,16 @@ xhost+: %: %.c ddcprobe/ddcxinfos: $(MAKE) -C ddcprobe ddcxinfos -$(BASE)/compss: $(BASE)/hdlists $(BASE)/hdlist.cz2 +$(BASE)/compss: $(BASE)/hdlists $(BASE)/hdlist.cz ./gencompss `cat $< | perl -pe 's|^(\S*).*|'$(BASE)'/$$1|' ` > $@ -$(BASE)/depslist: $(BASE)/hdlists $(BASE)/hdlist.cz2 +$(BASE)/depslist: $(BASE)/hdlists $(BASE)/hdlist.cz gendepslist2 -o $@ `cat $< | perl -pe 's|^(\S*).*|'$(BASE)'/$$1|' ` $(BASE)/filelist: $(RPMS) genfilelist $(ROOTDEST)/Mandrake/RPMS* >$@ -$(BASE)/hdlist.cz2: $(BASE)/hdlists $(RPMS) +$(BASE)/hdlist.cz: $(BASE)/hdlists $(RPMS) genhdlists --noclean --distrib $(ROOTDEST) clean: |