alternate installer image cdromupgrade script uses stable instead of $CODENAME

Bug #326856 reported by Andy Whitcroft
2
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Andy Whitcroft

Bug Description

Binary package hint: debian-installer

The cdromupgrade script looks in dists/stable/main/dist-upgrader/binary-all for the installer. On the current CD's they are in dists/jaunty. It looks like the cdromupgrade script should be using $CODENAME here. Converting to that worked here.

Revision history for this message
Colin Watson (cjwatson) wrote :

The cdromupgrade script is maintained as part of the update-manager package. dists/stable should exist as a symlink to dists/jaunty, though; this should only be a problem if you're running off a USB stick.

Changed in update-manager:
status: New → Confirmed
Revision history for this message
Andy Whitcroft (apw) wrote :

@Colin -- thanks for the redirect. I can confirm I hit this when upgrading some build machines using a USB stick install of the image, made using usb-creator.

Revision history for this message
Andy Whitcroft (apw) wrote :

In fact if I look at the real ISO image there is a link there:

    apw@dm$ ls -l /mnt/dists
    total 2
    dr-xr-xr-x 4 root root 2048 2009-02-08 07:32 jaunty
    lr-xr-xr-x 1 root root 6 2009-02-08 07:32 stable -> jaunty
    lr-xr-xr-x 1 root root 6 2009-02-08 07:32 unstable -> jaunty

So this looks like a bug in usb-creator rather than in the image or the script.

Revision history for this message
Andy Whitcroft (apw) wrote :

Looking at usb-cdcreator it seems this is deliberate in some sense:

            if stat.S_ISLNK(st.st_mode):
                if os.path.lexists(targetpath):
                    os.unlink(targetpath)
                linkto = os.readlink(sourcepath)
                #os.symlink(linkto, targetpath)
                # FIXME: Handle this somehow?
                sys.stderr.write('Tried to symlink %s -> %s\n' % \
                    (linkto, targetpath))
                pass

Its not obvious why simply symlinking this is not correct. If the symlink is relative as it is on the CDROM image then it will be fine, absolute ones could conceivably be seen as a security issue, as could those which move outside of the image. Though that should be possible to detect and reject such things.

Andy Whitcroft (apw)
Changed in update-manager:
importance: Undecided → Medium
Revision history for this message
Andy Whitcroft (apw) wrote :

Ok, they cannot be represented because we are using VFAT to store the filesystem. Therefore if we do want to fix we need to avoid the links. So we either fix the scripts or live with it.

Revision history for this message
Andy Whitcroft (apw) wrote :

Seems simple enough to fix. Patch to switch to using the codename over the stable link is attached.

Revision history for this message
Andy Whitcroft (apw) wrote :

Have applied this fix to a bzr branch and proposed it for merging:

    lp:~apw/update-manager/cdromupgrade-avoid-links

Changed in update-manager:
assignee: nobody → apw
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.97.1

---------------
update-manager (1:0.97.1) jaunty; urgency=low

  [ Michael Vogt ]
  * UpdateManager/UpdateManager.py:
    - make the gconf handling more robust (LP: #320586)
  * UpdateManager/Core/MyCache.py:
    - fix crash when no changelog can be found (LP: #320894)
  * UpdateManager/Core/MetaRelease.py:
    - do not crash on disk full (LP: #321872)
  * DistUpgrade/DistUpgradeController.py:
    - when commenting out third party repositories add a comment
      why they were disabled and update them to the current dist
      to make re-enabling easier
  * DistUpgrade/DistUpgradeQuirks.py:
    - run dpkg --forget-old-unvail after the upgrade finished
    - add "PostCleanup" hook
  * DistUpgrade/cdromupgrade:
    - fixed typo (LP: #312184)
  * add "--no-focus-on-map option to bring update-manager up
    in the background (UX team)
  * change default text and add /apps/update-manager/first_run
    gconf key for the first run welcome message (UX team)
  * UpdateManager/ChangelogViewer.py:
    - support "LP: #nr:" linking in changelog entries (LP: #274737)

  [ Jonathan Riddell ]
  * DistUpgrade/DistUpgrade.cfg
    - remove guidance-power-manager on kubuntu-desktop upgrade

  [ Andy Whitcroft ]
  * DistUpgrade/cdromupgrade
    - move to using dists/$CODENAME to locate the installer eliminating
      any dependance on symlinks in the image. This allows usb-creator based
      images to be used unmodified. (LP: #326856)

 -- Michael Vogt <email address hidden> Mon, 09 Feb 2009 13:48:01 +0100

Changed in update-manager:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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