[Spacewalk-list] packages "not upgrades "

Mgr. Peter Hudec peter.hudec at swan.sk
Mon Jan 21 19:38:11 UTC 2013


Hi Simon,

see attahcech diff, which solved my problem. It's against SPACEWALK-1.7 
branch.

	Peter

On 1/21/13 5:59 PM, Mgr. Peter Hudec wrote:
> Hi Simon,
>
> yes, it did the upgeades ;)
>
> I found the problem.
> First, this is apt-get/aptitude fature, the python-apt api did not have
> this strange behaviour.
>
> Second where is the problem. The problem is with the wrong generated
> Packages file. Exctly wit the information provided for the package.
>
> Every package has control file, where is the package description. Thos
> control file shuld be transported to the repository Packages file and
> here is the problem.
>
> In my case
>
> Package pss-foxim fdo not have property "Installed-Size", but the
> Packages does. If i remove the line form packages this packages goes ok.
>
> Package strace have "Installed-Size: property, but the value differs
> with the value in the Packages file. If i correct the value in the
> Packages file, this package gos OK.
>
> So generaly, the DebpackageWrites should follow thr package control file.
>
> So the problem is in Pacakge writer java class and in the rhnpush and
> it's XMLRPC API ;(
>
>
> I hope I will be able to write quick fix for this problem.
>
>      best regards
>          Peter
>
> On 1/21/13 4:44 PM, Simon Lukasik wrote:
>> On 01/21/2013 02:02 PM, Mgr. Peter Hudec wrote:
>>> Dear all,
>>>
>>> today I found a strange issue.
>>> I out some packages into repository and installed then using spacewalk
>>> server.
>>>
>>> These packages were successfully installed, the spacewalk shows the
>>> system is up2date and OK.
>>>
>>> But when I run "apt-get upgrade -s" the system still wants to upgrade
>>> the packages, even if they are the same version. Does anybody already
>>> had this issue?
>>>
>>> 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])
>>>
>>
>> Does the `apt-get upgrade` (without the --simulate option) really
>> performs that actions?
>>
>> And can you confirm that this issue persists even after `apt-get update`?
>>
>

-------------- next part --------------
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPacka
index e177eec..ce73a4a 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java
@@ -107,9 +107,12 @@ public class DebPackageWriter {
             out.write(pkgDto.getVendor());
             out.newLine();
 
-            out.write("Installed-Size: ");
-            out.write(pkgDto.getPackageSize().toString());
-            out.newLine();
+            Long packagePayloadSize = pkgDto.getPayloadSize();
+            if (packagePayloadSize > 0 ) {
+                out.write("Installed-Size: ");
+                out.write(pkgDto.getPayloadSize().toString());
+                out.newLine();
+            }
 
             // dependencies
             addPackageDepData(out, providesIterator,
diff --git a/backend/common/rhn_deb.py b/backend/common/rhn_deb.py
index db2009a..570c795 100644
--- a/backend/common/rhn_deb.py
+++ b/backend/common/rhn_deb.py
@@ -57,7 +57,8 @@ class deb_Header:
             for hdr_k, deb_k in [('requires', 'Depends'),
                                  ('provides', 'Provides'),
                                  ('conflicts', 'Conflicts'),
-                                 ('obsoletes', 'Replaces')]:
+                                 ('obsoletes', 'Replaces'),
+                                ('payload_size', 'Installed-Size')]:
                 if debcontrol.has_key(deb_k):
                     self.hdr[hdr_k] = debcontrol.get_as_string(deb_k)
             for k in debcontrol.keys():


More information about the Spacewalk-list mailing list