WarMock, I believe you've done it!
I have incorporated your technique into /usr/local/bin/sfs_linker and done a few preliminary tests and it works!
I placed:
Code: Select all
cat /root/.packages/*.files > /tmp/installedpackagefiles #suggested by WarMock 22mar10
at the beginning (line 6) to generate a list of previously installed files.
I modified the .file generating code (line 96) to read:
Code: Select all
find ./$SFSNAME -mount -mindepth 1 | sed -e "$APATTERN" | sed -e 's/\/root0\//\/root\//g' > /tmp/$SFSNAME.files
and (line 98]
Code: Select all
find ./$SFSNAME -type l -mount -mindepth 1 | sed -e "$APATTERN" | sed -e 's/\/root0\//\/root\//g' >> /tmp/$SFSNAME.files
then used (line 100):
Code: Select all
diff /tmp/$SFSNAME.files /tmp/installedpackagefiles | grep / | grep -v ">" | cut -b 3- > /tmp/$SFSNAME.difference
to list only those new files installed by this package, and finally(line 101)
Code: Select all
cp /tmp/$SFSNAME.difference /root/.packages/$SFSNAME.files
to create the SFSNAME.files file in /root/.packages.
I created a .pet of the icons from one of my SFS's and installed it. Then used SFS_Linker to install the SFS. The icons were not listed in /root/.packages/SFS.files, although all the other files were, and were not uninstalled along with the SFS, perfect!
Using this technique /usr/local/bin/sfs_unlinker does not need to be changed and files copied from the SFS package can be removed safely at uninstall as opposed to just removing links.
I am attaching the modified /usr/local/bin/sfs_linker for you to test. Will repackage the .pet and post after further testing.
Thanks, J