You are not logged in.

#1 2017-02-02 19:14:18

jb.1234abcd
Member
Registered: 2013-10-14
Posts: 20

pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Hi,
recently after every pacman update i get this msg. What does it mean ?
For example:
$ su -c 'pacman -Syu'
...
Packages (1) gst-plugins-base-libs-1.10.3-1
...
(1/1) upgrading gst-plugins-base-libs              [#####################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
$

Offline

#2 2017-02-02 19:50:13

nassi
Member
From: Finland
Registered: 2017-01-27
Posts: 35

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Offline

#3 2017-02-03 08:21:11

louisl
Member
Registered: 2017-02-03
Posts: 2

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Can anyone explain the need for the offline update system where arch is concerned?

I don't think I've ever heard of the conflicts that the link talks about.

Here are some guidelines how to implement "offline" OS updates with systemd. By "offline" OS updates we mean package installations and updates that are run with the system booted into a special system update mode, in order to avoid problems related to conflicts of libraries and services that are currently running with those on disk. This document is inspired by this GNOME design whiteboard.

Offline

#4 2017-02-03 08:38:48

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 1,559

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

This has absolutely nothing to do with offline updates, which Arch doesn't even implement. Don't use random reddit comments as reputable sources.

Offline

#5 2017-02-03 08:55:10

headkase
Member
Registered: 2011-12-06
Posts: 1,828

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

arojas wrote:

This has absolutely nothing to do with offline updates, which Arch doesn't even implement. Don't use random reddit comments as reputable sources.

Along with the original poster I would appreciate a pointer to what it does in Arch.  Thanks in advance.

Offline

#6 2017-02-03 10:45:04

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 95
Website

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Not a lot at the moment

[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/

[Action]
Description = Arming ConditionNeedsUpdate...
When = PostTransaction
Exec = /usr/bin/touch -c /usr

Offline

#7 2017-02-03 10:48:16

louisl
Member
Registered: 2017-02-03
Posts: 2

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

arojas wrote:

This has absolutely nothing to do with offline updates, which Arch doesn't even implement. Don't use random reddit comments as reputable sources.

First google result for ConditionNeedsUpdate.

systemd-update-done.service is a service that is invoked as part of the first boot after the vendor operating system resources in /usr have been updated. This is useful to implement offline updates of /usr which might require updates to /etc or /var on the following boot.

It certainly has something to do with offline updates, although the hook in question simply touches /usr so seems more like a hack to get systemd to stop complaining after /etc or /var has been touched? (just a hunch) - i.e. not to implement offline updates, just to work around some bloat?

Offline

#8 2017-02-03 12:46:22

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 1,559

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

louisl wrote:
arojas wrote:

This has absolutely nothing to do with offline updates, which Arch doesn't even implement. Don't use random reddit comments as reputable sources.

First google result for ConditionNeedsUpdate.


The pacman message (which is what the OP was asking about) has nothing to do with offline updates.

Offline

#9 2017-02-03 13:38:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,435
Website

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

I don't see that there's much to do in this thread as there is no problem that needs fixing.  However, the OP's real question was what does that message mean.  Highlighting what it doesn't mean is useful to the extent that it prevents misunderstandings - but really the most effective way to prevent incorrect answers from gaining traction is to replace them with the correct answer.  Arojas, you've twice rejected an answer as incorrect - can you replace it with a correct answer?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#10 2017-02-03 16:24:28

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 258

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Please explain. It is too much like "Would you like to play a game?....Global Thermonuclear War."


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#11 2017-02-08 09:25:36

cjxgm
Member
From: Zhejiang, China
Registered: 2013-09-03
Posts: 9
Website

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

It means "Updating /usr modification time for triggering systemd unit's ConditionNeedsUpdate pre-condition", kind of.
For what does ConditionNeedsUpdate do in a systemd unit, consult systemd.unit(5) and search for ConditionNeedsUpdate.

I'd suggest changing the current Description since it's so confusing and looks like the system/repository has been compromised.

Last edited by cjxgm (2017-02-08 09:26:30)

Offline

#12 2017-02-09 04:26:09

sesa
Member
Registered: 2017-02-09
Posts: 2

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Seems like it is just very important sounding but at last totally useless and dispensable output spamming the screen just to be ignored.

Offline

#13 2017-02-09 20:02:40

rdeckard
Wiki Maintainer
Registered: 2015-01-28
Posts: 135

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

To expand and clarify what's been said here, the hook touches /usr if anything in /usr has been updated. Some services need to be run on boot, but only if /usr has been updated, and this hook ensures that those services know that it has been updated.

From http://0pointer.de/blog/projects/stateless.html:

A new condition ConditionNeedsUpdate= has been added. With this mechanism it is possible to conditionalize execution of services depending on whether /usr is newer than /etc or /var. The idea is that various services that need to be added into the boot process on upgrades make use of this to not delay boot-ups on normal boots, but run as necessary should /usr have been update since the last boot. This is implemented based on the mtime timestamp of the /usr: if the OS has been updated the packaging software should touch the directory, thus informing all instances that an upgrade of /etc and /var might be necessary.

Offline

#14 2017-02-09 20:36:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,578
Website

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

sesa wrote:

Seems like it is just very important sounding but at last totally useless and dispensable output spamming the screen just to be ignored.

I think you can mask the hook and create a copy of it omitting the output to stdout.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#15 2017-02-09 20:46:04

rdeckard
Wiki Maintainer
Registered: 2015-01-28
Posts: 135

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Doesn't the mtime of a parent directory get updated when files are changed within it?

Edit: Just tested it out. No, it does not.

Last edited by rdeckard (2017-02-09 20:51:10)

Offline

#16 2017-02-10 15:05:08

onexused
Member
Registered: 2009-10-07
Posts: 95

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Hmm. Since I had just downgraded my kernel when I first saw this, I thought it might have something to do with nagging about updates, like Windows XP and iphones do. I'm glad to hear it doesn't, but I'd suggest the message be more clear, "Pacman modified files in /usr. Notifying systemctl services." (or something more succinct and correct), or just be removed.

Offline

#17 2017-02-10 15:36:04

Raynman
Member
Registered: 2011-10-22
Posts: 1,246

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Maybe just "Arming systemd's ConditionNeedsUpdate trigger" then, so it's clear that this is a systemd thing, making it easier to search for more info (whether it's on the web or directly in systemd.directives(7)).

I really wouldn't want all the implementation details of this trigger mechanism crammed into the hook description.

Offline

#18 2017-02-10 16:04:28

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 258

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

I wouldn't suggest doing an update when TSA asks to examine your laptop...


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#19 2017-02-10 16:37:24

jb.1234abcd
Member
Registered: 2013-10-14
Posts: 20

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

As already indicated in docs, ConditionNeedsUpdate makes sense in Offline update situation only, which should be followed by a system reboot to "normalize" system's state (note that this condition is part of stateful/stateless/etc considerations).

Otherwise (non-Offline update), any "normalization" of system state should be performed as post-transaction/final step of update as hooks or services (e.g. fontconfig.hook, ldconfig.service). Delaying it until some future reboot (it may not even happen in some deployments) may create an unstable system state.

So, as it is now, it appears to be some enigmatic solution to some problem (it seems that the implementer is the only one who knows it) or potentially malicious (machine/container/snapshot "unnormalized"/ambiguous state), not to mention ambiguous (also in description) to the user.

Last edited by jb.1234abcd (2017-02-10 18:10:03)

Offline

#20 2017-02-11 05:47:00

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 4,565
Website

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Moving to Pacman issues.

Offline

#21 2018-11-16 00:39:20

johnpiers
Member
From: Norwood, Johannesburg
Registered: 2012-07-22
Posts: 25

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Standard output. Nothing needs fixing :: What it's actually doing when it reports that description is /usr/bin/touch -c /usr Which means Update the access and modification times of each FILE to the current time, and do not create any files - at location /usr.
Standard output. Nothing needs fixing ::

What it's actually doing when it reports that description is

/usr/bin/touch -c /usr

Which means

Update the access and modification times of each FILE to the current time, and do not create any files - at location /usr.

If you want to, you can take a look at the file/hook itself, or even change its output to “No errors”

/usr/share/libalpm/hooks/systemd-update.hook

Offline

#22 2018-11-16 01:08:56

circleface
Member
Registered: 2012-05-26
Posts: 613

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."

Please do not necrobump old threads with information that is already in the thread.

Offline

#23 2018-11-16 01:34:29

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,203
Website

Re: pacman - system update - what is msg "Arming ConditionNeedsUpdate..."


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB