site  contact  subhomenews

PPM: post uninstall script

August 18, 2009 — BarryK
Forum member shinobar reported that the Puppy Package Manager does not support the 'puninstall.sh' script. Yes, it is a complete rewrite, compared with PETget in 4.21 and earlier, and I had not yet implemented that feature.

The PET package specification states that two scripts are allowed, a post-install script 'pinstall.sh' and a post-uninstall script 'puninstall.sh'.

Ok, I have edited /usr/local/petget/installpkg.sh and /usr/local/petget/removepreview.sh, now supporting the post-uninstall script.

Note, at package installation 'puninstall.sh' gets moved from '/' and renamed to /root/.packages/<package-name>.remove

The idea of a post-uninstall script is to do some essential cleanup that simply removing the packages files has not achieved. However, it is wise to look through the 'removepreview.sh' script to see how it uninstalls a package, as quite a lot of post-install cleanup is automatically done -- like making sure that a file on a lower Unionfs layer that was visible on-top prior to the package being installed, is once again visible after the package is uninstalled.

Comments

Question on new 4.23 petget
Username: Sit Heel Speak
Thanks--lack of puninstall.sh has been stopping risk-averse moi from keeping current with my bci pets. Will the rewritten versions be useable in 4.22 and in earlier versions of 4.23? A related issue I've noticed: beginning in 4.22, is that PPM/petget will error-out if the PET is not downloaded the usual way into /root but rather resides in a subdir whose dirname has a space in it. Not a problem for users, but a profanity-inducer for anyone trying to develop multiple versions of the same PET and keep them in separate, explicitly-labelled subdirs.

petget
Username: BarryK
"I don't know what you are asking here: [i]Will the rewritten versions be useable in 4.22 and in earlier versions of 4.23?[/i] I'll look at the petget script, see if I can fix the problem with spaces.

petget clarification
Username: Sit Heel Speak
">>I don't know what you are asking here Well, for a specific example, I'm wondering if I could supply the revised petget script within a bci PET to Beem for his upup-466, so he can [i]uninstall[/i] my handiwork if he doesn't like what it does to his fonts!

petget scripts inside .pet
Username: BarryK
"It could be done, but not a very good idea as those scripts would then install on top of the official ones. The official scripts will continue to evolve. It is better if developers/users upgrade to the latest Woof build system. Note, I plan to do another Upup build soon.

petget substitution / bci rethink
Username: Sit Heel Speak
"Acknowledged. I will play-it-by-ear on whether to supply petget with any particular bci pet. Two Pup(py) versions can have the same kernel, gcc, libc.so.6 and still the bci pet which beautifies the one will uglify the other. So, I surmise that gtk+ and related libs, pango+cairo, libXft, and the browser are compiled from-Puppy-version-to-version with different-enough switches and/or evolving dependencies to require I compile bci-libfreetype on the specific Pup(py) on which it will run. Some must lag back, e.g. Beem must use upup-466, not 476, because his Medion and 2nd sata drive don't work with 476. Such omissions inevitably afflict the newest, Beem's is but one typical case of many, so, as I say, I'll play it by ear. Something else has digeridoo'ed over my kazoo: the whole idea of the bci pet has been called into question, at least for some Pup(pie)s, by what I've learned from iguleder and Beem. iguleder posted a very simple few-lines edit which 4.12, 4.21, and upup-466, and perhaps all Pup(pie)s, benefit from practically as much as from my 660kb bci-hinting pets. It's just a few-lines edit to /etc/fonts/local.conf, and/or creation of a /root/.fonts.conf. (at least, it works practically as well as my bci pets on Puppy's default DejaVu Sans font; haven't tested it yet on other fonts). Heh...I'm a little embarrassed at the reactionary way I greeted this shockingly wonderful revelation. Well, at least it was a revelation [i]to me[/i]... upup-466 to a small extent, and official Puppy 4.12-regular to a huge extent, look positively awful if I apply bci-hinting.

.
Username: disciple
"Although I do think all the font substitution you do is complicated and unnecessary :) I just use Arial for everything :)


Tags: woof