For packages in spacewalk debian based repo the linux clients allways show that are to upgrade, even if the same versoin is allready installed. https://www.redhat.com/archives/spacewalk-list/2013-January/msg00112.html TEJB1139H5XEAS info # apt-get upgrade -s Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: pss-foxim strace worthless 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Inst pss-foxim [2.1] (2.1 spacewalk.fopss.sk [all]) Conf pss-foxim (2.1 spacewalk.fopss.sk [all]) Inst strace [4.5.20-2.3ubuntu1] (4.5.20-2.3ubuntu1 spacewalk.fopss.sk [i386]) Inst worthless [1.0-2] (1.0-2 spacewalk.fopss.sk [all]) Conf strace (4.5.20-2.3ubuntu1 spacewalk.fopss.sk [i386]) Conf worthless (1.0-2 spacewalk.fopss.sk [all])
The problem is in wrong generated Packages for debian repo. See https://www.redhat.com/archives/spacewalk-list/2013-January/msg00115.html I solved this problem with the pach proided in the https://www.redhat.com/archives/spacewalk-list/2013-January/msg00117.html
Created attachment 685650 [details] quick patch which solved the problem for me
*** Bug 903066 has been marked as a duplicate of this bug. ***
I just made the same experience with Debian Wheezy. I found out, that in addition to the Installed-Size attribute in the Packages file, also the order of the packages in the "Depends:" attribute of a package in the Packages file is important. If the order is different to the information stored in /var/lib/dpkg/status, APT thinks, that the installed package and the package in Spacewalk are different.
Created attachment 880583 [details] possible fix for bug 903068 I analyzed the problem in detail and found out, that beside the "Installed-Size:" and the "Depends:" attribute, also the other dependency attributes are essential for APT, when they were present in the originally installed package. In detail, the following attributes must be parsed and added to the Packages file, if they are present in a package: - Recommends: - Suggests: - Breaks: - Pre-Depends: For this, I uploaded a patch for the SPACEWALK-2.1 branch. This patch also includes the fix from Peter Hudec for the Installed-Size attribute. The patch is a bit ugly, because it uses the rhnpackageenhances table for the "Breaks" dependencies and the rhnpackagesupplements table for the "Pre-Depends" dependencies. For the final solution, there should be specific tables for these two attributes (e.g. rhnpackagebreaks and rhnpackagepredepends). The order of the packages in the dependency lists is stored together with the name in the rhnpackagecapability table as a suffix (_<index number>). This suffix is removed and parsed, when the "Packages" file is generated by the DebPackageWriter module.
Hello Carsten, thank You for your patch. You are right that this is a bit ugly. My only problem is that once upstream accepts this patch, it will be hard to bring up the final solution (as you call it). Because of automated upgrades from existing installation. Would you be willing to contribute a patch using a separate tables? Thanks!
Created attachment 881636 [details] patch with dedicated tables Hello Simon, I reworked my patch to use dedicated tables for the "Breaks:" and "Pre-Depends" dependencies of Debian packages (rhnpackagebreaks and rhnpackagepredepends). For the other dependencies (suggests, recommends), the existing tables can be used (rhnpackagesuggests, rhnpackagerecommends, etc.) The patch includes the SQL scripts for the creation of the tables and the corresponding triggers (Oracle and PostgreSQL). For the schema upgrade, I did not create a sql file. But I think, this can be easily be created by the upstream maintainer. As I do not know, how the .sql files are included in the installation routines, I also did not incorporate this in my patch. I tested it yesterday with our Spacewalk installation and both the import of .deb and .rpm packages and the writing of the repository information are working as expected. Also the new tables are used as planned. Regards, Carsten
Created attachment 881637 [details] patch with dedicated tables Fixed typo in part for /backend/server/importlib/headerSource.py: old: if tag in ['recommends', 'supplements', 'break', 'predepends'] and not(hash['flags'] & (1 << 27)): new: if tag in ['recommends', 'supplements', 'breaks', 'predepends'] and not(hash['flags'] & (1 << 27)): Sorry. I first saw it, when i checked the diff on the Bugzilla diff view. Regards, Carsten
Hi Carsten, Thank you for the patch. I've reviewed it, added schema upgrade scripts and committed to spacewalk master. commit 19f3618824a2f14b50f090365f0d1be066bfb8c5 903068 - update scripts for schema commit 9d536bd25a2555775529db0445745619740a1c37 903068 - fixed oracle source checksums commit cae505f2c2cb2a63529dac9abaa1b7276e826a8b 903068 - fixed debian repo generation - missing Installed-Size attribute - the order of the packages in the "Depends:" attribute of a package in the Packages file is important - added missing Recommends:, Suggests:, Breaks:, Pre-Depends:
Spacewalk 2.2 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes22