Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 12-22-2009, 12:54 PM   #1
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
--ROOT=/some/stuff removepkg myPackage.tgz Leaves the directory in Place..

Hi Forum,

when removepkg'ing something that was not in / ( prepending the path of the package ) removepkg leaves the directory of the install in place, is this normal...?

Also, when I installpkg something appending a path of install, /var/log/packages will not report that this was installed... is this ok also...?

I am figuring what to do in case I forget the exact name of what I have installed...


Old 12-22-2009, 01:24 PM   #2
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 544

Rep: Reputation: Disabled
You can find installed packages by:
ls /var/log/packages | grep pkgname
or leave off the "| grep pkgname" if you want to see all of them. Then use
removepkg comppkgname
where comppkgname is like "xedit-1.1.2-x86_64-1". You do not enter a pathname as a parameter to removepkg or to installpkg (unless, in the case of installpkg, you want to install to somewhere other than "/", as noted in another of your threads). The install locations are handled by the package, provided it has been properly created with makepkg (or maybe some other utility).

Last edited by TSquaredF; 12-22-2009 at 01:31 PM. Reason: clarity
Old 12-22-2009, 01:34 PM   #3
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,902

Rep: Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590
You have to re-create the directory structure like the root. For instance, if you build something and it installs everything under /usr/myprog, you need to create a temp directory, like /tmp/test, then copy or move the whole installed dir of your program to there, so you'd have:
/tmp/test/usr/myprog. then, you cd into /tmp/test and run makepkg from there, so that the 'usr' dir there is like the /usr dir in the toplevel of your system

Usually, if the sources support DESTDIR, you'd compile normally for:
mkdir /tmp/dest
make DESTDIR=/tmp/dest install
( The above will create dirs like /tmp/dest/usr/bin )
cd /tmp/dest
makepkg ....
1 members found this post helpful.
Old 12-22-2009, 02:31 PM   #4
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 231Reputation: 231Reputation: 231
This post prompted me to play about with the -root and ROOT= options to installpkg and removepkg as I'd not used them before. Here are my findings.

As the -root implies a new root to the target filesystem the /var/log files are added/removed from a tree below the new root i.e "installpkg -root/home/ed/newroot mypackage.txz" will create an entry in /home/ed/newroot/var/log/packages for the new package. So this explains where the package lists are being updated.

Any directories created by the package are removed if empty when the package is removed. However if any additional files are in there the directories are not removed when the package is removed.

All this is what you would expect to happen if you imagine the root of the filesystem (for the new package) to be where specified by -root and ROOT=. To be honest all results are just what I would expect using the new root specifier.

when removepkg'ing something that was not in / ( prepending the path of the package ) removepkg leaves the directory of the install in place, is this normal...?
Are you sure additional files weren't in the directories - this would cause them to be left in place?

Personally I've always done as recomended - creating a tree under a temporary working directory in which to build the package along with --prefix specifiers at the source configure/build/install time. Doing things this way means you don't have to mess with strange -root/ROOT= options for the pkgtools. It also means little tools like explodepkg work as expected.
1 members found this post helpful.
Old 12-23-2009, 11:12 AM   #5
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi bgeddy

Thkz, I will do as u advise...




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
https - do i need to place copy in other directory too? lespaul74 Linux - Server 2 05-06-2009 12:38 AM
makepkg install- tgz in root? itzig Linux - Software 5 03-22-2006 03:12 PM
removepkg: WARNING: Unique directory contains new files merchtemeagle Slackware 10 06-23-2005 08:51 AM
How can I install my .tgz package under a directory besides root? bankfishin Slackware 1 05-22-2004 05:31 PM
extract single directory from .tgz rickenbacherus Linux - General 2 02-07-2004 10:37 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:59 PM.

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