diff options
author | Francois Pons <fpons@mandriva.com> | 2000-11-28 10:44:58 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-11-28 10:44:58 +0000 |
commit | 30e5a3bf393aaed401370cca8c79d9e2d5ed4839 (patch) | |
tree | ee6fdde07f61f734a8697b81919952f346a330b0 /tools | |
parent | eb0e9e7e7c4cc2c789540f60426ec1ddb3ecf33a (diff) | |
download | drakx-backup-do-not-use-30e5a3bf393aaed401370cca8c79d9e2d5ed4839.tar drakx-backup-do-not-use-30e5a3bf393aaed401370cca8c79d9e2d5ed4839.tar.gz drakx-backup-do-not-use-30e5a3bf393aaed401370cca8c79d9e2d5ed4839.tar.bz2 drakx-backup-do-not-use-30e5a3bf393aaed401370cca8c79d9e2d5ed4839.tar.xz drakx-backup-do-not-use-30e5a3bf393aaed401370cca8c79d9e2d5ed4839.zip |
updated.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/closurepkgs | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/tools/closurepkgs b/tools/closurepkgs index f060d1b29..d9e63af8e 100755 --- a/tools/closurepkgs +++ b/tools/closurepkgs @@ -1,7 +1,5 @@ #!/usr/bin/perl -use strict; - sub chop_version($) { ($_[0] =~ /(.*)-[^-]+-[^-]+/)[0] || $_[0]; } @@ -9,12 +7,13 @@ sub chop_version($) { sub read_depslist { my ($file) = @_; my $depslist = { 'ordered' => [], 'packages' => {} }; + my $id = 0; local *F; open F, $file or die "closurepkgs: unable to open ordered dependencies list file $file\n"; foreach (<F>) { my ($name, $size, @deps) = split; - push @{$depslist->{ordered}}, { name => $name, size => $size, deps => \@deps }; + push @{$depslist->{ordered}}, { id => $id++, name => $name, size => $size, deps => \@deps }; } close F; @@ -43,11 +42,16 @@ sub read_compsslist { } sub main { - my ($depslist_file, $compsslist_file) = @_; + my ($depslist_file, $compsslist_file, $lang) = @_; my $depslist = read_depslist($depslist_file); my $compsslist = read_compsslist($compsslist_file); - my @pkgs = qw(XFree86 XFree86-server XFree86-glide-module Device3Dfx Glide_V3-DRI Glide_V5 Mesa dhcpcd pump dhcpxd dhcp-client isdn4net isdn4k-utils dev pptp-adsl-fr rp-pppoe ppp ypbind rhs-printfilters lpr cups cups-drivers samba ncpfs); + #- DO NOT FORGET TO UPDATE HERE ACCORDING TO gi/perl-install/install_any.pm + my @pkgs = qw(XFree86 XFree86-glide-module Device3Dfx Glide_V3-DRI Glide_V5 Mesa + dhcpcd pump dhcpxd dhcp-client isdn4net isdn4k-utils dev pptp-adsl-fr rp-pppoe ppp ypbind + rhs-printfilters lpr cups cups-drivers samba ncpfs ghostscript-utils + kernel-pcmcia-cs apmd cdrecord + ); push @pkgs, "XFree86-$_" foreach qw(3DLabs 3dfx 8514 AGX FBDev I128 Mach8 Mach32 Mach64 Mono P9000 Rage128 S3 S3V SVGA VGA16 W32); #- closure the list of package to be kept for oem. @@ -56,10 +60,22 @@ sub main { $closure{$_} = 1; map { $closure{chop_version($_->{name})} = 1 } map { $depslist->{ordered}[$_] } map { split /\|/ } @{$depslist->{packages}{$_}{deps}}; } + #- only if dependancy is ok. + $closure{$_} = 1 foreach qw(xpp kups kisdn); #- closure the list of package to always install for oem. (level >= 50)... my %install; - foreach (grep { $compsslist->{$_} >= 70 } keys %{$depslist->{packages}}) { + my @force_install; + if ($depslist->{packages}{"locales-$lang"}) { + foreach (keys %{$depslist->{packages}}) { + push @force_install, $_ if grep { $_ == $depslist->{packages}{"locales-$lang"}{id} } @{$depslist->{packages}{$_}{deps}}; + } + } + push @force_install, qw(cups cups-drivers drakprofile draksync irda-utils numlock raidtools reiserfs-utils + Mesa Mesa-demos alsa alsa-utils); + foreach (qw( + Aurora xawtv kwintv xscreensaver-gl Mesa-demos xmms-mesa bzflag csmash gltron spacecup chromium tuxracer + ), @force_install, grep { $compsslist->{$_} >= 50 } keys %{$depslist->{packages}}) { $install{$_} = 1; map { $install{chop_version($_->{name})} = 1 } map { $depslist->{ordered}[$_] } map { split /\|/ } @{$depslist->{packages}{$_}{deps}}; } @@ -71,7 +87,9 @@ sub main { $install{chop_version($_->{name})} = 1 } map { $depslist->{ordered}[$_] } map { split /\|/ } @{$depslist->{packages}{'basesystem'}{deps}}; #- special packages that are to be move to closure always ... - foreach (qw(kernel-smp kernel-linus kernel-secure hackkernel-smp hackkernel-linus hackkernel-secure)) { + foreach (qw(kernel-smp kernel-linus kernel-secure hackkernel-smp hackkernel-linus hackkernel-secure + Aurora xawtv kwintv xscreensaver-gl xmms-mesa bzflag csmash gltron spacecup chromium tuxracer + )) { $depslist->{packages}{$_} or next; $closure{$_} = 1; delete $install{$_}; @@ -79,12 +97,17 @@ sub main { #- dump out the list of package according to the 2 lists defined above. my $total_install = 0; - map { $total_install += $depslist->{packages}{$_}{size}; - delete $closure{$_}; - print "I:", $depslist->{packages}{$_}{name}, "\n" } grep { $depslist->{packages}{$_} } keys %install; my $total_closure = 0; - map { $total_closure += $depslist->{packages}{$_}{size}; - print "C:", $depslist->{packages}{$_}{name}, "\n" } grep { $depslist->{packages}{$_} } keys %closure; + foreach (@{$depslist->{ordered}}) { + my $tiny_name = chop_version($_->{name}); + if (exists $install{$tiny_name}) { + $total_install += $depslist->{packages}{$tiny_name}{size}; + print "I:", $depslist->{packages}{$tiny_name}{name}, "\n"; + } elsif (exists $closure{$tiny_name}) { + $total_closure += $depslist->{packages}{$tiny_name}{size}; + print "C:", $depslist->{packages}{$tiny_name}{name}, "\n"; + } + } print "\n\ntotal_install=$total_install\n"; print "total_closure=$total_closure\n"; } |