update-manager -c -d DOESN'T work for going to Gutsy

Bug #118862 reported by unixnewbie
14
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Feisty by Roland Dreier
Nominated for Gutsy by Justin Dugger

Bug Description

Binary package hint: update-manager

Can reproduce by installing Fresh Install of Feisty Server Edition, then installing xubuntu-desktop, then trying to upgrade to Gutsy using this command: sudo update-manager -c -d and it will fail with some kind of error which I have pasted below.

sudo update-manager -c -d
warning: could not initiate dbus
extracting '/tmp/tmp1Pv9L5/gutsy.tar.gz'
authenticate '/tmp/tmp1Pv9L5/gutsy.tar.gz' against '/tmp/tmp1Pv9L5/gutsy.tar.gz.gpg'
could not send the dbus Inhibit signal: global name 'dbus' is not defined
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/UpdateManager/UpdateManager.py", line 914, in on_button_dist_upgrade_clicked
    fetcher.run()
  File "/usr/lib/python2.5/site-packages/UpdateManager/Core/DistUpgradeFetcherCore.py", line 178, in run
    self.runDistUpgrader()
  File "/usr/lib/python2.5/site-packages/UpdateManager/DistUpgradeFetcher.py", line 53, in runDistUpgrader
    if os.getuid() != 0:
NameError: global name 'os' is not defined

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Same here, with a "normal" Feisty (without xubuntu or kubuntu).

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

As the second error suggests, file "/usr/lib/python2.5/site-packages/UpdateManager/DistUpgradeFetcher.py" doesn't import the "os" object/package/whatever it's called. (Sorry, I only learned python by ear...)

I added "import os" at the top of that file and the update started.

(I still got the dbus problem, so I also added "import dbus" at the same file. Now I don't get either error.)

I'm trying to do the update now and hoping this will work...

Revision history for this message
hanzomon4 (hanzomon4) wrote :

I have the same problem on a fresh feisty VirtualBox install. I'll start it later and post the output but it's the same as the one posted above.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Update: OK, I've run the update.

The good news: it worked (but see below). I'm happily running Gutsy right now.

The bad news: it didn't work flawlessly. During the update there were several error messages. I did run a (probably unnecessary, perhaps harmful, and certainly lengthy) "dpkg-reconfigure -a -u", and a dist-update, and I had to pick the new kernel manually on boot. (Got me a bit of a scare the first time; I didn't notice the old kernel was running, and it had no network drivers...)

The other good news: it will probably work better for others. My system is a bit special: I've updated continuously from Dapper through Gutsy, and I always mess with configs and things, so it's very likely my system was a bit hard to update.

Revision history for this message
delvalle26 (bassaf) wrote :

Same issue, used Bogdan Butnaru's fix (adding import os to /usr/lib/python2.5/site-packages/UpdateManager/DistUpgradeFetcher.py)
Upgrading as of now. Hopefully turns out nicely. My feisty was dist-upgraded from edgy on this box. I didn't tweak too much so I'm hoping for a smooth upgrade :)

Revision history for this message
erdtmann (erdtmann) wrote :

Same here on a up-to-date feisty install upgraded from edgy. No tweaks made in any config file. Seems like someone forgot to import os module

Revision history for this message
unixnewbie (darfsten) wrote :

May I please ask why not one person has responded to this which will have some impact regarding it's fix or similar??? Why is this still in unconfirmed when other users have posted that they have the same problem? How does this bug thing work as this is the first I posted to help out with the Gutsy testing. Can anyone from the "bug team" or a "developer" please comment on how this works and or why there hasn't been at least a comment stating that this is being reviewed?
Thank you.

Revision history for this message
Justin Dugger (jldugger) wrote :

After applying this patch (derived from a comment by Bogdan), it seems to work, and I successfully upgraded.

Unixnewbie, please be patient. The developers in charge have been subscribed to this bug automatically. And as you can see, this bug is being worked on by the community. https://wiki.ubuntu.com/BugSquad has more on the bug process, and if more of us followed that, this would probably get more Core developer attention.

Revision history for this message
Justin Dugger (jldugger) wrote :

I've gone ahead and confirmed this as there's both a patch and several reports of replicating this bug.

Changed in update-manager:
status: Unconfirmed → Confirmed
Revision history for this message
obobu84 (lucaborzani) wrote :

i can confirm the problem

here is the bash output:

sudo update-manager -cdp
warning: could not initiate dbus
extracting '/tmp/tmpexgDC-/gutsy.tar.gz'
authenticate '/tmp/tmpexgDC-/gutsy.tar.gz' against '/tmp/tmpexgDC-/gutsy.tar.gz.gpg'
could not send the dbus Inhibit signal: global name 'dbus' is not defined
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/UpdateManager/UpdateManager.py", line 914, in on_button_dist_upgrade_clicked
    fetcher.run()
  File "/usr/lib/python2.5/site-packages/UpdateManager/Core/DistUpgradeFetcherCore.py", line 178, in run
    self.runDistUpgrader()
  File "/usr/lib/python2.5/site-packages/UpdateManager/DistUpgradeFetcher.py", line 53, in runDistUpgrader
    if os.getuid() != 0:
