<div dir="ltr">This is fixed in spacecmd-2.1.6-1.  system_listupgrades will filter out duplicate packages now with the filter_latest_packages() function that was already in place.<br><div class="gmail_extra"><br><div>/aron</div>

<br><br><div class="gmail_quote">On Sat, Aug 17, 2013 at 2:55 AM, Aron Parsons <span dir="ltr"><<a href="mailto:aronparsons@gmail.com" target="_blank">aronparsons@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<p dir="ltr">Hi Tomas,<br>
I'll take a closer look, hopefully within the week. I'm busy on travel until September. </p><div class=""><div class="h5">
<div class="gmail_quote">On Aug 15, 2013 2:41 PM, "Tomas Lestach" <<a href="mailto:tlestach@redhat.com" target="_blank">tlestach@redhat.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Hey Aron,<br>
<br>
do you want to comment on this thread on spacewalk-list?<br>
<br>
<br>
Regards,<br>
Tomas<br>
--<br>
Tomas Lestach<br>
Red Hat Satellite Engineering, Red Hat<br>
<br>
<br>
----- Forwarded Message -----<br>
> From: "Tomas Lestach" <<a href="mailto:tlestach@redhat.com" target="_blank">tlestach@redhat.com</a>><br>
> To: <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
> Cc: "Aron Parsons" <<a href="mailto:aparsons@redhat.com" target="_blank">aparsons@redhat.com</a>><br>
> Sent: Thursday, August 15, 2013 3:31:52 PM<br>
> Subject: Re: [Spacewalk-list] spacecmd system_listupgrades not working<br>
><br>
> > Is the removal of duplicates the solution?<br>
><br>
> I believe it would be the easiest and quickest solution.<br>
><br>
> > Because default on a<br>
> > RHEL-derived system, RPM/YUM leaves the 3 latest kernel-packages on<br>
> > the system, so you can boot the system with the old kernel of the<br>
> > new kernel is not working for you.<br>
><br>
> Sure.<br>
><br>
> > Maybe the better solution would be to check if there are older<br>
> > packages on the system. If there are older packages and the version<br>
> > to which those packages could be upgraded is already present on the<br>
> > system, the upgrades aren't listed. This could also comes in handy<br>
> > if you have multiple version of a package on your system. For<br>
> > instance, the installation or upgrade of JDK7 by RPM doesn't remove<br>
> > the old versions.<br>
><br>
> java-1.5.0-gcj<br>
> java-1.7.0-openjdk<br>
> java-1.8.0-openjdk<br>
> are different packages. java-1.8.0-openjdk isn't really an upgrade of<br>
> java-1.7.0-openjdk. Well, it could be considered as upgrade from the<br>
> content point of view, but definitely not from the rpm view.<br>
><br>
> (For java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.x86_64, package name<br>
> is 'java-1.7.0-openjdk' (not java) version is 1.7.0.25,<br>
> release 2.3.12.3.fc19, ...)<br>
><br>
> > If you have 3 older versions of the JDK7 on your<br>
> > environment and not the latest, the update gets listed 4 times!!<br>
><br>
> No. You can have only 'kernel' package installed in multiple versions<br>
> on one system.<br>
><br>
><br>
> CC'ing Aron, the author of the spacecmd.<br>
><br>
> Regards,<br>
> --<br>
> Tomas Lestach<br>
> Red Hat Satellite Engineering, Red Hat<br>
><br>
><br>
> > Once for every old version and once because the latest versions is<br>
> > not installed yet. So you get 3 false positives, the same as with<br>
> > the kernels.<br>
> ><br>
> > Regards,<br>
> > Andreas<br>
> ><br>
> ><br>
> > ________________________________________<br>
> > Van: <a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a><br>
> > [<a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a>] namens Tomas Lestach<br>
> > [<a href="mailto:tlestach@redhat.com" target="_blank">tlestach@redhat.com</a>]<br>
> > Verzonden: donderdag 15 augustus 2013 10:36<br>
> > Aan: <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
> > Onderwerp: Re: [Spacewalk-list] spacecmd system_listupgrades not<br>
> > working<br>
> ><br>
> > Right,<br>
> ><br>
> > spacecmd system_listupgrades actually uses the<br>
> > system.listLatestUpgradablePackages API.<br>
> > Output of this API you can check on your spacewalk at<br>
> > /rhn/apidoc/handlers/SystemHandler.jsp#listLatestUpgradablePackages<br>
> ><br>
> > basically for every installed server package, that can be upgraded<br>
> > following structure is returned:<br>
> ><br>
> > string "name"<br>
> > string "arch"<br>
> > string "from_version"<br>
> > string "from_release"<br>
> > string "from_epoch"<br>
> > string "to_version"<br>
> > string "to_release"<br>
> > string "to_epoch"<br>
> > string "to_package_id"<br>
> ><br>
> > so you see for every upgradable package the latest package to that<br>
> > you may upgrade.<br>
> ><br>
> > What spacecmd system_listupgrades actually does is it returns a<br>
> > package list just according to "to_package_id".<br>
> > So if you have multiple kernel versions installed, for all the<br>
> > older<br>
> > ones the latest kernel is offered as an<br>
> > update, what causes the kernel package is listed several times.<br>
> ><br>
> > An option would be just to remove duplicates from the list.<br>
> ><br>
> ><br>
> > Regards,<br>
> > --<br>
> > Tomas Lestach<br>
> > Red Hat Satellite Engineering, Red Hat<br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> > > From: "Anthony J Coffman" <<a href="mailto:Tony.Coffman@snapon.com" target="_blank">Tony.Coffman@snapon.com</a>><br>
> > > To: <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
> > > Sent: Wednesday, August 14, 2013 8:43:54 PM<br>
> > > Subject: Re: [Spacewalk-list] spacecmd system_listupgrades not<br>
> > > working<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > I can confirm and maybe explain what is going on. I don’t use<br>
> > > this<br>
> > > function very much but I just tried it on my Spacewalk 2.0<br>
> > > install.<br>
> > ><br>
> > ><br>
> > ><br>
> > > Here is the spacecmd output for a system that the Spacewalk GUI<br>
> > > said<br>
> > > was up to date.<br>
> > ><br>
> > ><br>
> > ><br>
> > > spacecmd {SSM:0}> system_listupgrades centos5server<br>
> > ><br>
> > > kernel-PAE-2.6.18-348.12.1.el5.i686<br>
> > ><br>
> > > kernel-PAE-2.6.18-348.12.1.el5.i686<br>
> > ><br>
> > ><br>
> > ><br>
> > > But when I checked what kernel-PAE packages were installed, there<br>
> > > were 3 installed currently on that system.<br>
> > ><br>
> > ><br>
> > ><br>
> > > [root@centos5server ~]# rpm -q kernel-PAE<br>
> > ><br>
> > > kernel-PAE-2.6.18-348.3.1.el5<br>
> > ><br>
> > > kernel-PAE-2.6.18-348.4.1.el5<br>
> > ><br>
> > > kernel-PAE-2.6.18-348.12.1.el5<br>
> > ><br>
> > ><br>
> > ><br>
> > > If I remove the two older kernels and then run the listupgrades<br>
> > > command it shows no updates<br>
> > ><br>
> > ><br>
> > ><br>
> > > [root@centos5server ~]# rpm -e kernel-PAE-2.6.18-348.3.1.el5<br>
> > ><br>
> > > [root@centos5server ~]# rpm -e kernel-PAE-2.6.18-348.4.1.el5<br>
> > ><br>
> > > [root@ centos5server ~]# rhn-profile-sync<br>
> > ><br>
> > ><br>
> > ><br>
> > > spacecmd {SSM:0}> system_listupgrades rich-iweb-10-rv<br>
> > ><br>
> > > WARNING: No upgrades available for rich-iweb-10-rv<br>
> > ><br>
> > ><br>
> > ><br>
> > > Does this explain it? it’s listing the update twice – once for<br>
> > > each<br>
> > > of the out of date kernels. The GUI must have some logic that<br>
> > > covers<br>
> > > this case that the API doesn’t have.<br>
> > ><br>
> > ><br>
> > ><br>
> > > Regards,<br>
> > ><br>
> > > --Tony<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > From: <a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a><br>
> > > [mailto:<a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a>] On Behalf Of Andreas<br>
> > > Dijkman<br>
> > > Sent: Wednesday, August 14, 2013 11:08 AM<br>
> > > To: <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
> > > Subject: [Spacewalk-list] spacecmd system_listupgrades not<br>
> > > working<br>
> > ><br>
> > ><br>
> > ><br>
> > > Hi,<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > We currently have some systems configured with spacewalk and<br>
> > > wanted<br>
> > > to play around with spacecmd.<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > The problem is the output of spacecmd system_listupgrades.<br>
> > > Somehow<br>
> > > there is a package-cache or something, because the<br>
> > > system_listupgrades-command returns the list of not installed<br>
> > > packages including the latest kernel-packages.<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > However in the spacewalk-web-GUI these updates aren't listed. Can<br>
> > > someone explain or confirm this behavior? We are running<br>
> > > Spacewalk<br>
> > > 2.0 with Oracle as backend.<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > Met vriendelijke groet,<br>
> > ><br>
> > > Andreas Dijkman<br>
> > > Oracle Technical Consultant<br>
> > > Phone: <a href="tel:%2B31%280%2950-210%200132" value="+31502100132" target="_blank">+31(0)50-210 0132</a> | Mobile: <a href="tel:%2B31%280%296-8115%202982" value="+31681152982" target="_blank">+31(0)6-8115 2982</a><br>

> > > Cygnis | Stationsweg 3B | 9726 AC Groningen<br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Spacewalk-list mailing list<br>
> > > <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> > > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
> ><br>
> > _______________________________________________<br>
> > Spacewalk-list mailing list<br>
> > <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
> ><br>
> > _______________________________________________<br>
> > Spacewalk-list mailing list<br>
> > <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
> ><br>
><br>
> _______________________________________________<br>
> Spacewalk-list mailing list<br>
> <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</blockquote></div>
</div></div></blockquote></div><br></div></div>