Mailinglist Archive: opensuse-buildservice (266 mails)

< Previous Next >
[opensuse-buildservice] [ANNOUNCE] new osc plugin: "classify" to differentiate between linkpac/bco/copypac/aggregatepac
  • From: Adam Spiers <aspiers@xxxxxxxx>
  • Date: Wed, 16 Jan 2013 23:48:01 +0000
  • Message-id: <20130116234801.GH32557@pacific.linksys.moosehall>
Today is osc plugin day ;-)

I just rewrote my osc-classify-link shellscript (see below) as a
proper osc plugin:

https://gist.github.com/09641ddd5ddcca9a2a7e

(Try by installing into ~/.osc-plugins or /var/lib/osc-plugins)

It's now MUCH faster, and also supports a new -s / --server option
which enables server-side checks for greater accuracy where required.
Sample usage:

$ cd ~/OBS/home/aspiers/branches/devel/languages/ruby/
$ osc classify ruby-common
branch of or linkpac -> devel:languages:ruby/ruby-common
$ osc classify -s ruby-common
branch of devel:languages:ruby/ruby-common

$ cd ~/OBS/systemsmanagement/crowbar/2.0
$ osc classify
[...]
crowbar-sledgehammer normal or copypac
erlang linkpac -> systemsmanagement:chef:10/erlang
fakechroot branch of home:dmacvicar/fakechroot
gecode linkpac -> systemsmanagement:chef:10/gecode
js linkpac -> systemsmanagement:chef:10/js
libyaml aggregate -> devel:languages:ruby
rabbitmq-server branch of or linkpac ->
systemsmanagement:chef:10/rabbitmq-server
ruby aggregate -> devel:languages:ruby
ruby-common aggregate -> devel:languages:ruby
ruby19 aggregate -> devel:languages:ruby
rubygem-abstract branch of or linkpac ->
devel:languages:ruby:extensions/rubygem-abstract
rubygem-actionmailer-3_2 linkpac ->
devel:languages:ruby:extensions/rubygem-actionmailer-3_2
[...]

As with the prdiff plugin I announced earlier today, I think there's a
good argument for including it in the core rather than packaging it as
a plugin, but I'd welcome opinions on that.

Cheers,
Adam

Adam Spiers (aspiers@xxxxxxxx) wrote:
Dirk Müller (dirk@xxxxxxxx) wrote:
Am 04.01.2013 00:06 schrieb "Adam Spiers" <aspiers@xxxxxxxx>:

If it's checked out unexpanded ("osc co -u") then it seems I can take
a guess by looking for

<patches>
<branch/>
</patches>

in the _link file, but I'm not sure this is correct

This is correct.

and it's not even
possible when the sources are expanded, since then _link doesn't
exist. Suggestions?

I haven't tried it, but perhaps osc info does say it somewhere? Other than
that you could use osc cat to query the Server, but I'm not sure if your
goal was to avoid the roundtrip.

Yes I was hoping to avoid that :-)

Maybe there is something hidden in the .osc dir :-)

As you said in a separate mail, checking if the linkinfo in .osc/_meta
has a baserev is a close-enough estimation, as usually links do not
have baserevs. Thanks for the very helpful info!

Here's the resulting script:

https://github.com/aspiers/SUSE-dist/blob/master/bin/osc-classify-link
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx


--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
References