You are not logged in.

#1 2004-10-09 09:28:28

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Broken Symlinks or am I just smoking dope?

I've exhausted all my resources, and can't figure out what's going on here...

I was making an "openal-devel" package and noticed something curious after I installed it.

1. After PACMAN installl:

ls -al /usr/lib/libopenal.*
-rwxr-xr-x  1 root root 352434 Oct  8 22:58 /usr/lib/libopenal.a
lrwxrwxrwx  1 root root     52 Oct  9 02:54 /usr/lib/libopenal.so -> /var/abs/local/openal/pkg/usr/lib/libopenal.so.0.0.7
lrwxrwxrwx  1 root root     18 Oct  9 02:54 /usr/lib/libopenal.so.0 -> libopenal.so.0.0.7
-rwxr-xr-x  1 root root 255809 Oct  8 22:58 /usr/lib/libopenal.so.0.0.7

look at "libopenal.so" above.  It's using "/var/abs/local/openal/pkg/usr/lib/".

It gets stranger...

2. EXTRACTING to TEMP folder:

If I just take the "openal-devel-20040810-1.pkg.tar.gz" package and untar/gunzip it to a temp folder, I get the following:

-rwxr-xr-x  1 root root 352434 Oct  9 00:21 libopenal.a
lrwxrwxrwx  1 root root     56 Oct  9 04:05 libopenal.so -> /var/abs/local/lib/openal/pkg/usr/lib/libopenal.so.0.0.7
lrwxrwxrwx  1 root root     56 Oct  9 04:05 libopenal.so.0 -> /var/abs/local/lib/openal/pkg/usr/lib/libopenal.so.0.0.7
-rwxr-xr-x  1 root root 255809 Oct  9 00:21 libopenal.so.0.0.7

Now, both of the symlinks are using my "abs" path.

* Why does a pacman install "doo-hickey" one of the symlinks, but a regular extraction keeps them as they were originally created?

Here's the relevant install part from the "Makefile" (which is all self generated):

install_minor_libs:
        $(INSTALL) -d -m 755 $(DESTLIB)
        $(INSTALL) -m 755 src/libopenal.$(SO_EXT).$(VERSION) $(DESTLIB)
        $(LN_S) -f $(DESTLIB)/libopenal.$(SO_EXT).$(VERSION) $(DESTLIB)/libopenal.$(SO_EXT).$(MAJOR_VERSION)
        $(LN_S) -f $(DESTLIB)/libopenal.$(SO_EXT).$(VERSION) $(DESTLIB)/libopenal.so

* I fully understand why those paths are being used, since I use "make DESTDIR=$startdir/pkg/usr/ install" in my PKGBUILD and, of course, the install section from Makefile creates them and makepkg just tar's/gzip's that folder.  What I don't understand is why after a PACMAN install, 1 symlink gets fixed.

I must be overlooking something obvious.  Hell, I can easily add a post_install script to tidy up these symlinks.  I'm just curious why this is happening.  I don't touch the "weed", but I am partially drunk, so what's going on here?

Offline

#2 2004-10-10 07:33:11

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: Broken Symlinks or am I just smoking dope?

skoal wrote:

* I fully understand why those paths are being used, since I use "make DESTDIR=$startdir/pkg/usr/ install" in my PKGBUILD and, of course, the install section from Makefile creates them and makepkg just tar's/gzip's that folder.  What I don't understand is why after a PACMAN install, 1 symlink gets fixed.

not sure why one symlink gets "fixed" but i would first suggest removing the /usr/ from the above quoted path. also inatll fakeroot and always do your initial build with this this will catch alot of cruft like this or bad build that try and install parts of the package directly to your system instead of th package. it is also good to have namcap installed and it should also point out some of these issues.

when i get a chance (if no one has looked at this issue) i will .... but that won't be for a bit.


AKA uknowme

I am not your friend

Offline

#3 2004-10-11 03:37:08

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Broken Symlinks or am I just smoking dope?

sarah31 wrote:

not sure why one symlink gets "fixed" but i would first suggest [...]

Thanks for the suggestions Sarah.

I tried installing fakeroot and I still get the "bad" prefixes in my symlinks, and "namcap" just verifies that.

I tried removing the "/usr" prefix but the "bad" prefixes persist.

I'm at a loss on this one.  In the meantime, I'll just manually "tidy" up the symlinks on my system for my own use.  I'll wait until you experienced maintainers check it out or release the update since I flagged the package as "out of date" per your suggestion.

I'm by no means an expert with the "autoconf" suite, but have used it for quite some time.  When it generates the "Makefile" (with relevant snipets shown above in this thread), $DESTLIB is defined from $DESTDIR, and I don't know how you can get around this without breaking the rest of the install locations.  It's just these symlinks causing problems.  So, I'd be curious to see how you guys take care of it without some "post_install" stuff.

Thanks for the help.

Offline

Board footer

Powered by FluxBB