diff options
-rw-r--r-- | perl-install/Makefile | 2 | ||||
-rwxr-xr-x | perl-install/install2 | 17 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 19 | ||||
-rw-r--r-- | perl-install/resize_fat/README | 4 | ||||
-rw-r--r-- | perl-install/resize_fat/main.pm | 17 |
5 files changed, 48 insertions, 11 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile index d4aec1cdb..bfc8a9622 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -5,7 +5,7 @@ DEST = $(ROOTDEST)/Mandrake/instimage DESTREP4PMS = $(DEST)/usr/bin/perl-install PERL = perl LOCALFILES = $(PERL) mouseconfig -EXCLUDE = $(LOCALFILES) boot-hd.img keymaps xmodmaps consolefonts +EXCLUDE = $(LOCALFILES) boot-hd.img keymaps xmodmaps consolefonts install .PHONY: all po tags install clean verify_c diff --git a/perl-install/install2 b/perl-install/install2 index 016bafabc..e299e423f 100755 --- a/perl-install/install2 +++ b/perl-install/install2 @@ -1,5 +1,22 @@ #!/usr/bin/perl +# DiskDrake +# Copyright (C) 1999 MandrakeSoft +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + use diagnostics; use strict; diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 45848cd9a..bb485e767 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -102,12 +102,12 @@ sub psUsingDirectory(;$) { $dirname ||= install_any::imageGetFile(''); log::l("scanning $dirname for packages"); - foreach (glob_("$dirname/*.rpm")) { - local *F; - open F, $_ or log::l("failed to open package $_: $!"); - my $header = c::rpmReadPackageHeader(fileno F) or log::l("failed to rpmReadPackageHeader $_: $!"); - my $name = c::headerGetEntry($header, 'name'); - addInfosFromHeader(\%packages, $header, $_); + foreach (all("$dirname")) { + my ($name, $version, $release) = /(.*)-([^-]+)-([^-.]+)\.[^.]+\.rpm/ or log::l("skipping $_"), next; + $packages{$name} = { + name => $name, version => $version, release => $release, + file => "$dirname/$_", selected => 0, deps => [], + }; } \%packages; } @@ -118,9 +118,10 @@ sub getDeps($) { local *F; open F, install_any::imageGetFile("depslist"); # or die "can't find dependencies list"; foreach (<F>) { - my ($name, @deps) = split; - Package($packages, $name)->{deps} = \@deps; - map { push @{Package($packages, $_)->{provides}}, $name } @deps; + my ($name, $size, @deps) = split; + $packages->{$name}->{size} = $size; + $packages->{$name}->{deps} = \@deps; + map { push @{$packages->{$_}->{provides}}, $name } @deps; } } diff --git a/perl-install/resize_fat/README b/perl-install/resize_fat/README index 2910c06c3..1c4798c82 100644 --- a/perl-install/resize_fat/README +++ b/perl-install/resize_fat/README @@ -1,5 +1,7 @@ -just do ./resize.pm and look at usage. +TODO: +resize_fat::fat::update($fs) should be called before doing undoable things +(before the sync in construct_dir_tree) BUGS: no known bugs :) diff --git a/perl-install/resize_fat/main.pm b/perl-install/resize_fat/main.pm index d9f7a2181..fe50ddd12 100644 --- a/perl-install/resize_fat/main.pm +++ b/perl-install/resize_fat/main.pm @@ -1,5 +1,22 @@ #!/usr/bin/perl +# DiskDrake +# Copyright (C) 1999 MandrakeSoft +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + package resize_fat::main; use diagnostics; |