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
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 19,008
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  •   Github

Registered Linux User #482438

Online

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

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,355

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: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Online

#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