LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-01-2011, 02:36 PM   #1
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Rep: Reputation: 42
src2pkg doinst.sh auto library links


Hi Gilbert, quick q re. auto generated doinst.sh files when using the -A switch. The file will contain link removal and generation for libraries in the package eg.

( cd usr/lib64 ; rm -rf libk5crypto.so.3 )
( cd usr/lib64 ; ln -sf libk5crypto.so.3.1 libk5crypto.so.3 )

When upgrading to a new version of the app, the library name might change eg.

libk5crypto.so.4.2

So the links that doinst.sh creates is now incorrect. ie. the link is now dead because it points to a file that does not exist. Does one have to regenerate .src2pkg and resulting doinst.sh when using a new version of the package or is there another way to have doinst.sh regenerated without redoing .src2pkg?

Regards, Robby

Last edited by rpedrica; 04-01-2011 at 03:42 PM.
 
Old 04-01-2011, 05:52 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
if you build a package for libk5crypto.so.4.2, unless you've overridden doinst.sh autogeneration, you'll end up with
Code:
( cd usr/lib64 ; rm -rf libk5crypto.so.4 )
( cd usr/lib64 ; ln -sf libk5crypto.so.4.2 libk5crypto.so.4 )
Yes, anything that uses the old library will no longer work, but that's by design. The "major version" changed from 3 to 4, which means the developer of the library did something that was not backwards-compatible. You can generally force the issue by creating the libk5crypto.so.5 link manually, but that has an extremely good chance of causing weird crashes.

TLDR: The doinst.sh is fine, but sometimes it'll leave broken links that don't actually cause a problem.
 
Old 04-02-2011, 10:02 AM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
eah, if the library versions change, then you need a new doinst.sh. You can, of course, manually edit it to achieve that. or, if it was generated completely at first by src2pkg, then just delete it and a new one will be generated. Note that, using '-A' simply means that what was placed in the package gets copied to the current dir. If you don't use '-A', it will still be generated any time it is needed. If you have, or need, to add some static code to the script, then put it in either doinst.prepend and/or doinst.append. I have quite a few done that way so I still have the advantage of auto-generated links creation, along with arbitrary (static) code before or after that. Remember, if you have a doinst.sh or doinst.sh.gz present, then they will be used instead of generating new code.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New src2pkg release available for download -Introducing the src2pkg WIKI gnashley Slackware 11 05-06-2008 11:09 AM
Updating library links Boudewijn Linux - Newbie 3 11-08-2004 02:57 PM
updating shared library links jamaso Slackware 1 06-20-2004 10:25 AM
Updating Shared Library Links dawizman Slackware 7 04-27-2004 11:02 AM
Prevent updating shared library links melinda_sayang Slackware 1 02-26-2004 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration