update manager partial upgrade fails

Bug #335416 reported by Ashish
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Undecided
Michael Vogt

Bug Description

Binary package hint: update-manager

From past 1 week I am trying to update my system. However every time it reports that a partial upgrade is needed, but when I run a partial upgrade it just fails. It has accumulated loads of packages list to be updated which are not available to select.

Here is the error which I get in terminal window, while trying to run with "sudo /usr/bin/update-manager" command.
---------------------------------------------
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 89, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeController.py", line 1468, in doPartialUpgrade
    if not self.doPostInitialUpdate():

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeController.py", line 608, in doPostInitialUpdate
    self.quirks.run("PostInitialUpdate")

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 66, in run
    func()

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 135, in intrepidPostInitialUpdate
    not self._supportInModaliases("fglrx")):

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 89, in _supportInModaliases
    for filename in os.listdir(modaliasesdir):

OSError: [Errno 2] No such file or directory: './modaliases'

ERROR:root:failed to import apport python module, can't report bug: No module named python_hook
-----------------------------------------------------------------------------------------------------------------------------------------------------------

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

Thanks for your bugreport.

This is fixed in jaunty, I assume you run intrepid? Could you please show me what apt-get dist-upgrade prints on your system (when run from a terminal)?

Changed in update-manager:
assignee: nobody → mvo
status: New → Incomplete
Revision history for this message
Ashish (ashishyadav26) wrote : Re: [Bug 335416] Re: update manager partial upgrade fails

I ran "apt-get dist-upgrade" yesterday and it has shown the same list
of updates available. However when I've chosen to go through, it has
downloaded all files and have upgraded the system. Unfortunately I
hadn't saved any screen-shots.

Regards,

Ashish

"Where your heart is, there you will find your treasure"
- The Alchemist

On Thu, Mar 5, 2009 at 3:09 PM, Michael Vogt <email address hidden> wrote:
> Thanks for your bugreport.
>
> This is fixed in jaunty, I assume you run intrepid? Could you please
> show me what apt-get dist-upgrade prints on your system (when run from a
> terminal)?
>
> ** Changed in: update-manager (Ubuntu)
>     Assignee: (unassigned) => Michael Vogt (mvo)
>       Status: New => Incomplete
>
> --
> update manager partial upgrade fails
> https://bugs.launchpad.net/bugs/335416
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “update-manager” source package in Ubuntu: Incomplete
>
> Bug description:
> Binary package hint: update-manager
>
> >From past 1 week I am trying to update my system. However every time it reports that a partial upgrade is needed, but when I run a partial upgrade it just fails. It has accumulated loads of packages list to be updated which are not available to select.
>
> Here is the error which I get in terminal window, while trying to run with "sudo /usr/bin/update-manager" command.
> ---------------------------------------------
> ERROR:root:not handled expection:
> Traceback (most recent call last):
>
>  File "/usr/bin/update-manager", line 89, in <module>
>    controler.doPartialUpgrade()
>
>  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeController.py", line 1468, in doPartialUpgrade
>    if not self.doPostInitialUpdate():
>
>  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeController.py", line 608, in doPostInitialUpdate
>    self.quirks.run("PostInitialUpdate")
>
>  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 66, in run
>    func()
>
>  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 135, in intrepidPostInitialUpdate
>    not self._supportInModaliases("fglrx")):
>
>  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 89, in _supportInModaliases
>    for filename in os.listdir(modaliasesdir):
>
> OSError: [Errno 2] No such file or directory: './modaliases'
>
> ERROR:root:failed to import apport python module, can't report bug: No module named python_hook
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>

Revision history for this message
thomasjohansen (tvj) wrote :

I have same problem, with upgrading 8.10 to 9.04.

 sudo update-manager --dist-upgrade
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 89, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeController.py", line 1468, in doPartialUpgrade
    if not self.doPostInitialUpdate():

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeController.py", line 608, in doPostInitialUpdate
    self.quirks.run("PostInitialUpdate")

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 66, in run
    func()

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 135, in intrepidPostInitialUpdate
    not self._supportInModaliases("fglrx")):

  File "/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py", line 89, in _supportInModaliases
    for filename in os.listdir(modaliasesdir):

OSError: [Errno 2] No such file or directory: './modaliases'

ERROR:root:failed to import apport python module, can't report bug: No module named python_hook

Revision history for this message
thomasjohansen (tvj) wrote :

 sudo apt-get dist-upgrade
