Mailinglist Archive: opensuse-buildservice (266 mails)

< Previous Next >
Re: [opensuse-buildservice] [ANNOUNCE] new osc plugin: "classify" to differentiate between linkpac/bco/copypac/aggregatepac
Hi Adam,

On 2013-01-16 23:48:01 +0000, Adam Spiers wrote:

<SNIP>

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.

Hmm what about adding these additional information to the existing "info"
command? I'm not sure if a new command is needed for it. What do you
think?

Some comments/thoughts about the code:
- parse_xml:
It should raise an OscIOError if the file doesn't exist (instead of
OscBaseError (this class is only used as a base class for all osc
related exceptions)).
Raising a NoWorkingCopy exception in case of a SyntaxError is "wrong"
because it _is_ a (valid) wc (just the _link file is corrupt).

- _classify_dir:
An _aggregate might aggregate packages from multiple projects (that
is there might be multiple <aggregate /> elements). Currently your
code only considers the last <aggregate /> element.

If you want to check if a '_link' file is present in a package you
can simply use "if '_link' in pkg.filenamelist..." instead of
directly inspecting the storedir.
In order to retrieve the contents of a storefile you should use
"store_read_file".

- do_classify:
Use "is_project_dir" and "is_package_dir".

As I already wrote in my other mail feel free to ignore the comments
from above - most of them are just "cosmetic":)

Keep up the good work!


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

< Previous Next >
Follow Ups