Mailinglist Archive: opensuse-buildservice (233 mails)

< Previous Next >
Re: [opensuse-buildservice] Fun with source services
On Thursday 21 November 2013 12:38:13 Greg Banks wrote:

On 21 November 2013 00:42, Sascha Peilicke <speilicke@xxxxxxxx> wrote:
On Wednesday 20 November 2013 10:24:33 Greg Banks wrote:
4. Source services could be better documented. A lot better. For
example I discovered @PARENT_TAG@ by reading the source.

I guess I'm partly to blame here. The tar_scm source service documents
feature in it's parameter manifest
But I agree there is currently no easy way to introspect a service how to
really use it. That would probably be an osc feature.

If so, osc would have to pull down the .service file from the server.

Not really, check your /usr/lib/obs/services directory :-) osc already demands
some services, depending on which OBS projects you work. So you should have
some of those installed. If you want local invocation or disabled mode, you
need them anyway.

But I'd settle for online documentation in the WebUI, perhaps
generated from the .service file.

The "versionformat" parameter capabilities depend on the underlying SCM.
they look slightly different depending on that, here are some

In git's case, the tar_scm service uses --pretty-format=... A quick check
the man-page reveals:
%ad: author date (format respects --date= option)

For --date, stackoverflow has all the answers with examples (that are also

found in the man-page):

So everything is already there.

Yes, I got what I want using %cd in versionformat.

Unfortunately the description in the .service file implies -
incorrectly - that the version string will be exactly what "git log
--pretty=format:" would give, which is *not* true. Firstly the output
is sanitised with a sed script. Secondly git is given the
--date=short option which changes the output of %cd. So just from
reading the documentation I would never have tried %cd.

Well, the source service XML metadata files aren't Bible chapters, so they may
contain mistakes. But we allow pull requests :-)
With kind regards,
Sascha Peilicke
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)
< Previous Next >
Follow Ups