NameError: global name 'os' is not defined

Revision history for this message
Roland Dreier (roland.dreier) wrote :

Same problem seen here too.

I nominated this for feisty, since fixing it for gutsy doesn't really help too much -- if feisty is broken then I can't upgrade to gutsy!

Revision history for this message
Roland Dreier (roland.dreier) wrote :

The patch here is the same one as the one in Bug #120957, which is marked as "fix committed".

Revision history for this message
cenora (cenora) wrote :

Same here, but I get an ERROR window with the following text:

Error during update:
A problem occured during the update. This is usually some sort of network problem, please check your network connection and retry.
Failed to fetch http://wine.lowvoice.nl/apt/dists/feisty/Release.gpg Could not resolve 'wine.lowvoice.nl'
Failed to fetch http://wine.lowvoice.nl/apt/dists/feisty/main/i18n/Translation-en_US.bz2 Could not resolve 'wine.lowvoice.nl'
Failed to fetch http://wine.lowvoice.nl/apt/dists/feisty/main/binary-i386/Packages.gz Could not resolve 'wine.lowvoice.nl'

When the update manager is finally closed, I have a terminal with the following:

user@laptop:~$ sudo update-manager -c -d
Password:
warning: could not initiate dbus
extracting '/tmp/tmpQzkF9j/gutsy.tar.gz'
authenticate '/tmp/tmpQzkF9j/gutsy.tar.gz' against '/tmp/tmpQzkF9j/gutsy.tar.gz.gpg'
could not send the dbus Inhibit signal: global name 'dbus' is not defined

** (gutsy:10002): WARNING **: return value of custom widget handler was not a GtkWidget
/tmp/tmpQzkF9j/DistUpgradeViewGtk.py:380: GtkWarning: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
  self._term.realize()
user@laptop:~$

Revision history for this message
Hadmut Danisch (hadmut) wrote :

I still have a problem with the update-manager. I also had the problem

   global name 'dbus' is not defined

Following the instructions given above I added

   import os
   import dbus

to /usr/lib/python2.5/site-packages/UpdateManager/DistUpgradeFetcher.py

Now I get the error message

# update-manager -d
extracting '/tmp/tmpv8iqg6/gutsy.tar.gz'
authenticate '/tmp/tmpv8iqg6/gutsy.tar.gz' against '/tmp/tmpv8iqg6/gutsy.tar.gz.gpg'
could not send the dbus Inhibit signal: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/bin/gnome-power-manager exited with status 0

regards

Revision history for this message
kirkster86 (kirkster86) wrote :

adding import dbus and import os worked great for me. I'm now upgrading to gutsy.

Revision history for this message
Julian Robbins (joolsr) wrote :

Very much the same case here. ie same issue with dbus and the os.

Adding import os to the /usr/lib/python2.5/site-packages/UpdateManager/DistUpgradeFetcher.py fixed it for me.

Please consider getting fixed fully

Revision history for this message
Michael Vogt (mvo) wrote :

What version of update-manager and update-manager-core where you using?
Please run:
$ dpkg -l update-manager update-manager-core

Revision history for this message
Rodrigo Donado (frezeeer) wrote :

Hi:

I can't upgrade I get to the same point as the other ppl. here is the result.
$ dpkg -l update-manager update-manager-core
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii update-manager 0.59.24 GNOME application that manages apt updates
ii update-manager 0.59.24 manage release upgrades

I have added the import dbus and import os, but still no luck the window of the actual upgrade appears but it only goes to the 1st step, and then it closes.

Revision history for this message
Henno (gary-henery) wrote :

Guys:

If you are getting an error like this:

Error during update:
A problem occured during the update. This is usually some sort of network problem, please check your network connection and retry.
Failed to fetch http://wine.lowvoice.nl/apt/dists/feisty/Release.gpg Could not resolve 'wine.lowvoice.nl'
Failed to fetch http://wine.lowvoice.nl/apt/dists/feisty/main/i18n/Translation-en_US.bz2 Could not resolve 'wine.lowvoice.nl'
Failed to fetch http://wine.lowvoice.nl/apt/dists/feisty/main/binary-i386/Packages.gz Could not resolve 'wine.lowvoice.nl'

It's probably due to a setting that automatix made.

To fix it:

Open a terminal window, and do:

gksudo gedit /etc/apt/sources.list

then find the line that starts with:

http://wine.lowvoice.nl

and comment it out by adding a "#".

Then run update manager again. It should now work.

Gary

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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