You are not logged in.

#1 2023-07-02 19:09:33

musiclover
Member
Registered: 2021-12-22
Posts: 6

Can I use a .install file to run a script that edits files in $HOME?

I am trying to update the adwaita-for-steam package, and a possible solution would be to use a refined version of the pkgbuild proposed by foldex

I could avoid asking the users for manual access to the install script by inserting the adwaita-for-steam command directly in a .install script and in an alpm hook to also run it when the steam package is updated.

This, however, means that some files in $HOME will be modified without explicit permission from the user.

Would this be allowed in the AUR?

Thanks

Last edited by musiclover (2023-07-02 19:09:53)

Offline

#2 2023-07-02 19:26:03

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: Can I use a .install file to run a script that edits files in $HOME?

musiclover wrote:

Would this be allowed in the AUR?

No, packages are not allowed to directly modify the user's home directory during installation. Even if they were, it would be a bad design because new users would need to re-install the package to apply the changes and users who do not want those changes would not be able to opt out.

The package should install a script or a systemd service that each user can choose to run. If you provide a user service it should be possible to handle the auto-update logic in it without user intervention beyond activating the service.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2023-07-03 18:31:16

musiclover
Member
Registered: 2021-12-22
Posts: 6

Re: Can I use a .install file to run a script that edits files in $HOME?

Ok, thanks. I’ll see how to manage it

Offline

Board footer

Powered by FluxBB