LinuxQuestions.org
Visit Jeremy's Blog.
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 11-12-2017, 12:22 PM   #1
gildbg
Member
 
Registered: Aug 2017
Posts: 39

Rep: Reputation: Disabled
How to make package when removepkg also remove symlinks ?


Hello,

I made package and I want to ask, how I can make when uninstall pkg with removepkg mypaket-1.0-x86_64-1.txz also symlinks that I make in doinst.sh to be removed ?

My doinst.sh file now contain:

VER=1.1
PAT="/usr/lib64/soft/$VER/bin/"

local_link() {
NEW="$1"
( cd /usr/bin; rm -rf $NEW )
( cd /usr/bin; ln -sf $PAT$NEW $NEW )

}

local_link linkdb
local_link finddb

I want when I do removepkg linkdb and finddb symlinks from /usr/bin to be removed.

How I can do it ?
 
Old 11-12-2017, 01:10 PM   #2
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,136
Blog Entries: 4

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
You don't need to do *anything*. Don't create doinst.sh yourself!
  • makepkg finds your symlinks and creates the doinst.sh script for you and puts it in the package
  • installpkg copies the doinst.sh script to /var/log/scripts/yourpackage-version-arch-build
  • removepkg reads /var/log/scripts/yourpackage-version-arch-build and removes the symlinks
 
5 members found this post helpful.
Old 11-13-2017, 02:52 AM   #3
gildbg
Member
 
Registered: Aug 2017
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thanks, it's work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] current: removepkg fails to remove all files from kbd-1.15.3 package aaazen Slackware 14 09-16-2016 02:15 PM
Removepkg pkgtools and removepkg tar problem.. pepe41695 Linux - Newbie 3 08-26-2013 05:11 AM
Removepkg didn't remove pkg vdemuth Slackware 1 04-30-2012 02:07 PM
Upgrading to X11R6.8.0...Just a case of removepkg and make world? SBing Slackware 14 09-13-2004 03:10 AM
Package for 'installpkg,removepkg,makepkg," bongski55 Slackware 4 09-15-2003 08:00 AM

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

All times are GMT -5. The time now is 07:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration