[csw-devel] updated gar svn check

Dagobert Michelsen dam at opencsw.org
Wed Apr 15 22:21:19 CEST 2009


Hi Ben,

Am 15.04.2009 um 22:09 schrieb Ben Walton:
> I dug into mkpackage and discovered that we are already supplying the
> package filename (pkgname) via the csw_vars.gspec file that gets
> pulled in.  So, I added a very small change to the dynamic gspec
> generation code that supplies a %var that will supersede the %cvar if
> the svn repo is in an uncommitted state.  This seems to work for
> ENABLE_CHECK=0 and doesn't require an after-the-fact rename.
>
> The downside to this approach is that if the maintainer hasn't
> converted to dynamic gspec, then this modification won't be used.  I'm
> ok with that personally.  What do you think?

In my opinion we should move the package name generation completely
inside gar.pkg.mk and put it in a variable. This can then either be
passed in dynamic gspec like you did and additionally by redefining
pkgfile here:

> dam at login [login]:/home/dam/mgar/gar/v2/pkglib > more csw_vars.gspec
> %cvar           arch %{GARCH}
> %cvar           desc %{SPKG_DESC}
> %cvar           pkgfile %{bitname}-%{SPKG_VERSION}%{SPKG_REVSTAMP}-% 
> {SPKG_OSNAME}-%{arch}-CSW.pkg
> %cvar           RC_INIT_SCRIPT csw%{bitname}
> %cvar           SMF_SCRIPT svc-csw%{bitname}
> %cvar           SMF_MANIFEST csw%{bitname}.xml

...to something that is passed in PKG_EXPORTS. Then we can control
the name fine-grained in one place both for dynamic and classic gspec.
I may have time tomorrow to take a look. Anyway, thanks for the
inspiration :-) It is always easier to improve something than to
invent it completely new.


Best regards

   -- Dago



More information about the devel mailing list