LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-17-2011, 10:29 AM   #1
dh2k
Member
 
Registered: Jan 2006
Distribution: Slackware 13.0 (KDE 3.5.10 from 12.2; Xfce 4.6; Fluxbox); Slackware 13.1 (KDE 4.5)
Posts: 211

Rep: Reputation: 52
how do pkgtools work; install / remove files/folders


I am experimenting with creating a slackware package that will aid with customising and theming.

One aim of my packages are that they will only add to a default slackware install and never remove anything from a stock install.

An example,

/etc/skel/.bashrc
/etc/skel/.Xmodmap
/etc/skel/.fluxbox/[CUSTOM FLUX CONFIG FILES]
/etc/skel/.config/Thunar/uca.xml
...and so on...

These will be rolled up into a package with makepkg - but how does slackware know how to install - and more importantly, to remove when removepkg is called.

I have read
http://www.slackwiki.org/Doinst.sh
and
http://connie.slackware.com/~mozes/d...esentation.pdf


but I am still not clear what to author in ./install/doinst.sh

Any suggestions slack-forum?

Last edited by dh2k; 03-17-2011 at 10:30 AM.
 
Old 03-17-2011, 11:23 AM   #2
Rupa
Member
 
Registered: Apr 2008
Location: Berlin, Germany
Distribution: Slackware, Debian, NetBSD
Posts: 80

Rep: Reputation: 27
*) if you install a package containing a file that already exists from another package, then that file is overridden by the new one.

*) if you remove a package containing a file that is also present in another package, then that file is not removed and removepkg prints out a message instead ("file xy is also in another package" or something like that).

*) the policy for config files is: install config files as *.conf.new, for example /etc/foo.conf.new. Then test in your doinst.sh if /etc/foo.conf exists. if it's not, move /etc/foo.conf.new to /etc/foo.conf, else leave everything as it is for the user to sort out changes in /etc/foo.conf.new
 
Old 03-17-2011, 05:48 PM   #3
dh2k
Member
 
Registered: Jan 2006
Distribution: Slackware 13.0 (KDE 3.5.10 from 12.2; Xfce 4.6; Fluxbox); Slackware 13.1 (KDE 4.5)
Posts: 211

Original Poster
Rep: Reputation: 52
So the ./install/doinst.sh is not a requirement of a package only recommended to stop conf files from being overwritten automatically - allowing admin to choose between old and new if a conf' file is present on system and in the package.
 
Old 03-18-2011, 01:49 PM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
A doinst.sh file can be used many ways. Not all packages require one, but some packages do require one because a package is sometimes more than just a bunch of files.
 
  


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
[SOLVED] How to remove duplicate files from Two Folders? guessity Linux - Newbie 19 09-09-2013 01:52 PM
Remove Folders Recursively that contain *.mp3 files size 0KB or jpeg only. Drigo Linux - Newbie 1 07-15-2009 12:37 AM
How to use find and remove folders and files Drigo Linux - Newbie 1 05-31-2009 11:53 PM
remove ~ from all files and folders BoraX Linux - General 1 10-25-2006 07:58 PM
unable to remove files/folders timsch75 Linux - Software 2 03-01-2004 11:01 AM

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

All times are GMT -5. The time now is 11:24 AM.

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