Git Product home page Git Product logo

Comments (4)

dylanaraps avatar dylanaraps commented on August 25, 2024

The reason I haven't added this feature is that I don't think it is needed.

Some packages, such as shells, might need to clean up the system after being uninstalled (removing their entry in /etc/shells).
Adding and removing system users for various services (ssh, http, ftp) also comes to mind.

No packages add entries to existing files and no packages automatically set up groups. I believe these steps should be left to the user and not be automated. Even the post-install script is hardly needed and or used.

In my eyes this is best left up to the user. For example, I use openssh but have no need for the group associated with it and I have multiple shells installed but no use for /etc/shells. There are 200+ packages across the official repositories and community and it's been fine without this feature thus far.

(The post-install script has been used only 6 times (2 of which just display a message to the user)).

Additional Pre/Post Install/Uninstall/Upgrade scripts.
This can be implemented through either separate files, like the current post-install,
or a central scripts or install file with multiple functions.

Were this to be added it would have to be multiple files as the build and post-install scripts are implemented this way to allow them to be language agnostic. I'm also highly against using . script (which is literally eval) to allow for multiple functions.

An extension of this would be also passing the package version strings to functions, for ex. if a package only needs to run the upgrade steps between specific versions (this, and the second approach, are inspired by Arch PKGBUILDs).

Does any piece of software actually need this?

Thanks for opening the issue. 👍

from kiss.

dithpri avatar dithpri commented on August 25, 2024

No packages add entries to existing files and no packages automatically set up groups. I believe these steps should be left to the user and not be automated. Even the post-install script is hardly needed and or used.

Fair enough. I was thinking about getting post-uninstall seeing that post-install is already implemented.

Were this to be added it would have to be multiple files as the build and post-install scripts are implemented this way to allow them to be language agnostic. I'm also highly against using . script (which is literally eval) to allow for multiple functions.

I did expect that response :p

Does any piece of software actually need this?

Excluding shells, not yet. A future update might introduce some breakage which could either be solved by the package maintainer or require a manual intervention. Now that I think of it this 'manual intervention' can just as well be a post-install message displayed to the user. Although idk how this fares if the intervention is needed before installing.

from kiss.

konimex avatar konimex commented on August 25, 2024

In my eyes this is best left up to the user.

For the distro, I'd agree. But the package manager shouldn't be bound to the restriction and make all options available, if and should we intend the kiss package manager to be "universally available" and not made specifically for KISS Linux alone.


I think the current approach works fine (instead of Arch's approach of lumping all of them in an <pkgname>.install script and evaling them).

However, since kiss is... for lack of a better term, "production-ready", we'd need to make it backward-compatible of course, should we add the new feature. So in my view post-install remain as is, however I don't know what else should we add apart of pre-remove. Since I only have a use case for pre-remove (which is deleting the system users), and not pre-install and post-remove.

from kiss.

dylanaraps avatar dylanaraps commented on August 25, 2024

Added support for pre-remove hooks. With hooks in both install/remove it should be possible to do pretty much anything you'd need to. I don't see a need in post-remove as pre-remove should be fine anyway.

from kiss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.