[csw-devel] psuedo sketch of web and mantis automation

Maciej Bliziński maciej at opencsw.org
Sun Aug 21 09:27:08 CEST 2011


2011/8/20 Ben Walton <bwalton at opencsw.org>:
> Excerpts from Maciej Bliziński's message of Fri Aug 19 07:34:55 -0400 2011:
>
>> 1. Both pkgname and catalogname change, e.g. CSWfoodev/foodev →
>> CSWfoo-dev/foo_dev
>> 2. Only the catalogname changes (CSWfoo-dev/foodev → >
>> CSWfoo-dev/foo_dev)
>
> As far as the catalog diff engine is concerned, both of these are the
> same.  They'll appear as the drop of one package and the addition of a
> new one.  The special case of _stub packages is handled in the pseudo
> code.  The general case would require doing a reverse index of package
> names.  The _stub handling rename detection could be extended to:
>
> * Build a package to catalog map, based on previous catalog, of every
>  package we're going to alter.

What's the definition of a package that can be altered?

> * Do the same for the new catalog.
> * Iterate through new packages and see if the package name exists in
>  the old catalog.
> * If we 'hit' in the index, add [p, q] to the rename list and remove
>  them from the new and remove lists.

I think that at this point, we know the area in which we can look for
corner cases.  It'll be best to talk in code: if you have a unit test
with test cases, we can define the test cases and see what does the
diff engine output.

> We'd still want to filter stubs to a separate list first as those
> packages shouldn't be displayed in the web db or mantis.

I'm thinking that mantis should not contain the packages (whatever the
word 'package' means), but something that Dagobert calls bundles. They
are roughly equivalent to upstream projects.

>> 3. Only the pkgname changes (CSWfoodev/foo_dev → CSWfoo-dev/foo_dev)
>
> This should be handled by an update operation.  As things are keyed on
> the catalog name, a change (based on version comparison) will trigger
> a refresh of file list, maintainer name, etc.  Mantis cares not about
> package name so that won't be a problem.
>
> Reasonable?

I expected that you'll say that this scenario is invalid / forbidden.
If the pkgname changes, you need to provide a _stub for the
catalogname.  We need some kind of detection of invalid scenarios,
too.

Let's continue by reviewing test cases, how does that sound?

Maciej


More information about the devel mailing list