[Yum-devel] [PATCH] for yum-utils/repodiff.py: Fix package resolution for --compare-arch

James Antill james at fedoraproject.org
Thu Mar 15 19:50:37 UTC 2012


On Thu, 2012-03-15 at 11:52 -0700, Stefan Reimer wrote:
> +        pkgs_by_arch ={}
> +        if compare_arch:
> +            # We have to split pkgs by arch, otherwise
> +            # we yield wrong "removed, added" instead of modified,updated 
> +            # e.g. pkgs_by_arch['x86_64'] = ['pkg1', 'pkg2']
> +            for p in self.pkgSack.returnPackages():
> +                if p.arch not in pkgs_by_arch:
> +                   pkgs_by_arch[p.arch] = []
> +                pkgs_by_arch[p.arch].append(p)
> +        else:
> +            pkgs_by_arch['all'] = self.pkgSack.returnPackages()

 The problem is that we've now gone from something that is "wrong" in an
easy to see way on some edge cases (but really easy to explain), to
something that is wrong in weird ways in even edgier cases.

 If you want to deal with i386/i586 and arm* etc. updates that's fine
(and the noarch transitions, and the multilib. disappearances --
although those can maybe be ignored due to complete fail, and regular
obsoletes use anyway).



More information about the Yum-devel mailing list