Indlæser pakkelisterne... Færdig
Opbygger afhængighedstræ
Læser tilstandsoplysninger... Færdig
Beregner opgraderingen... Færdig
0 opgraderes, 0 nyinstalleres, 0 afinstalleres og 0 opgraderes ikke.

Revision history for this message
thomasjohansen (tvj) wrote :

These two

update-manager assignee: nobody → mvo
update-manager status: New → Incomplete

gives no results.

But, before i tried to upgrade, I had a few "down graded" request in the update-manager, I upgraded them manually in synaptic:

nvidia-common (though I have ATI)
filezilla
gwenview

and, I noticed that in Ashish's screenshot, he had alot of kde files, needed to be upgraded. the nI remember that i updated alot of those today. Its installed because I wanted the new amarok, and kdenlive.

hope that you can use some of this information, else reply for more.

Revision history for this message
thomasjohansen (tvj) wrote :

I tried upgrading to 9.04 again, with "apt-get dist-upgrade" but failed, but then i tried "update-manager -d" and this time it recognized that there was a upgrade, yesterday i couldnt.

But the upgrade to 9.04 worked, but had a few errors which might could be the reason why it didnt work with "apt-get dist-upgrade".

Pyhtonwx28 failed (I removed it after upgrade)
Phatch (I removed it after upgrade)
Openoffice 3.0 (had to be reinstalled)
Amarok 3 (had to be reinstalled)

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

