Penned by Marc Espie on 20100708 14:49.04, we have:
| On Thu, Jul 08, 2010 at 02:03:41PM +0200, Matthieu Herrb wrote:
| > On Thu, Jul 08, 2010 at 11:50:39AM +0200, Marc Espie wrote:
| > > each time xenocara farts, we get new libs (or less libs).
| > > in order for updates to work, we *should* propagate those changes to
| > > @wantlib in each port.
| > 
| > For the base and xenocara libs, wouldn't it make sense to have some 
| > modules centralizing the version info (and even some dependencicies) so 
| > that instead of WANTLIB declaratons you coud have 
| > 
| > .include <libX11.dep.mk>
| > .include <libc.dep.mk> 
| > 
| > or something similar? 
| > 
| > Then only one central fil would need to be updated when revisions changes. 
| > And even if libX11 gains new depencies, you would not be reqired to 
| > add the manually to a zillon of ports's Makefiles.
| 
| Nope, because it does not do half the work: bumping pkgnames.

It would be nice if the following or something similar would work..
however it would not deal well with newly added or removed dependent
libs, as the PKGLIBCOUNTER would quickly become less than LIBCOUNTER. *sigh*.
Maybe the thoughts below will stimulate alternate strategies that do not
have this shortcoming.

If PKGNAMES ends were calculated instead of manually set, so that:

  PKGLIBCOUNTER?=${LIBCOUNTER}
  PKGBUMPLEVEL=0
  _PKGREV!=echo $((PKGBUMPLEVEL+$LIBCOUNTER-$PKGLIBCOUNTER-1))
  PKGNAMEBASE ?= ${DISTNAME}
  .if ${_PKGREV} == "-1"
  PKGNAME?= ${PKGNAMEBASE}
  .else
  PKGNAME?= ${PKGNAMEBASE}p${_PKGREV}
  .endif

Then in existing ports, nothing need to change, but a new bumped pkgname
would get something like this in the port's Makefile:

 -PKGNAME=${DISTNAME}p0
 +PKGLIBCOUNTER=12345

Perhaps the mechanics above are not adequate or complete, but the concept is
there that if you can arrive at a LIBCOUNTER variable that is the sum of
all the shared libs major/minor numbers in WANTLIB, then from there you
can calculate the ${_PKGREV} appropriately and automatically bump PKGNAMEs,
while still providing the opportunity to manually bump the PKGNAME via
PKGLIBCOUNTER.

If the DISTNAME cranks, then PKGREV goes away from the Makefile; if the
PKGNAME gets bumped, the ports author need only:

  make show var=PKGLIBCOUNTER

to know what value to +1 ... instead of calculating it each make invocation,
you could automagically put LIBCOUNTER in the auto update section of each
port's Makefile.

| Doing stuff automatically every time will mean you will get to update a lot
| of packages.
| 
| Basically, if you have two packages with the same name, and differing WANTLIB,
| how do you know which one is the newest ?

The one with the higher numbered libs of course!  (Though with manual
building of things and people who dont update base/xbase often, this
might produce mixed lists of updated libs, a situation where I don't
know how automation can ever be achieved..)
 
| that's a real issue. And if you find a way to automate that, I'd be very
| happy.

-- 
Todd Fries .. t...@fries.net

 _____________________________________________
|                                             \  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC                 \  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com             \  1.866.792.3418 (FAX)
| 2525 NW Expy #525, Oklahoma City, OK 73112  \  sip:freedae...@ekiga.net
| "..in support of free software solutions."  \  sip:4052279...@ekiga.net
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                                                 
              37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
                        http://todd.fries.net/pgp.txt

Reply via email to