You are not logged in.

#1 2013-02-28 21:39:06

teratomata
Member
Registered: 2010-02-23
Posts: 13

Run a script after a package is updated?

Is it possible to run a script after a package is updated? I have Anki use a custom config folder (~/.anki instead of the default ~/Anki) and every time Anki updates it reverts back to the default folder. It's not such a burden to make a script that fixes this and run it manually after every update, but it would be nice if it worked automatically. So is there any way to monitor what pacman updates and run a script after it updates a certain package?

Offline

#2 2013-02-28 21:48:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Run a script after a package is updated?

Take a look at the gummiboot service file...
https://wiki.archlinux.org/index.php/Gu … _on_update


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-02-28 21:49:15

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: Run a script after a package is updated?

If you're modifying a config file to change this, and pacman is overwriting it, consider adding the config file to pacman's NoUpgrade array in pacman.conf (man pacman.conf for details). If you feel that lots of people would benefit from this file being exempt from the upgrade process, file a bug report/feature request, and the maintainer may make the change in the package itself.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2013-02-28 22:34:19

teratomata
Member
Registered: 2010-02-23
Posts: 13

Re: Run a script after a package is updated?

@jasonwryan Interesting, I didn't realize it was so easy to monitor file changes. I'll try this out when I get some spare time.

@WorMzy It's not a config file, Anki is written in Python so I'm just editing the script for the default directory.

Offline

Board footer

Powered by FluxBB