@thomas:
I can not reproduce the crash when running "sudo update-manager --dist-uprade". What version of update-manager are you using (or were you using when issuing this command). Could you alsp please attach the logs in /var/log/dist-upgrade/* from the upgrade so that we can diagnose the problems you encountered?

Revision history for this message
thomasjohansen (tvj) wrote :

here are the logs, there are two sets of logs. Then you can analyse it all.

Revision history for this message
Jacob Boström (jakethecak3) wrote :
Download full text (5.2 KiB)

jake@quad:~$ update-manager --version
update-manager: version 0.111.4
jake@quad:~$ pwd
/home/jake
jake@quad:~$ sudo update-manager --dist-upgrade
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 100, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 1595, in doPartialUpgrade
    if not self.doDistUpgrade():

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 972, in doDistUpgrade
    self.quirks.run("StartUpgrade")

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeQuirks.py", line 77, in run
    for plugin in self.plugin_manager.get_plugins(condition):

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 167, in get_plugins
    filenames = self.get_plugin_files()

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 120, in get_plugin_files
    basenames = [x for x in os.listdir(dirname)

OSError: [Errno 2] Filen eller katalogen finns inte: './plugins'

ERROR:root:failed to import apport python module, can't report bug: No module named python_hook
none
jake@quad:~$

I get this too, on 9.04 beta, installed two weeks ago.
To correct this issue, just create the 'plugins' directory in /usr/lib/python2.6/dist-packages/computerjanitor/.

jake@quad$ sudo mkdir /usr/lib/python2.6/dist-packages/computerjanitor/plugins/

After that fix, dist upgrade completes successfully. :)

jake@quad:/usr/lib/python2.6/dist-packages/computerjanitor$ sudo update-manager --dist-upgrade
none
Förkonfigurerar paket ...
none
Väljer tidigare ej valt paket libpt2.6.1.
(Läser databasen ... 114506 filer och kataloger installerade.)
Packar upp libpt2.6.1 (från .../libpt2.6.1_2.6.1-0ubuntu2_amd64.deb) ...
Förbereder att ersätta ekiga 3.0.1-1ubuntu2 (med .../ekiga_3.2.0-0ubuntu1_amd64.deb) ...
Packar upp ersättande ekiga ...
Hanterar utlösare för man-db ...
(Läser databasen ...
(Läser databasen ... 114553 filer och kataloger installerade.)
Tar bort libopal3.4.2 ...
Hanterar utlösare för libc6 ...
ldconfig deferred processing now taking place
Väljer tidigare ej valt paket libopal3.6.1.
(Läser databasen ...
(Läser databasen ... 114536 filer och kataloger installerade.)
Packar upp libopal3.6.1 (från .../libopal3.6.1_3.6.1~dfsg-0ubuntu1_amd64.deb) ...
(Läser databasen ...
(Läser databasen ... 114554 filer och kataloger installerade.)
Tar bort libpt2.4.2-plugins-alsa ...
Väljer tidigare ej valt paket libpt2.6.1-plugins-alsa.
(Läser databasen ...
(Läser databasen ... 114552 filer och kataloger installerade.)
Packar upp libpt2.6.1-plugins-alsa (från .../libpt2.6.1-plugins-alsa_2.6.1-0ubuntu2_amd64.deb) ...
(Läser databasen ...
(Läser databasen ... 114556 filer och kataloger installerade.)
Tar bort libpt2.4.2-plugins-v4l2 ...
Väljer tidigare ej valt paket libpt2.6.1-plugins-v4l2.
(Läser databasen ...
deb) ...
Packar upp libpt2.6.1-plugins-v4l2 (från .../libpt2.6.1-plugins-v4l2_2.6.1-0ubuntu2_amd64.deb) ...
Väljer tidigare ej valt paket libraptor1.
Packar upp libraptor1 (från .../libraptor1_1.4.18-2_amd64.deb) ...
Väljer tidigare ej valt paket liblrdf...

Read more...

Revision history for this message
Jacob Boström (jakethecak3) wrote :

jake@quad$ grep modaliasesdir /usr/lib/python2.5/site-packages/DistUpgrade/*
/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py: def _supportInModaliases(self, xorgdrivername, modaliasesdir="./modaliases", lspci=None):
/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py: This helper will check with the modaliasesdir if the given
/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py: for filename in os.listdir(modaliasesdir):
/usr/lib/python2.5/site-packages/DistUpgrade/DistUpgradeQuirks.py: for line in open(os.path.join(modaliasesdir,filename)):
jake@quad$

I'm guessing it's the same issue that cause modaliases error too.
Try creating this folder: /usr/lib/python2.5/site-packages/DistUpgrade/modaliases/

sudo mkdir /usr/lib/python2.5/site-packages/DistUpgrade/modaliases/

and execute update-mananger again.

Changed in update-manager (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Chorca (chorca) wrote :

This is occurring for me too. This is from a jaunty-based install as well, not an upgrade from intrepid.

Here's the output from update-manager --dist-upgrade:

chris@latitude:~$ sudo /usr/bin/update-manager --dist-upgrade
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 100, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 1588, in doPartialUpgrade
    if not self.doDistUpgrade():

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 965, in doDistUpgrade
    self.enableApport()

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 959, in enableApport
    shutil.copy("etc-default-apport","/etc/default/apport")

  File "/usr/lib/python2.6/shutil.py", line 88, in copy
    copyfile(src, dst)

  File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
    fsrc = open(src, 'rb')

IOError: [Errno 2] No such file or directory: 'etc-default-apport'

ERROR:root:failed to import apport python module, can't report bug: No module named python_hook
none

Looks like it's happening on two computers I have.

Revision history for this message
Jacob Boström (jakethecak3) wrote :

This feels like a reoccurring theme; not all files and directories are checked if they exist in update-managers dist-upgrade code.

DistUpgradeController.py
------
    947 def enableApport(self, fname="/etc/default/apport"):
    948 " enable apoprt "
    949 # for jaunty and later we could use this instead:
    950 # env = copy.copy(os.environ)
    951 # env["force_start"] = "1"
    952 # subprocess.call(["/etc/init.d/apport","start"], env=env)
    953 # but hardy and intrepid do not have the force_start yet
    954 if not os.path.exists(fname):
    955 return
    956 # copy the jaunty version of the conf file in place
    957 # (this avoids a conffile prompt later)
    958 logging.debug("enabling apport")
    959 shutil.copy("etc-default-apport","/etc/default/apport")
    960 subprocess.call(["/etc/init.d/apport","start"])

etc-default-apport file does not exist.

To temporarily fix your issue, execute this;

echo "enabled=1" >> /etc/default/apport
echo "maxsize=209715200" >> /etc/default/apport

and re-execute 'update-manager --dist-upgrade'.

Revision history for this message
Barry Morrison (basketcase) wrote :

Upgraded from 8.10 to 9.04 Alpha. Trying to go to Gold.

sudo update-manager -d
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 100, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 1595, in doPartialUpgrade
    if not self.doDistUpgrade():

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 972, in doDistUpgrade
    self.quirks.run("StartUpgrade")

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeQuirks.py", line 77, in run
    for plugin in self.plugin_manager.get_plugins(condition):

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 167, in get_plugins
    filenames = self.get_plugin_files()

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 120, in get_plugin_files
    basenames = [x for x in os.listdir(dirname)

OSError: [Errno 2] No such file or directory: './plugins'

ERROR:root:failed to import apport python module, can't report bug: No module named python_hook
none

Revision history for this message
Barry Morrison (basketcase) wrote :

Well my fix was easy.

I just sudo mkdir ./plugins and was able to successfully upgrade. Though I don't know why it broke in the first place.

Revision history for this message
Ivan Zorin (iaz) wrote :

Confirm.

I use jaunty since alpha, and between beta and rc I've clashed with this bug.

> update-manager --version
update-manager: version 0.111.8
> sudo update-manager -d --dist-upgrade
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 100, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 1595, in doPartialUpgrade
    if not self.doDistUpgrade():

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 972, in doDistUpgrade
    self.quirks.run("StartUpgrade")

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeQuirks.py", line 77, in run
    for plugin in self.plugin_manager.get_plugins(condition):

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 167, in get_plugins
    filenames = self.get_plugin_files()

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 120, in get_plugin_files
    basenames = [x for x in os.listdir(dirname)

OSError: [Errno 2] No such file or directory: './plugins'

ERROR:root:failed to import apport python module, can't report bug: No module named python_hook

after (in home directory)
> sudo mkdir ./plugins
update works well, but, I think, it's a very strange and not obvious workaround to solve this issue.

BTW, in my case creating "plugins" dirs in /usr/lib/python2.6/dist-packages/DistUpgrade/ and in /usr/lib/python2.6/dist-packages/computerjanitor/ were not enougth to make it works.

Revision history for this message
Michael Gerhäuser (michael-gerhaeuser) wrote :

For me it worked creating ~/plugins as user, not as root. But i had to do the normal update before starting the partial. Error messages just like those above.

Revision history for this message
Gencay (gencay) wrote :

Same thing happened to me but I was able to get over it.
Here are the details:

gencay@gencay:~$ update-manager
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 100, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 1595, in doPartialUpgrade
    if not self.doDistUpgrade():

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 972, in doDistUpgrade
    self.quirks.run("StartUpgrade")

  File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeQuirks.py", line 77, in run
    for plugin in self.plugin_manager.get_plugins(condition):

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 167, in get_plugins
    filenames = self.get_plugin_files()

  File "/usr/lib/python2.6/dist-packages/computerjanitor/plugin.py", line 120, in get_plugin_files
    basenames = [x for x in os.listdir(dirname)

OSError: [Errno 2] No such file or directory: './plugins'

ERROR:root:failed to import apport python module, can't report bug: No module named python_hook none
gencay@gencay:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  libdb4.5-java
The following NEW packages will be installed:
  libdb4.6-java libdb4.6-java-gcj
The following packages will be upgraded:
  liblucene2-java
1 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B/3175kB of archives.
After this operation, 3097kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 157059 files and directories currently installed.)
Preparing to replace liblucene2-java 2.3.2+ds1-1ubuntu1 (using .../liblucene2-java_2.4.0+ds1-5ubuntu1_all.deb) ...
Unpacking replacement liblucene2-java ...
Processing triggers for man-db ...
(Reading database ... 157060 files and directories currently installed.)
Removing libdb4.5-java ...
Selecting previously deselected package libdb4.6-java.
(Reading database ... 157054 files and directories currently installed.)
Unpacking libdb4.6-java (from .../libdb4.6-java_4.6.21-12_i386.deb) ...
Selecting previously deselected package libdb4.6-java-gcj.
Unpacking libdb4.6-java-gcj (from .../libdb4.6-java-gcj_4.6.21-12_i386.deb) ...
Setting up libdb4.6-java (4.6.21-12) ...
Setting up liblucene2-java (2.4.0+ds1-5ubuntu1) ...
Setting up libdb4.6-java-gcj (4.6.21-12) ...
gencay@gencay:~$

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

Please try the version in jaunty-proposed, this fixes the problem.

Changed in update-manager (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
D. Ross Brown (drphysic2033) wrote :

I am running 9.10 64 bit. I just installed Vuescan, having to modify the USB rule in file "/lib/udev/rules.d/50-udev-default.rules"
to allow the detection by Vuescan of a Scan Dual IV film scanner. Since that mod, Update Manager indicates the a partial update is possible, but cannot complete, indicating that Update Manager is selected for removal, and then states that situation is probably temporary, but has remained for several reboots and days.

Michael Vogt (mvo)
Changed in update-manager (Ubuntu):
status: Fix Committed → 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.