site  contact  subhomenews

Installing a pkg with symlink-to-directory

January 02, 2012 — BarryK
In the Racy 5.2.2 feedback thread on the Puppy Forum, member Tman reported:

ttuuxxx's gtkhash would not install for me with woof. I later discovered that his pet contains a .config/rox.sourceforge.net/SendTo folder that is not symlinked while, in recent puppies, that folder is symlinked to the .config/rox.sourceforge.net/OpenWith folder. This is what is causing the breaking of other Right-click options in Rox-Filer. I have been informed, by another forum member that the SendTo folder should not be a symlink. However, woof builds recent pups with this directory-structure.

The offending PET is here:
http://www.murga-linux.com/puppy/viewtopic.php?search_id=711057642&t=32700

Yeah, this is a problem. I did solve it in older versions of the Puppy Package Manager, but when I moved to support multiple types of packages, not just PETs, this problem came in.

The 'tar' extraction utility defaults to not following symlinks, which is what I want for files, but not for directories. However, tar has no option to distinguish between treatment of file or directory symlinks, not that I can see anyway.
Consequently, when ttuuxxx's PET is installed, it has a file in /root/.config/rox.sourceforge.net/SendTo which just gets installed as-is. The pre-existing symlink /root/.config/rox.sourceforge.net/SendTo is removed.

I have modified /usr/local/petget/installpkg.sh to fix this. It is a bit of a klutzy method of examining the directories after installation and finding if a symlink-to-directory has been overwritten.

Committed:
http://bkhome.org/fossil/woof2.cgi/info/58a1e67dd2

Tags: woof