On Monday 16 of January 2012 02:19:39 Parsons, Aron wrote:
> I was making use of configchannel_import in spacecmd at work last week and
> noticed that the API seems to eat newlines at the end of a file; what you
> put in is not what you get out.  

I've introduced
configchannel.getEncodedFileRevision API
for these cases.
It'll be included in spacewalk-java nightly packages since version 1.7.8-1.

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

> Some applications handle it fine, others
> not so well; sssd is an example of an application that pukes without a
> trailing newline.   It affects other API calls as well, such as the snippet
> ones.  However, those don't matter as much as the configuration files.
> 
> I debugged it a bit and it goes all the way down to the Redstone XML-RPC
> library trimming whitespace; XmlRpcParser.consumeCharData() calls trim() on
> the string.  Due to the access modifiers on some of the variables in the
> class, we can't just create subclass to override that method
> (consumeCharData() makes use of private variables).
> 
> Steve,
> Do you want to try and find a workaround or just call this out in the
> documentation for the configchannel_import function?  I don't want to say
> it makes configchannel_import worthless, but without a fix, I know I can't
> rely on it for the job it intends to do.
> 
> /aron
> 
> _______________________________________________
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

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

Reply via email to