Mailinglist Archive: opensuse-buildservice (227 mails)

< Previous Next >
Re: [opensuse-buildservice] [PATCH] updated osc patch to add "createpacfromsrcrpm" cmd
  • From: "Hillier, Gernot" <gernot@xxxxxxxxxx>
  • Date: Wed, 3 Jan 2007 11:32:18 +0100
  • Message-id: <200701031132.19260.gernot@xxxxxxxxxx>

Sorry for the self-follow-up...

Am Donnerstag, 28. Dezember 2006 16:03 schrieb Gernot Hillier:
> Hi!
> Attached, please find an updated version of my osc createpacfromsrcrpm
> patch: * added cleanup of /tmp-directory after uploading the RPM contents *
> use rpm2cpio and cpio in a pipe instead of as two separate commands * use
> "cpio -v" output instead of listing the directory manually
> * check if package already exists in buildservice before creating it
> Thanks to Mauricio Teixeira and James Oakley for the technical feedback and
> Klaas for the special motivation! :-)

I would like to make an additional update to this patch, but I seem to need
help from the osc hackers:

1) It turned out, that the error handling should be improved. For example,
some SPEC file authors use a macro for the package name and thus,
"createpacfromsrcrpm" would use "%{name}" for the package name. I don't think
that this rare case has to be really automatically fixed - but at least the
user should have a chance to see it and abort the command.

2) Escaping of special characters like "%" should be improved ("100 % Pure
Java implementation..." interfering with Python handling of "%" placeholders)

I feel that both problems could be solved by using the Package.update_pac_meta
method instead of edit_meta - it already does esacping and inserting of meta
data with XML-aware code instead of Python placeholders. It also implements
simple displaying of meta data and user confirmation before uploading.

Unfortunately, I don't see a way to call this method for a new package
(despite it has code to create the package on the server) in a clean way.
There seems to be no way to create an osc.Package instance for a new package
(an existing working directory is needed in the constructor).

BTW: In general, I'm not sure whether to implement my stuff as a independent
function or as a osc.Package method is preferrable. The current osc/
seems to mix both approaches in a way which confuses me...

Could some of the osc gurus please help? TIA!

Mit freundlichen Grüßen / With kind regards,

Gernot Hillier
Embedded Linux Competence Center
Siemens AG, CT SE 2


To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups