You are not logged in.

#1 2015-05-24 00:07:34

severach
Member
Registered: 2015-05-23
Posts: 192

Obtain pacman --nosave option in PKGBUILD install script

Can I get to the --nosave option in the install script of a PKGBUILD? Rather than tell users how to fully uninstall a package I'd like to make the install script do it. If they don't specify --nosave then I leave a few things they might want for a reinstall. If they specify --nosave then I delete everything.

I don't see it where it needs to be on pre_remove and post_remove.

Offline

#2 2015-05-24 01:41:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Obtain pacman --nosave option in PKGBUILD install script

Why not let them use pacman for that? What package is it? What's the benefit of "hiding" it in the install script? I don't think automagically removing stuff is a good idea.

Offline

#3 2015-05-24 03:56:13

severach
Member
Registered: 2015-05-23
Posts: 192

Re: Obtain pacman --nosave option in PKGBUILD install script

They will use pacman and it's not hidden in the install script. It's quite normal for install scripts of big packages to delete files. What I want is for the install script to delete more files if they use

pacman -R --nosave mypackage

This means that the user is not going to use mypackage any more and wants all the slop removed, often because they think the config is broken and a brand new config might fix it.

The problem is that PKGBUILD backup=() is so horribly implemented that I tend to avoid it. backup=() works fine on upgrade but is borked for remove/reinstall. I can't have users chasing down pacsave files because they had to temporarily remove a package. I need to be able to remove/reinstall packages with or without alterations to the configuration, as specified by the user. The only way I can get config files to be managed correctly is to keep them out of the package and out of the backup array. I delete them in the install script when the conditions are right. The backup array isn't the least bit capable of handling config folders, temp folders, log folders, database entries, and other stuff found in big packages.

Without some help in the install file it's either slop or scorched earth--and the PKGBUILD-er makes the decision.

There aren't many packages that need this so for now I just put cleanup instructions in the PKGBUILD.

Offline

Board footer

Powered by FluxBB