summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-07-22 09:39:38 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-07-22 09:39:38 +0000
commitbc25ea4a6ee8505a77972e2a723607735a4e19f9 (patch)
treec8f6096b4902a63e16033879bd13d7ae4de10d98
parentebf39bc7297fa08a3798ccafffb4db5cfc15160a (diff)
downloaddrakx-backup-do-not-use-bc25ea4a6ee8505a77972e2a723607735a4e19f9.tar
drakx-backup-do-not-use-bc25ea4a6ee8505a77972e2a723607735a4e19f9.tar.gz
drakx-backup-do-not-use-bc25ea4a6ee8505a77972e2a723607735a4e19f9.tar.bz2
drakx-backup-do-not-use-bc25ea4a6ee8505a77972e2a723607735a4e19f9.tar.xz
drakx-backup-do-not-use-bc25ea4a6ee8505a77972e2a723607735a4e19f9.zip
no_comment
-rw-r--r--perl-install/Makefile2
-rwxr-xr-xperl-install/install217
-rw-r--r--perl-install/pkgs.pm19
-rw-r--r--perl-install/resize_fat/README4
-rw-r--r--perl-install/resize_fat/main.pm17
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;