duplicate "N packages can be updated." messages in motd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-notifier (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Lately I've been noticing that as I ssh into one particular server, I get duplicate messages about updates. Digging a bit deeper I see they come from /usr/lib/
mg@fridge: ~ $ /usr/lib/
0 packages can be updated.
0 updates are security updates.
0 packages can be updated.
0 updates are security updates.
0 packages can be updated.
0 updates are security updates.
Once I saw three messages with slightly different spacing (no blank line between 1st and 2nd, two blank lines between 2nd and 3rd). Yesterday I also saw a similar issue (two messages instead of one) on a different server (running Ubuntu 10.04).
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: update-
ProcVersionSign
Uname: Linux 3.2.0-35-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Tue Mar 5 08:31:28 2013
MarkForUpload: True
PackageArchitec
SourcePackage: update-notifier
UpgradeStatus: Upgraded to precise on 2012-07-31 (216 days ago)
Related branches
Changed in update-notifier (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in update-notifier (Ubuntu): | |
status: | Triaged → Fix Committed |
I looked at the script. It appears to be a simple race in case of simultaneous logins. Changing
echo "" > $stamp lib/update- notifier/ apt-check --human-readable >> $stamp
/usr/
echo "" >> $stamp
to
{ echo ""; /usr/lib/ update- notifier/ apt-check --human-readable; echo ""; } > $stamp
might be enough to make it go away.