diff options
author | Francois Pons <fpons@mandriva.com> | 2001-06-28 15:42:47 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-06-28 15:42:47 +0000 |
commit | 650b57954ebb047a8de41c1d0b0ea4e779c5704f (patch) | |
tree | 427fc19583fe0f0012b610dcf29cbda880c3d71d | |
parent | 90f0ddcedeae721156de02165ba43368ca19545f (diff) | |
download | rpmtools-650b57954ebb047a8de41c1d0b0ea4e779c5704f.tar rpmtools-650b57954ebb047a8de41c1d0b0ea4e779c5704f.tar.gz rpmtools-650b57954ebb047a8de41c1d0b0ea4e779c5704f.tar.bz2 rpmtools-650b57954ebb047a8de41c1d0b0ea4e779c5704f.tar.xz rpmtools-650b57954ebb047a8de41c1d0b0ea4e779c5704f.zip |
cleaned rpmtools.
-rw-r--r-- | rpmtools.pm | 67 | ||||
-rw-r--r-- | rpmtools.spec | 6 |
2 files changed, 5 insertions, 68 deletions
diff --git a/rpmtools.pm b/rpmtools.pm index 5dceb4a..0b7e13a 100644 --- a/rpmtools.pm +++ b/rpmtools.pm @@ -405,58 +405,6 @@ sub read_depslist { 1; } -#- 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 ($params) = @_; - my $relocated_entries = 0; - - foreach (@{$params->{depslist} || []}) { - if ($params->{info}{$_->{name}} != $_) { - #- at this point, it is sure there is a package that - #- is multiply defined and this should be fixed. - #- remove access to info if arch is incompatible and only - #- take into account compatible arch to examine. - #- correct info hash by prefering first better version, - #- then better release, then better arch. - my $p = $params->{info}{$_->{name}}; - if ($p && !compat_arch($p->{arch})) { - delete $params->{info}{$_->{name}}; - } - if (compat_arch($_->{arch})) { - if ($p) { - my $cmp_version = $_->{serial} == $p->{serial} && version_compare($_->{version}, $p->{version}); - my $cmp_release = $cmp_version == 0 && version_compare($_->{release}, $p->{release}); - if ($_->{serial} > $p->{serial} || $cmp_version > 0 || $cmp_release > 0 || - ($_->{serial} == $p->{serial} && $cmp_version == 0 && $cmp_release == 0 && - better_arch($_->{arch}, $p->{arch}))) { - $params->{info}{$_->{name}} = $_; - ++$relocated_entries; - } - } else { - $params->{info}{$_->{name}} = $_; - ++$relocated_entries; - } - } - } - } - - #- relocate id used in depslist array, delete id if the package - #- should NOT be used. - if ($relocated_entries) { - foreach (@{$params->{depslist}}) { - $_->{source} and next; #- hack to avoid losing local package. - if (defined $params->{info}{$_->{name}}) { - $_->{id} = $params->{info}{$_->{name}}{id}; - } else { - delete $_->{id}; - } - } - } - - $relocated_entries; -} - #- write depslist.ordered file according to info in params. sub write_depslist { my ($params, $FILE, $min, $max) = @_; @@ -621,19 +569,4 @@ sub package_name_compare { $a cmp $b; #- fall back. } -#- compability function which should be removed soon, do not use anymore and replace code. -sub get_packages_installed { - my ($prefix, $packages, $names, $flags) = @_; $flags ||= [ qw(name version release)]; - my $db = db_open($prefix); - my $count = db_traverse_tag($db, "name", $names, $flags, sub { my ($p) = @_; push @$packages, $p; }); - db_close($db); - $count; -} -sub get_all_packages_installed { - my ($prefix, $packages, $flags) = @_; $flags ||= [ qw(name version release)]; - my $db = db_open($prefix); - my $count = db_traverse($db, $flags, sub { my ($p) = @_; push @$packages, $p; }); - db_close($db); - $count; -} 1; diff --git a/rpmtools.spec b/rpmtools.spec index 639cf46..86316b6 100644 --- a/rpmtools.spec +++ b/rpmtools.spec @@ -1,5 +1,5 @@ %define name rpmtools -%define release 5mdk +%define release 6mdk # do not modify here, see Makefile in the CVS %define version 3.0 @@ -54,6 +54,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/perl5/man/*/* %changelog +* Thu Jun 28 2001 François Pons <fpons@mandrakesoft.com> 3.0-6mdk +- removed some specific urpm code to urpm package. +- removed obsoleted methods. + * Wed Jun 27 2001 François Pons <fpons@mandrakesoft.com> 3.0-5mdk - fix problem interpreting serial. |