Upon inserting Ubuntu liveCDs older than current install, it still asks to upgrade

Bug #887650 reported by Fabio Marconi
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Fix Released
Low
Andreas Altaïr Redmer

Bug Description

[Impact]

Just a little problem, with every livecd inserted it propose to upgrade, although it is a release older than the installed.

People might accedentally start an "upgrade" with an older version medium. Especially if a user has many images around an burns/mount unintentionally an older version, and then gets offered an update but will receive a downgrade.

[Test Case]

mount a cd/usb stick with an older ubuntu version (I used alternative install CD) and see how it offers an upgrade from that media.

After applying the change in the branch to the file /usr/lib/update-notifier/apt-cdrom-check the error is fixed.

[Regression Potential]

The fix was developed by 3 developers and consists only of 4 code lines. So it should be free of errors now.

If there is an undiscovered bug in that code now, it will cause, that no update dialog comes up anymore, even if a media with a newer Ubuntu Version is mounted.

[Other Info]

Another way to test the fix is to execute the script directly by
/usr/lib/update-notifier/apt-cdrom-check /media/path/to/the/ubuntu/cd/or/usb/media

and then check the return value of that script with
echo $?

1 = CD with packages
2 = Ubuntu CD with newer version that the currently installed

After the application of the patch it returns only 2 if the inserted media is indeed newer.

Related branches

Revision history for this message
Fabio Marconi (fabiomarconi) wrote :
tags: added: bitesize
description: updated
description: updated
Revision history for this message
Aditya V (kroq-gar78) wrote :

Can you post a video or image(s)?

Changed in update-notifier (Ubuntu):
status: New → Incomplete
Andreas Moog (ampelbein)
Changed in update-notifier (Ubuntu):
importance: Undecided → Low
Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

This screenshoot is showing the update notifier popup suggesting to upgrade to 11.10 version of lubuntu when the host is Precise
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in update-notifier (Ubuntu):
status: Incomplete → Confirmed
summary: - Upgrade to older releases ?
+ Upgrade to older releases
Revision history for this message
Nathan Williams (nathwill-deactivatedaccount-deactivatedaccount) wrote : Re: Upgrade to older releases

so in looking at this, it seems that the shell script data/apt-cdrom-check is responsible (used as helper script) for determining if the media contains a valid upgrade source, so that seems the correct place to fix this.

I'm not sure though what the best method to go about that would be.

looking at an 11.10 cd, i see the .disk/info path contains some version/release information that could be used to make a comparison agains /etc/lsb-release on the base system, but i'm not sure if older releases also had the .disk/info on the install media, or if it would be preferable to carry an array of some md5's of the older media?

i'm going to see about snagging some older ubuntu releases to look at and see whether .disk/info is even a good option.

summary: - Upgrade to older releases
+ Upon inserting Ubuntu liveCDs older than current install, it still asks
+ to upgrade
Paul Smith (pdereksmith)
Changed in update-notifier (Ubuntu):
assignee: nobody → Paul Smith (pdereksmith)
Revision history for this message
Andreas Altaïr Redmer (altair-ibn-la-ahad) wrote :

It seems to be abandoned by the current assignee. But I have created a fix for this.

Changed in update-notifier (Ubuntu):
assignee: Paul Smith (pdereksmith) → Andreas Altaïr Redmer (altair-ibn-la-ahad)
Revision history for this message
Andreas Altaïr Redmer (altair-ibn-la-ahad) wrote :

I am not sure how I link my branch to this bug, so I attach a patch for the file data/apt-cdrom-check here.

Changed in update-notifier (Ubuntu):
status: Confirmed → Fix Committed
tags: added: patch
tags: removed: bitesize
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lp887650.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Please don't mark bugs as Fix Committed unless the fix has been uploaded. Also, can you please submit your fix upstream (to lp:notifier)?

By the way, you can link Bzr branch to a bug by adding "--fixes lp:NUMBER" to the commit command.

Changed in update-notifier (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I meant lp:update-notifier, of course.

Revision history for this message
Andreas Altaïr Redmer (altair-ibn-la-ahad) wrote :

Okay. Thanks for your feedbback. I've made the changes and created a new branch.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks, hopefully it'll now be reviewed by upstream update-notifier developers.

Changed in update-notifier (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.132

---------------
update-notifier (0.132) raring; urgency=low

  * data/apt-cdrom-check: correctly quote mount path given to the awk command,
    otherwise it hits an error with directories with spaces in their name,
    e.g "Ubuntu 12.10"

  [ Colin Watson ]
  * Switch from g_timeout_add to g_timeout_add_seconds everywhere, which
    should allow for better power use.
  * Remove unused TIMEOUT_APT_GET_UPDATE macro.

  [ Brian Murray ]
  * Remove unused firmware paths from uevent.c.
  * data/apt-cdrom-check: check that the release on the media is greater than
    the current release (LP: #887650). Thanks to Andreas Altaïr Redmer for the
    patch.

  [ Michael Terry ]
  * Use synaptic-pkexec instead of gksu in backend_helper.py
  * Install a policykit policy file to replace last gksu use for
    cddistupgrader.
 -- Sebastien Bacher <email address hidden> Fri, 15 Mar 2013 12:35:49 +0100

Changed in update-notifier (Ubuntu):
status: Fix Committed → Fix Released
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.