[csw-maintainers] GAR: Basic custom tests for packages

Dagobert Michelsen dam at opencsw.org
Wed Jan 13 16:42:47 CET 2010


Hi Maciej,

Am 11.01.2010 um 17:56 schrieb Maciej (Matchek) Blizinski:
>>>> For instance, that I expect there to be a certain file in the  
>>>> prototype,
>>>> with such and such name and such and such attributes (ownership,
>>>> permissions, etc)
>>
>> The prototype (if dynamic) is built during 'package' and there is  
>> currently
>> no hook in-between after dynamic creation of the packaging source  
>> files
>> and the package creation. You could check after package-creation in
>> post-package.
>
> Can a hook be created between the prototype creation and the package
> creation? Say, just after the creation of the per-package prototype
> files, so that I can also check that certain files have landed in the
> specific packages.

Yes, but currently only on a per-package base as the prototype creation
and packaging is done in one step, one package after another. It would
be possible to installed a hook here, of course:
   http://sourceforge.net/apps/trac/gar/browser/csw/mgar/gar/v2/gar.pkg.mk#L711

>>>> How do I access things like the prototype, or files at the location
>>>> from where they're already merged?
>>
>> From the global modulation the prototype can be accessed as
>>  $(WORKDIR)/prototype
>> and the package specific prototypes as
>>  $(WORKDIR)/CSWmypkg.prototype
>
> How do I know I'm in the global modulation?

Just see if $(MODULATION) == "global"

>> The merge location is available during global or specific  
>> modulations as
>> $(PKGROOT).
>>
>> I suggest you write your test as post-package to ensure it has been  
>> built
>> correctly. However, if it proves useful we could also insert another
>> step before package creation like
>>  pkgverify-CSWmypkg:
>
> I've been recently bitten by something that would've been prevented
> easily using this kind of a test, so I'll get back to it soon.

Ok.


Best regards

   -- Dago



More information about the maintainers mailing list