On Thursday 08 of March 2012 15:46:46 Johannes Renner wrote:
> On 03/07/2012 10:04 AM, Tomas Lestach wrote:
> >> I will find time for that in the next days and I can then come up with
> >> a new patch for that file after I verified the behavior.
> > 
> > Great!
> > Thank you Johannes,
> 
> So, AFAICS the rhnServerNeededCache table is there for caching which errata
> need to be applied to a system together with the respective package ids. So
> I don't really see how it makes sense to insert rows in there with errata
> id == null.

The reason is that importing errata packages into the Spacewalk server isn't 
the only option, how to populate you channels.
You may push packages into your Spacewalk server using rhnpush or you may get 
a package into your channel from another channel.
In these cases those packages may be valid updates for your servers, however 
they're not associated with any errata.
For these cases errata_id is null.

Regards,
Tomas
-- 
Tomas Lestach
RHN Satellite Engineering, Red Hat

> 
> I compared the resulting cache entries with what we get when running the
> stored procedure 'rhn_server.update_needed_cache' (with respective
> parameters of course). The output was equal, but missing the 'null' rows.
> 
> Even if i think these 'null' entries don't hurt anybody I would propose to
> apply the attached patch to PublishErrataAction.java (also the code was
> quite a mess).
> 
> Please tell me if this breaks anything and throw away my patch in this case
> ;-)
> 
> Thanks,
> Johannes
> 
> P.S.: Further, if this is all true, I would actually question the whole
> method 'insertCacheForChannelPackagesAsync()' in ErrataCacheManager.java,
> since it does exactly this:
> 
> ...
> uece.setErrataId(null);
> ...
> 
> But it's called in 3-4 other places as well, so you (or somebody else who
> knows) should better have a look and verify this first, see the second
> patch.

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to