[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to execute user's scripts when upgrading a certain package via apt/aptitude



On 2018-03-29 01:03, John Crawley (johnraff) wrote:
> On 2018-03-29 03:40, tomas@tuxteam.de wrote:
>> On Wed, Mar 28, 2018 at 08:18:24PM +0200, Mikhail Morfikov wrote:
>>> On 2018-03-28 20:12, Sven Joachim wrote:
>>> I really thought there's some easy way to include user's scripts when you want
>>> to make some additional changes to the upgraded packages, but it looks like the
>>> apt mechanism is a little bit limited. But I will try to do something with the
>>> trigger and see how that will work.
>>
>> I think the trick is to create a (nearly) empty package "my-firefox-custom"
>> which depends on firefox and thus pulls it in before its own post-install
>> takes over.
> This sounds as if it should work, but your custom package would need 
> upgrading every time Firefox was upgraded, so the automation would be lost.
> 
I think the trigger is working as it should (or am I missing something?).
Basically I created the package, installed it and after that I'm upgrading the
firefox package, I get the following messages in the log:

-----------------------------------------------------------------------------
# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  firefox
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/41.6 MB of archives.
After this operation, 3,072 B disk space will be freed.
Do you want to continue? [Y/n]
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
(Reading database ... 248259 files and directories currently installed.)
Preparing to unpack .../firefox_59.0.2-1_amd64.deb ...
Unpacking firefox (59.0.2-1) over (59.0.1-1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-2) ...
Setting up firefox (59.0.2-1) ...
Processing triggers for man-db (2.8.2-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for firefox-trigger (1.0) ...
-----------------------------------------------------------------------------

And as you can see, the trigger "firefox-trigger" is being processed (as many
others), but I didn't upgrade my custom package along with firefox. So will it
work in the way it should or not?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: