Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jun 2014 13:36:22 +0400
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        ports-committers@FreeBSD.org
Cc:        svn-ports-head@freebsd.org, ports-developers@FreeBSD.org, svn-ports-all@freebsd.org, tijl@FreeBSD.org
Subject:   The process of switching ports to USES=libtool (Was: Re: svn commit: r359427 - head/archivers/lzo2)
Message-ID:  <20140628093622.GD1249@hades.panopticon>
In-Reply-To: <53AE7858.8080107@FreeBSD.org>
References:  <201406270051.s5R0pEID020230@svn.freebsd.org> <20140628015015.GC1249@hades.panopticon> <53AE7858.8080107@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Matthias Andree (mandree@FreeBSD.org) wrote:

(CC'ng to ports-developers@, as it may be interesting to other
committers).

> > > -USES=                libtool:keepla                                                                                      
> > > +USES=                libtool                                                                                             
> >
> > You should revert this part.                                                                                                
> >
> > This port still has indirect dependees which were not switched to
> > USES=libtool, so rebuilding them will fail for users as .la files
> > are still referenced.
> 
> Which ones?  How would I get hold of a list?
> 
> Before I removed the :keepla, I test built, on 9.1amd64, all ports that
> list lzo2 as their requisite in INDEX-9.  This is why it took so long
> (half a day-ish) between the vuxml commit and the ports update.

> So  1. why would we need to keep the .la file,
> and 2. for which ports?

You can't test this kind of problems by just building the portstree.
The problems will only show themselves when users upgrade their ports.
Here, for example:

Stage 1: pre USES=libtool

  lzo2    <-   gnutls     <-   libvirt     <-    libvirt-glib
  .la           .la              .la                  .la
             [refs lzo2][refs lzo2,gnutls][refs lzo2,gnutls,libvirt]

Stage 2: some converted to USES=libtool

  lzo2    <-   gnutls     <-   libvirt     <-    libvirt-glib
  .la           .la              .la                  .la
(keepla)      (keepla)  [refs lzo2,gnutls][refs lzo2,gnutls,libvirt]
			(still)

Stage 3: you remove keepla

  lzo2    <-   gnutls     <-   libvirt     <-    libvirt-glib
    -           .la              .la                  .la
              (keepla)  [refs lzo2,gnutls][refs lzo2,gnutls,libvirt]
			(still!!)

now if libvirt-glib is updated, user won't be able to rebuild it as
libvirt.la still references liblzo2.la which doesn't exist.

So before removing .la files you need to be sure that whole tree
of dependees is switched to some kind of USES=libtool. If've made
a script which does this check partially - it's useless as it's
tied to my local infrastructure, but you can check out its output:

http://people.freebsd.org/~amdmi3/libtool.txt (view with less -r)

Red entries are tainted (USE_AUTOTOOLS=libtool, or missing libtool with
.la files installed) - if a port has any of these as indirect dependees,
it should keep .la files.

Yellows are libtool:keepla/libtool:oldver - these are safe, but are
likely to have red dependees.

Greens are ports which do not install .la files (do not install libs at
all or were converted to USES=libtool).

If tree is converted with the algorithm "first make sure that all
dependees are green, then convert dependency", users should not
experience any problems, and I stick to it.

The list is, however, massively incomplete as it only takes into account
data explicitely referenced in the port Makefile, e.g. it misses depends
introduced with USES, USE_GNOME, USE_SDL etc., USES=libtool:keepla
introduced my bsd.xorg.mk and probably some other stuff.


There is another partial solution to the problem (untested though): in
the chain above you may bump libvirt after dropping .la's from lzo2 -
thus it will be rebuilt and no longer reference liblzo2.la.


tijl@ may have more comments, I'm AFK till 30th for the time being.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140628093622.GD1249>