snapmergepuppy, ppm and whiteouts

I am looking at rerwin's "patch6", changes to script 'snapmergepuppy'. The changes of 111210 and 111220 I don't think are necessary -- these are changes to /dev/snd handling and /pinstall.sh, /puninstall.sh and /pet.specs files. However, I have applied the change of 111205, which fixes Jemimah's patch of 110212.

There has been some discussion about a problem with whiteout files when booting off Flash and installing/uninstalling packages. When a package is installed, /usr/local/petget/installpkg.sh installs the files direct to the "save layer" (on the Flash drive), but installpkg.sh then forces aufs/unionfs to perform a layer re-evaluation, which makes the files visible on top. There is also code that ensures no whiteout files on the top "ram layer" will hide the installed files underneath.

One the otherhand, package uninstall works on the top of the layered filesystem, and does not require layer re-evaluation. It does have code that makes sure that if an uninstalled file reveals an earlier file of same name (in an SFS layer), it becomes visible again (by the crude method of copying it to the top, rather than doing a layer re-evaluation).

It should not make any difference, that I can see, whether a session-save occurs before or after a package install/uninstall, or at shutdown. However, there is a situation that could occur...

If I install a package, a file of which replaces one of same name in underlying SFS layer, then I delete package, underlying file gets copied to top of layer f.s. If I then install same package or another, that file gets installed direct to save-layer, leaving older copied-from-SFS-layer file on top, thus the system sees the older file only.
I have fixed this situation in /usr/local/petget/installpkg.sh.

See Woof commit '75e3845e8b', 2011-12-29:
http://bkhome.org/fossil/woof2.cgi/timeline


Posted on 29 Dec 2011, 19:12


Comments:

Posted on 30 Dec 2011, 21:33 by K Godt
Other suggestions for petget
It encountered to me that i did rename a pkg.pet to something like
Lupu5pkg.pet .

The un-install did not work because the uninstall looks for the name from inside the pet but the pkg.name.files are from the outside.pet name .

+db_pkg_name=`echo "$DB_ENTRY" |cut -f 1 -d '|'`

+if [ "$db_pkg_name" != "$DLPKG_NAME" ];then
+DB_ENTRY=`echo "$DB_ENTRY" |sed "s#$db_pkg_name#$DLPKG_NAME#"`
+fi


Another thing is about the ui_ziggi : if not so many pkgs installed there is much white space in the ui and clicking there throws the warning no user installed pkgs ...

-if [ "$DB_pkgname" = "" ];then

+if [ "$DB_pkgname" = "" -a "`cat /root/.packages/user-installed-packages`" = "" ];then #fix for ziggi



The full patch is posted it at the murga bug section .

Regards




Posted on 31 Dec 2011, 18:28 by BarryK
PPM patch
Karl,
Thanks for that, I have applied your patch in Woof:

http://bkhome.org/fossil/woof2.cgi/info/ca4552d46d



Posted on 1 Jan 2012, 11:40 by shinobar
removepreview.sh
I posted petget-20111230.pet which solves the problem rerwin reported. Saying simply,
     cp -a --remove-destination "$S" "$ONESPEC"

rm -f "/initrd/pup_rw$ONESPEC" # clean up RAM layer


Note the petget-20111230 does not merge Kerl's fix.
http://www.murga-linux.com/puppy/viewtopic.php?t=73829

See also the post of rerwin:
http://www.murga-linux.com/puppy/viewtopic.php?p=588472#588472