aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-06-28 08:44:23 +0000
committerFrancois Pons <fpons@mandriva.com>2002-06-28 08:44:23 +0000
commitc1a17c783ad0accd7f7434500bbf2725972631e4 (patch)
treef87ce2c06a9adb55008b1b97487bb1ebec9cbab3 /URPM.pm
parent1681c5cab2a0c47a3d38dad85e4835edd4fcba77 (diff)
downloadperl-URPM-c1a17c783ad0accd7f7434500bbf2725972631e4.tar
perl-URPM-c1a17c783ad0accd7f7434500bbf2725972631e4.tar.gz
perl-URPM-c1a17c783ad0accd7f7434500bbf2725972631e4.tar.bz2
perl-URPM-c1a17c783ad0accd7f7434500bbf2725972631e4.tar.xz
perl-URPM-c1a17c783ad0accd7f7434500bbf2725972631e4.zip
0.05-1mdk
Diffstat (limited to 'URPM.pm')
-rw-r--r--URPM.pm52
1 files changed, 1 insertions, 51 deletions
diff --git a/URPM.pm b/URPM.pm
index 4ba32ad..60e5312 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -6,7 +6,7 @@ use vars qw($VERSION @ISA);
require DynaLoader;
@ISA = qw(DynaLoader);
-$VERSION = '0.04';
+$VERSION = '0.05';
bootstrap URPM $VERSION;
@@ -78,53 +78,3 @@ sub traverse_tag {
$count;
}
-
-#- relocate depslist array id to use only the most recent packages,
-#- reorder info hashes to give only access to best packages.
-sub relocate_depslist {
- my ($urpm, %options) = @_;
- my $relocated_entries = 0;
-
- #- reset names hash now, will be filled after.
- $urpm->{names} = {};
-
- foreach (@{$urpm->{depslist} || []}) {
- #- remove access to info if arch is incompatible and only
- #- take into account compatible arch to examine.
- #- set names hash by prefering first better version,
- #- then better release, then better arch.
- if ($_->is_arch_compat) {
- my $p = $urpm->{names}{$_->name};
- if ($p) {
- if ($_->compare_pkg($p) > 0) {
- $urpm->{names}{$_->name} = $_;
- ++$relocated_entries;
- }
- } else {
- $urpm->{names}{$_->name} = $_;
- }
- } elsif ($_->arch ne 'src') {
- #- the package is removed, make it invisible (remove id).
- my $id = $_->set_id;
-
- #- the architecture is not compatible, this means the package is dropped.
- #- we have to remove its reference in provides.
- foreach ($_->provides) {
- delete $urpm->{provides}{$_}{$id};
- }
- }
- }
-
- #- relocate id used in depslist array, delete id if the package
- #- should NOT be used.
- #- if no entries have been relocated, we can safely avoid this computation.
- if ($relocated_entries) {
- foreach (@{$urpm->{depslist}}) {
- my $p = $urpm->{names}{$_->name} or next;
- $_->set_id($p->id);
- }
- }
-
- $relocated_entries;
-}
-