Subject: Re: how to turn off automatic libtool expansion in PLIST?
To: Greg Troxel <gdt@ir.bbn.com>
From: Adrian Portelli <adrianp@netbsd.org>
List: tech-pkg
Date: 11/12/2004 21:10:19
LIBTOOLIZE_PLIST=NO

adrian.

Greg Troxel wrote:

> executive summary: having foo.la in PLIST is interpreted as also
> having all the referenced files, and if foo.la is a symlink to bar.la,
> pkg_install and pkg_delete complain about overwritten/missing files.
> 
> I just made an up-to-date package for guile-pg (guile interface for
> PostgreSQL) in wip/guile-pg.  The only ugliness in the package stems
> from guile-pg installing a symlink:
> 
> $ l /usr/pkg/lib/guile/site/database
> total 144
> lrwxr-xr-x  1 root  wheel     11 Nov 12 15:20 libpostgres.la -> postgres.la
> -r--r--r--  1 root  wheel   2806 Nov 12 15:20 postgres-col-defs.scm
> -r--r--r--  1 root  wheel   9882 Nov 12 15:20 postgres-meta.scm
> -r--r--r--  1 root  wheel   3644 Nov 12 15:20 postgres-resx.scm
> -r--r--r--  1 root  wheel  24073 Nov 12 15:20 postgres-table.scm
> -r--r--r--  1 root  wheel  11345 Nov 12 15:20 postgres-types.scm
> -rw-r--r--  1 root  wheel  43368 Nov 12 15:20 postgres.a
> -rwxr-xr-x  1 root  wheel    898 Nov 12 15:20 postgres.la
> lrwxr-xr-x  1 root  wheel     17 Nov 12 15:20 postgres.so -> postgres.so.0.0.0
> lrwxr-xr-x  1 root  wheel     17 Nov 12 15:20 postgres.so.0 -> postgres.so.0.0.0
> -rwxr-xr-x  1 root  wheel  47248 Nov 12 15:20 postgres.so.0.0.0
> 
> In guile-pg's world view (and in the guile-pg's mainainter's forked
> guile), binary guile modules should be named with just the module
> name.  In guile 1.6.x (current FSF stable), the binary guile module
> '(foo bar baz)' is looked for in foo/bar/libbaz.la.  Earlier I sent a
> bug report to guile-pg, resulting in the compatibility symlink.
> 
> So, the automatic .la PLIST handling is dysfunctionally smart here.
> Is there a way to turn it off for a given file?  Should
> scripts/print-la-libnames simply not expand .la files that are
> symlinks?
> 
> I realize that guile-pg is an odd package in this respect, but I'm
> trying to patch the package as little as possible; removing the
> symlink and renaming the library seems like a lot of work.
> 
> $ sudo pkg_add /usr/pkgsrc/packages/All/guile-pg-0.22.tgz 
> pkg_add: Overwriting /usr/pkg/lib/guile/site/database/postgres.a - pkg guile-pg-0.22 bogus/conflicting?
> pkg_add: Overwriting /usr/pkg/lib/guile/site/database/postgres.so - pkg guile-pg-0.22 bogus/conflicting?
> pkg_add: Overwriting /usr/pkg/lib/guile/site/database/postgres.so.0 - pkg guile-pg-0.22 bogus/conflicting?
> pkg_add: Overwriting /usr/pkg/lib/guile/site/database/postgres.so.0.0.0 - pkg guile-pg-0.22 bogus/conflicting?
> $ sudo pkg_delete guile-pg
> pkg_delete: file `/usr/pkg/lib/guile/site/database/postgres.a' doesn't really exist
> pkg_delete: can't readlink `/usr/pkg/lib/guile/site/database/postgres.so'
> pkg_delete: can't readlink `/usr/pkg/lib/guile/site/database/postgres.so.0'
> pkg_delete: file `/usr/pkg/lib/guile/site/database/postgres.so.0.0.0' doesn't really exist
> pkg_delete: couldn't entirely delete package `guile-pg-0.22'
> (perhaps the packing list is incorrectly specified?)
> 
> Despite all this, guile-pg passes 'make check' (modulo a pg version
> nit in an output string comparison, which isn't a guile-pg bug).
> 
>