[Slackbuilds-users] Slackbuilds: doinst.sh and douninst.sh
Tonus
tonus1 at free.fr
Sat Jul 20 09:12:16 UTC 2024
Hi all
I bet this is for the "request for current" thread on linuxquestions.org
Regards
Tonus (from phone, sorry for writing before quotes)
Le 20 juillet 2024 08:44:23 GMT+02:00, Alessandro Baggi <alessandro.baggi at gmail.com> a écrit :
>
>
>Hi Watson,
>
>Il 19/07/24 21:46, B. Watson ha scritto:
>>
>>
>> On Fri, 19 Jul 2024, Alessandro Baggi wrote:
>>
>>> 3. A clean process during package uninstall that clean created user/group, start/stop system configuration in rc.local/rc.local_shutdown
>>
>> Again I will say it:
>>
>> Packages get *removed* when they get upgraded.
>>
>> Anything a douninst.sh script does, happens when the package gets
>> upgraded. The douninst.sh script doesn't know know whether it's being
>> run due to a permanent removal or due to an upgrade.
>>
>> Do you really want to delete the postgres user during the upgrade process?
>>
>> Normally when you delete a user, you delete the user's files, too (userdel -r).
>>
>> If you don't delete the files, upgrades are safe.
>
>this is a good point but it is not better to instruct slackpkg or upgradepkg or whatever to not run douninst.sh when upgrading packages? This seems a pkgtool feature lacks.
>
>But in that case,
>> if someone really does permanently remove the postgresql package, it's
>> not a clean removal: all the data that was in the databases is still
>> on the filesystem, taking up space... and no longer owned by any user.
>
>Generally, from my point of view, when a package is deleted the package manager should not delete application data and this is a common behaviour also in apt and dnf. There is a difference between system configuration (replicable), application files and real data (not replicable). A clean removal is meant by me like "the application is no more present on the system" and should not consider user data but only app configuration and binary/libs/etc of the specified application.
>
>Following your "clear all suggestion" and running an upgrade, being the package removed and reinstalled, all useful data (reproducible like configuration and not reproducile data like db records) will be deleted making the new installation broken because user loses all data, so is better to instruct pkgtool to assume the right behaviour when upgrading.
>
>Sometimes package manager should be updated with new feature or existent features enhancement.
>
>
>
>
>
>_______________________________________________
>SlackBuilds-users mailing list
>SlackBuilds-users at slackbuilds.org
>https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
>Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
>FAQ - https://slackbuilds.org/faq/
>
More information about the SlackBuilds-users
mailing list