Here the bigger, but more architecturally complete solution for wily&upstream (which is actually identical at this time).
Summary:
- move the actual updating part out of the pam based trigger completely (avoids slowdown)
- pam based motd now only prints the cached info (if existing)
- hook into apt with APT::Update::Post-Invoke-Success to update the cached file (thanks mvo and pitti for that good IRC discussion)
- removed one level of indirection (apt hook -> stamp file -> on pam login check stamp -> update) to the more separate
(apt hook -> update cached info) (on pam login -> print cached info)
- while the chance of a concurrent update is now (almost) impossible it keeps the atomic cache update and cleanup to be sure
It was working find in all my builds and tests on wily.
Attaching for review ...
Here the bigger, but more architecturally complete solution for wily&upstream (which is actually identical at this time).
Summary: :Post-Invoke- Success to update the cached file (thanks mvo and pitti for that good IRC discussion)
- move the actual updating part out of the pam based trigger completely (avoids slowdown)
- pam based motd now only prints the cached info (if existing)
- hook into apt with APT::Update:
- removed one level of indirection (apt hook -> stamp file -> on pam login check stamp -> update) to the more separate
(apt hook -> update cached info) (on pam login -> print cached info)
- while the chance of a concurrent update is now (almost) impossible it keeps the atomic cache update and cleanup to be sure
It was working find in all my builds and tests on wily.
Attaching for review ...