[Bug 764677] New: PackageKit get the wrong package size that due to libzypp changes
https://bugzilla.novell.com/show_bug.cgi?id=764677 https://bugzilla.novell.com/show_bug.cgi?id=764677#c0 Summary: PackageKit get the wrong package size that due to libzypp changes Classification: openSUSE Product: openSUSE 12.2 Version: Factory Platform: x86-64 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: GNOME AssignedTo: bnc-team-gnome@forge.provo.novell.com ReportedBy: mlin@suse.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=492931) --> (http://bugzilla.novell.com/attachment.cgi?id=492931) wrong package size in apper These days, I see apper(a package management tool for KDE) get the wrong package size from PackageKit that such as the attachment. And running "pkcon get-details" also get the weird package size, for example: kdeman@linux-c5b2:/tmp> pkcon get-details upower More than one package matches: 1. upower-0.9.16-1.1.x86_64 [@System] 2. upower-0.9.16-1.1.i586 [factory-oss] Please choose the correct package: 2 ... size: 101938176 bytes ... apparently the size looks wrong, it is not true big as pkcon said, I found the same behavior via dbus-monitor btw. Reproducible: Always Steps to Reproduce: 1.start apper(but I guess that it also can reproduce in gnome-packagekit) 2.enter any categories or check the new updates 3.watch the package size what it get Actual Results: see attachment Expected Results: valid size -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c1
Max Lin
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c2
--- Comment #2 from Max Lin
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c3
Max Lin
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c4
Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c5
Max Lin
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c6
Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c7
--- Comment #7 from Vincent Untz
--- a/configure.ac +++ b/configure.ac @@ -742,8 +742,16 @@ fi
if test x$enable_zypp = xyes; then PKG_CHECK_MODULES(ZYPP, libzypp >= 6.16.0) + PKG_CHECK_MODULES([LIBZYPP_RETURN_BYTES], libzypp >= 11.4.0, ZYPP_RETURN_BYTES="yes", ZYPP_RETURN_BYTES="no")
PKG_CHECK_EXISTS is better than PKG_CHECK_MODULES here. Just do: PKG_CHECK_EXISTS(libzypp >= 11.4.0, [ ZYPP_RETURN_BYTES="yes" ], [ ZYPP_RETURN_BYTES="no" ])
+ if test "x$ZYPP_RETURN_BYTES" = "xyes"; then + AC_DEFINE(ZYPP_RETURN_BYTES, 1, [define if libzypp return package size is bytes]) + fi +else + ZYPP_RETURN_BYTES=no fi
+AM_CONDITIONAL(ZYPP_RETURN_BYTES, test x$ZYPP_RETURN_BYTES = xyes) +
There's no need for AM_CONDITIONAL, I think. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c8
--- Comment #8 from Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c9
Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c10
--- Comment #10 from Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c11
Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c12
Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c13
--- Comment #13 from Michael Andres
err..forgot say about libzypp changes.
I saw a libzypp commit https://github.com/openSUSE/libzypp/commit/1e29b99a9dd54344ac3d7486e32b0fe98...
since the return size no longer in kbytes, and packagekit zypp backend still have do size calculation as size * 1024, thus I guess it cause this problem, I guess...
Actually 'no' ;) The underlying libsolv changed it's representation of size, that's why zypp::ResObject::downloadSize() was adapted. zypp::ResObject::downloadSize() always returns Byte. Unfortunately the zypp-backend is retrieving libsolv's raw attributes instead of using zypp::ResObject. That's why the backend code broke. https://github.com/openSUSE/PackageKit/pull/3 suggests a fix for this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c14
--- Comment #14 from Dominique Leuenberger
Unfortunately the zypp-backend is retrieving libsolv's raw attributes instead of using zypp::ResObject. That's why the backend code broke.
https://github.com/openSUSE/PackageKit/pull/3 suggests a fix for this.
Just to make this clear: the submitted patch there is the one that came out from this bug report (and is currently already part of the openSUSE:Factory PackageKit package). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=764677
https://bugzilla.novell.com/show_bug.cgi?id=764677#c15
--- Comment #15 from Dominique Leuenberger
participants (1)
-
bugzilla_noreply@novell.com