2009/5/22 Markus Koßmann
Am Freitag, 22. Mai 2009 schrieb Michael Roberts:
The question which now arises: - how can I generate a report of installed modules with inconsistent architecture (either inconsistent with another installed module or i586 installed where x86_64 is available)?
With the --querytags option you will be able to modify the output of rpm -qa to include the arch of the rpm. I did that once, but I don't remember the exact syntax now. So you can get a list of installed i586 packages.
Then just try to update to the x86_64 rpms of the listed packages. That might fail in some cases where no x86_64 counterpart exists.
Thanks. I inspected the output of some one-liners. Of 1940 installed packages, there are 45 where I need to check for correct architecture. Nothing is of immediate concern so I will do that at leisure. I know that in the case of java I deliberately installed an out-of-date i586 version so that both architectures were available. In case anyone is interested, the following will generate a list of i586 modules with no x86_64 counterpart installed (horrible isn't it :) ): rpm -qa --queryformat 'NAME %{NAME} VERSION %{VERSION} ARCH %{ARCH}\n' | perl -ne '%x = split " "; $y{"$x{NAME}-$x{VERSION}"}{$x{ARCH}} = $x{NAME}; END { print map { "$y{$_}{i586}\n" } sort grep { $y{$_}{i586} and not $y{$_}{x86_64} } keys %y }' >i586-only.txt In fact only two packages had both architectures installed -- rpm and selinux. I had been messing about with both trying to fix the problem mentioned above. We can then produce a list of relevant modules by zypper search, for further inspection: zypper search --match-words --details $(cat i586-only.txt) | grep -P '^v.+ x86_64 ' -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org