[Yum-devel] RHEL6.2 Assigned bugs

James Antill james at fedoraproject.org
Tue Sep 20 15:29:31 UTC 2011


On Tue, 2011-09-20 at 10:41 -0400, Zdenek Pavlas wrote:
> Hi!
> 
> > What does "make check" do after you apply this?
> 
> + exit 0

 Fair enough.

> > Also I'm pretty sure the problem in the BZ doesn't want to trigger on
> > exactarch, 
> 
> I see..   It's probably very different thing.  'exactarch=0' only treats 
> 'compatible' arches (almost) equal, while this BZ is about 'noarch' packages.

 Yeh, IIRC "traditionally" there was a desire that if you had glibc.i586
installed and someone produced an updated glibc but only provided
glibc.i386 and glibc.i686 then you _didn't_ want to update to either
(because it wouldn't work).
 That's what exact arch was there to deal with.

 For possibly similar reasons we've also required Obsoletes when moving
from noarch to <arch> ... and this BZ (and your patch) is about that.
 Personally I can't remember/think why we'd want that, and it seems like
a valid change to try in rawhide if there are no test failures.

> This is probably better:
> 
>              # check to see if the pkg we want to install is not _quite_ the newest
>              # one but still technically an update over what is installed.
> -            pot_updated = self.rpmdb.searchNevra(name=available_pkg.name, arch=available_pkg.arch)
> +            pot_updated = [
> +                p for p in self.rpmdb.searchNevra(name=available_pkg.name)
> +                if p.arch == available_pkg.arch # exact match
> +                or 'noarch' in (p.arch, available_pkg.arch) # arch <=> noarch
> +            ]
>              if pot_updated and self.allowedMultipleInstalls(available_pkg):
>                  # only compare against the newest of what's installed for kernel
>                  pot_updated = sorted(pot_updated)[-1:]

 There's no need to make this a multiline list generator, just using a
for loop and append() is basically identical speed wise ... and stupid
people like me can more easily read it :).



More information about the Yum-devel mailing list