aboutsummaryrefslogtreecommitdiffstats
path: root/rpmtools.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-02-26 15:06:04 +0000
committerFrancois Pons <fpons@mandriva.com>2001-02-26 15:06:04 +0000
commit6f0752912256cbf1cdc2cf1ed3e3b59ae92e7e5f (patch)
tree22fe4f2d50b4a91aa3da98f30b83e903b24b40f3 /rpmtools.pm
parent5793e3408624f83c9f12d76b340f20b2da63d849 (diff)
downloadrpmtools-6f0752912256cbf1cdc2cf1ed3e3b59ae92e7e5f.tar
rpmtools-6f0752912256cbf1cdc2cf1ed3e3b59ae92e7e5f.tar.gz
rpmtools-6f0752912256cbf1cdc2cf1ed3e3b59ae92e7e5f.tar.bz2
rpmtools-6f0752912256cbf1cdc2cf1ed3e3b59ae92e7e5f.tar.xz
rpmtools-6f0752912256cbf1cdc2cf1ed3e3b59ae92e7e5f.zip
*** empty log message ***
Diffstat (limited to 'rpmtools.pm')
-rw-r--r--rpmtools.pm14
1 files changed, 4 insertions, 10 deletions
diff --git a/rpmtools.pm b/rpmtools.pm
index 891321a..5c31a85 100644
--- a/rpmtools.pm
+++ b/rpmtools.pm
@@ -81,7 +81,6 @@ sub new {
my ($class, @tags) = @_;
my %tags; @tags{@_} = ();
bless {
- use_base_flag => 0,
flags => [ qw(name version release size arch group requires provides),
grep { exists $tags{$_} } qw(sense files obsoletes conflicts conffiles) ],
info => {},
@@ -272,7 +271,7 @@ sub compute_depslist {
ref $_ or $params->{info}{$_} and $params->{info}{$_}{base} = undef;
}
#- some package are always installed as base and can safely be marked as such.
- foreach (qw(glibc)) {
+ foreach (qw(basesystem glibc)) {
$params->{info}{$_} and $params->{info}{$_}{base} = undef;
}
@@ -295,7 +294,7 @@ sub compute_depslist {
foreach (@$_) {
my ($id, $base) = $params->{info}{$_} ? ($params->{info}{$_}{id}, exists $params->{info}{$_}{base}) : ($_, 0);
$base and push @choices_base_id, $id;
- $base &&= $params->{use_base_flag} && $pkg->{name} ne 'basesystem';
+ $base &&= ! exists $pkg->{base};
$to_drop ||= $id == $pkg->{id} || $requires_id{$id} || $base;
push @choices_id, $id;
}
@@ -315,13 +314,12 @@ sub compute_depslist {
}
#- select individual package.
- $base &&= $params->{use_base_flag} && $pkg->{name} ne 'basesystem';
+ $base &&= ! exists $pkg->{base};
$requires_id{$id} = $_;
$id == $pkg->{id} || $base or push @requires_id, $id;
}
#- cannot remove requires values as they are necessary for closure on incremental job.
$pkg->{deps} = join(' ', map { join '|', @{ref $_ ? $_ : [$_]} } @requires_id);
- $pkg->{name} eq 'basesystem' and $params->{use_base_flag} = 1;
push @{$params->{depslist}}, $pkg;
}
1;
@@ -356,11 +354,9 @@ sub read_depslist {
foreach (split ' ', $params->{info}{basesystem}{deps}) {
/\|/ or push @requires_id, $_;
}
- foreach (@requires_id) {
+ foreach ($params->{info}{basesystem}{id}, @requires_id) {
$params->{depslist}[$_] and $params->{depslist}[$_]{base} = undef;
}
- $params->{info}{basesystem}{base} = undef; #- make sure.
- $params->{use_base_flag} = 1;
}
1;
}
@@ -451,7 +447,6 @@ sub keep_only_cleaned_provides_files {
}
#- clean everything else at this point.
- $params->{use_base_flag} = 0;
$params->{info} = {};
$params->{depslist} = [];
}
@@ -460,7 +455,6 @@ sub keep_only_cleaned_provides_files {
sub clean {
my ($params) = @_;
- $params->{use_base_flag} = 0;
$params->{info} = {};
$params->{depslist} = [];
$params->{provides} = {};