Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 431273 - pirut can't find installed packages
pirut can't find installed packages
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: James Antill
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-02-01 16:54 EST by petrosyan
Modified: 2014-01-21 18:01 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-04 19:13:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description petrosyan 2008-02-01 16:54:56 EST
Description of problem:
pirut can't find installed packages

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. search for a package via pirut which is already installed (for example 'codeina')

Actual results:
pirut says that no packages by that name exist

Expected results:
pirut should find the installed package
Comment 1 Jeremy Katz 2008-02-01 17:29:35 EST
This is jantill's fault ;-)

The change with real_crit and real_crit_lower is the cause.  We can fix by also
doing the rpmdb search against real_crit, but he may have something a little bit
more elegant
Comment 2 James Antill 2008-02-01 17:56:36 EST
 I'm happy to take the blame :), but I don't understand ... we do value.lower()
on all the rpmdb pkg fields, as we did before and the real_crit_lower should
just be moving the .lower() from each call to once.
 And I can search for unixODBC fine from the terminal.
Comment 3 James Antill 2008-02-04 18:33:41 EST
 Ok, I _think_ the bug here is that the end result does:

            for (po, matched) in sorted(sorted_lists[val],
                if (po.name, po.arch) not in yielded:
                    yield (po, matched)
                    yielded[(po.name, po.arch)] = 1

...which sorts the packages and then _only_ yields the po, if the po.name,
po.arch hasn't been seen before.
 This is "good" for the cmd line, as then we don't get lots of duplication, as
we only output the name.arch ... but pirut does:

 if pos.repoid != "installed" and self.simpleDBInstalled(po.name, po.arch):

...on the results, _and_ outputs the versions.

 On the upside, I'm pretty sure this is Seth's fault :) ... although I might
have asked for the reduction in output for the cmd line :(.

 The obvious two solutions are:

1. Drop the filtering from searchGen() and do the same thing in cli.py
2. Add an arg. to optionally enable/disable the filtering

...any preferences?
Comment 4 James Antill 2008-02-04 19:14:27 EST
went with option #2, defaulting to make pirut work again :).

Note You need to log in before you can comment on or make changes to this bug.