diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-05-05 01:53:13 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-05-05 01:53:13 +0000 |
commit | d03f11065ce14b9868d3bdcb62673118488420ee (patch) | |
tree | e064bed23d8e168bd3145d6f6e347084cab533a1 | |
parent | 74d1e1590d9a6e9625f2a4c66e203e93f0258eed (diff) | |
download | perl-URPM-d03f11065ce14b9868d3bdcb62673118488420ee.tar perl-URPM-d03f11065ce14b9868d3bdcb62673118488420ee.tar.gz perl-URPM-d03f11065ce14b9868d3bdcb62673118488420ee.tar.bz2 perl-URPM-d03f11065ce14b9868d3bdcb62673118488420ee.tar.xz perl-URPM-d03f11065ce14b9868d3bdcb62673118488420ee.zip |
fix odd problems caused by attempt at translating correct tag names for query table into rpm tags
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | URPM.pm | 2 | ||||
-rw-r--r-- | URPM.xs | 7 | ||||
-rw-r--r-- | URPM/Resolve.pm | 4 |
4 files changed, 5 insertions, 10 deletions
@@ -1,5 +1,7 @@ Version 4.28 - May 2011, by Per Øyvind Karlsen +- fix odd problems caused by attempt at translating correct tag names for + query table into rpm tags - use newSVpvs() for pushing empty strings as constants in stead Version 4.27 - 4 May 2011, by Per Øyvind Karlsen @@ -159,7 +159,7 @@ sub traverse_tag { ++$count; } } - } elsif ($tag eq 'triggeredby' || $tag eq 'path') { + } elsif ($tag eq 'triggeredby' || $tag eq 'basenames') { foreach (@{$urpm->{depslist} || []}) { if (grep { exists $names{$_} } $_->files, grep { m!^/! } $_->provides_nosense) { $callback and $callback->($_); @@ -244,13 +244,6 @@ rpmtag_from_string(const char *tag) qv_c = NULL; static const char tag_context[] = "rpmtag", qv_context[] = "rpmqvsources"; - /* XXX: rpmcli.h: @todo Reassign to tag values. */ - if (!strcasecmp(tag, "whatprovides")) - return RPMTAG_PROVIDENAME; - else if (!strcasecmp(tag, "whatrequires")) - return RPMTAG_REQUIRENAME; - else if (!strcasecmp(tag, "path")) - return RPMTAG_BASENAMES; if(tag_c == NULL) { tag_c = rpmconstNew(); diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 14e7da3..6d7fad3 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -492,7 +492,7 @@ sub unsatisfied_requires { #- check on installed system if a package which is not obsoleted is satisfying the require. my $satisfied = 0; if ($n =~ m!^/!) { - $db->traverse_tag('path', [ $n ], sub { + $db->traverse_tag('basenames', [ $n ], sub { my ($p) = @_; exists $state->{rejected}{$p->fullname} and return; $state->{cached_installed}{$n}{$p->fullname} = undef; @@ -1093,7 +1093,7 @@ sub _handle_conflicts { foreach ($pkg->conflicts) { $keep && @$keep and last; if (my ($file) = m!^(/[^\s\[]*)!) { - $db->traverse_tag('path', [ $file ], sub { + $db->traverse_tag('basenames', [ $file ], sub { $keep && @$keep and return; my ($p) = @_; if ($keep) { |