smart suggests wrong updates

Bug #333871 reported by Pete Pamz
2
Affects Status Importance Assigned to Milestone
Smart Package Manager
New
Undecided
Unassigned

Bug Description

Hello,

while updating my servers with smart, i figured out, that smart suggests an update with a wrong architecture. This might be very dangerous when you are updating a productive System. In my case it hit up the glibc package:

Here are some information about my system:

system:SUSE Linux Enterprise Server 10 (i586) SP2
kernel: 2.6.16.60-0.31-bigsmp
smart version: smart-1.1-5.1
python versions: python-2.4.2-18.25, python-xml-2.4.2-18.25, python-elementtree-1.2.6-25.1

 ... and the output to show the error:

----------------------------------------------------------------------------------------------------------------

test33:~ # smart upgrade --download --dump glibc
Loading cache...
Updating cache... ####################################################################################### [100%]

Computing transaction...
glibc-2.4-31.58@i686

----------------------------------------------------------------------------------------------------------------

test33:~ # rpm -qpi /var/lib/smart/packages/glibc-2.4-31.58.i686.rpm
Name : glibc Relocations: (not relocatable)
Version : 2.4 Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release : 31.58 Build Date: Thu Oct 16 18:28:14 2008
Install Date: (not installed) Build Host: stravinsky.suse.de
Group : System/Libraries Source RPM: glibc-2.4-31.58.src.rpm
Size : 4563908 License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later
Signature : DSA/SHA1, Thu Oct 16 18:32:04 2008, Key ID a84edae89c800aca
Packager : http://bugs.opensuse.org
URL : http://www.gnu.org/software/libc/libc.html
Summary : Standard Shared Libraries (from the GNU C Library)
Description :
The GNU C Library provides the most important standard libraries used
by nearly all programs: the standard C library, the standard math
library, and the POSIX thread library. A system is not functional
without these libraries.
Distribution: SUSE Linux Enterprise 10 (i686)

----------------------------------------------------------------------------------------------------------------

test33:~ # rpm -qi glibc
Name : glibc Relocations: (not relocatable)
Version : 2.4 Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release : 31.54 Build Date: Tue Apr 22 00:43:41 2008
Install Date: Mon Feb 23 13:56:33 2009 Build Host: james.suse.de
Group : System/Libraries Source RPM: glibc-2.4-31.54.src.rpm
Size : 4512631 License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later
Signature : DSA/SHA1, Tue Apr 22 00:48:02 2008, Key ID a84edae89c800aca
Packager : http://bugs.opensuse.org
URL : http://www.gnu.org/software/libc/libc.html
Summary : Standard Shared Libraries (from the GNU C Library)
Description :
The GNU C Library provides the most important standard libraries used
by nearly all programs: the standard C library, the standard math
library, and the POSIX thread library. A system is not functional
without these libraries.
Distribution: SUSE Linux Enterprise 10 (i586)

----------------------------------------------------------------------------------------------------------------

test33:~ # rpm -q glibc --qf '%{NAME} %{VERSION} %{RELEASE} %{ARCH} \n'
glibc 2.4 31.54 i586

----------------------------------------------------------------------------------------------------------------

test33:~ # rpm -qp /var/lib/smart/packages/glibc-2.4-31.58.i686.rpm --qf '%{NAME} %{VERSION} %{RELEASE} %{ARCH} \n'
glibc 2.4 31.58 i686

----------------------------------------------------------------------------------------------------------------

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Are you using a patched version of Smart?

Smart doesn't even load into the cache a package of an incorrect architecture.

Can you please attach to the bug the directory /usr/lib/python2.*/site-packages/smart?

Revision history for this message
Anders F Björklund (afb) wrote :

I think http://software.opensuse.org/search?q=smart
should have the smart-1.1-5.1.src.rpm with the patches

One could also try what the archscore is:
$ python
>>> import rpm
>>> print rpm.archscore("i686")

Revision history for this message
Pete Pamz (ppanz) wrote :

I was using the Version of smart, downloadable at http://download.opensuse.org/repositories/smart/openSUSE_10.3/i586/smart-1.1-5.1.i586.rpm
Could that be the problem? (The system was SLES10 SP2)

I cannot paste the /usr/lib/python2.*/site-packages/smart directory to the bug right now, i received that error on a testsystem where i install and install and install..., so the Installation with the system with that smart-Version is lost. Perhaps i have the possibility to reinstall the system with the same packages and smart-version within the next days, then i can report the files and will see if the Problem is reproduceble.

The phython-directory should also be in the rpmfile, isn´t it. You think it would be necessary to reinstall the system.

Revision history for this message
Anders F Björklund (afb) wrote :

Could you try to determine what "rpm.archscore" returns for say i386, i586 and i686 on that system ? (see above)

Revision history for this message
Pete Pamz (ppanz) wrote :

Hello,

now i have the output of "rpm.archscore"

test12:~ # rpm -q python
python-2.4.2-18.25

test12:~ # cat /tmp/python-arch.py
import rpm
print rpm.archscore("i386")
print rpm.archscore("i586")
print rpm.archscore("i686")
print rpm.archscore("x86_64")

test12:~ # python /tmp/python-arch.py
5
3
2
0

Revision history for this message
Anders F Björklund (afb) wrote :

OK, so your RPM prefers i686 and then i586 and will settle for i386 while x86_64 is incompatible.

Sounds like your platform is off, and that it thinks that it is a i686 ? Maybe edit /etc/rpm/platform

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.