cdrom upgrade requires absolute path

Bug #277873 reported by Philip Peitsch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Low
Michael Vogt

Bug Description

If you attempt to execute the script straight off the alternate cdrom, it fails with the error message:
[quote]
tar: ./dists/stable/main/dist-upgrader/binary-all//intrepid.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
Could not find the upgrade application in the archive, exiting
[/quote]

This can easily be fixed by copying the file onto the hard-drive, and removing the final slash from the "dists/stable/main/dist-upgrade/binary-all/" line (so it reads "dists/stable/main/dist-upgrade/binary-all"). Then set the cddirname variable (the following line) to point to the location of the cdrom drive

Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. How exactly did you go about executing the script? It should be run using the absolute path so something like 'gksu "sh /cdrom/cdromupgrade"'.
Thanks in advance.

Revision history for this message
Philip Peitsch (philip-peitsch) wrote : Re: [Bug 277873] Re: Ubuntu Intrepid beta alternate CD cdromupgrade script fails due to extra '/'

Hi Brian,

I navigated to the cdrom directory and executed "sudo ./cdromupgrade"

On Sat, Oct 4, 2008 at 2:08 PM, Brian Murray <email address hidden> wrote:

> Thank you for taking the time to report this bug and helping to make Ubuntu
> better. How exactly did you go about executing the script? It should be
> run using the absolute path so something like 'gksu "sh
> /cdrom/cdromupgrade"'.
> Thanks in advance.
>
> ** Changed in: update-manager (Ubuntu)
> Sourcepackagename: None => update-manager
> Status: New => Incomplete
>
> --
> Ubuntu Intrepid beta alternate CD cdromupgrade script fails due to extra
> '/'
> https://bugs.launchpad.net/bugs/277873
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Philip Peitsch
Mob: 0439 810 260

Revision history for this message
Philip Peitsch (philip-peitsch) wrote : Re: Ubuntu Intrepid beta alternate CD cdromupgrade script fails due to extra '/'

Ahh... Okay I see the issue now. So the issue is coming about as the fullpath is expected after changing directories to a temporary location. I suppose these kinds of scripts are usually done by people who know what they are doing, but perhaps it might be useful to either

a) detect that a relative path is being used and refuse to continue (clearly this won't work!)
or even better would be b) convert the relative path to an absolute path... though this does make the script more complex. Even just a blanket warning (e.g. "this must be an absolute path") would be very informative and save this kind of error in future (hopefully).

Thanks for the information.

Changed in update-manager:
importance: Undecided → Low
milestone: none → later
status: Incomplete → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :

This is fixed now in the jaunty version of the upgrader.

Changed in update-manager (Ubuntu):
assignee: nobody → mvo
status: Triaged → Fix Released
Revision history for this message
BryanFRitt (bryanfritt) wrote :

I ran into this same problem when I tried to upgrade 11.10 to 12.04, same changes fixed the problem
I ended up doing something like:
commenting out the
`UPGRADER_DIR=dists/$CODENAME/main/dist-upgrader/binary-all` line. (put a # infront of it)
Then change the fullpath line to `fullpath=$ISOPATHGOESHERE/dists/$CODENAME/main/dist-upgrader/binary-all` replacing `$ISOPATHGOESHERE` with the full path for the mounted ISO path, cd path, or whatever it may be
(optional) comment out the `exit 1` lines... it cased the terminal to exit without leaving the errors visable
and put word `sudo` infront of the `$TMPDIR/$CODENAME --cdrom "$cddirname" $@` line
(note: don't copy the ` ` characters)

Revision history for this message
BryanFRitt (bryanfritt) wrote :

Guess I could have spoke too soon... (got a little further but...)
"
Failed to add the CD

There was a error adding the CD, the upgrade will abort. Please report this as a bug if this is a valid Ubuntu CD.

The error message was:
'Unable to locate any package files, perhaps this is not a Ubuntu Disc or the wrong architecture?'
"
tried again a slightly different way...
"
Failed to add the CD

There was a error adding the CD, the upgrade will abort. Please report this as a bug if this is a valid Ubuntu CD.

The error message was:
'E:Failed to mount the cdrom.'
"

Revision history for this message
BryanFRitt (bryanfritt) wrote :

replacing the `$cddirname` in the last line with the full path to the cdrom/mounted iso directory/etc... seamed to have fixed those problems...

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.