update-manager cannot find meta-release info

Bug #127263 reported by Will Newton
66
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Updater
Fix Released
Undecided
Unassigned
update-manager (Ubuntu)
Fix Released
High
Michael Vogt
Feisty
Fix Released
Medium
Michael Vogt

Bug Description

The symptom is that if I do gksudo "update-manager -d" I get no option to upgrade and this error:

current dist not found in meta-release file

Looking at the code in:

/usr/lib/python2.5/site-packages/UpdateManager/Core/MetaRelease.py

It seems I had a zero sized METARELEASE_FILE. This was being created by the __init__ method of MetaReleaseCore:

        try:
            open(self.METARELEASE_FILE,"a")
        except IOError, e:
            path = os.path.expanduser("~/.update-manager-core/")
            if not os.path.exists(path):
                os.mkdir(path)
            self.METARELEASE_FILE = os.path.join(path,"meta-release")

Then the download() method checks the mtime of METARELEASE_FILE in order to add an If-Modified-Since header to the http request. The mtime is very recent because we just touched it in __init__. Because of this urllib throws an exception with HTTP 304 Not Modified.

The exception handler then sees the empty METARELEASE_FILE:

        except urllib2.URLError:
            if os.path.exists(self.METARELEASE_FILE):
                self.metarelease_information=open(self.METARELEASE_FILE,"r")

And sets metarelease_information to the newly opened empty file. Later on a parse is attempted on this file which results in no meta-release information matching the current distro.

Fix/workaround:

Taking the last-modified check out works, but probably the best thing to do is to check for a zero sized file at the same time as reading the mtime.

Revision history for this message
Will Newton (will-newton) wrote :

Sorry, I should add this is with update-manager 0.59.23 and a fresh feisty install.

Revision history for this message
Wousser (wousser) wrote :

Thanks for your bugreport.
This bug is a duplicate of 103911.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

This is not a duplicate of bug #103911.

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

Indeed it isn't, and I can confirm this issue.

Changed in update-manager:
status: New → Confirmed
Michael Vogt (mvo)
Changed in update-manager:
assignee: nobody → mvo
importance: Undecided → High
Revision history for this message
Michael Vogt (mvo) wrote :

Just apply straight to:

/usr/lib/python2.5/site-packages/UpdateManager/Core/MetaRelease.py

and let me know if that helps.

Thanks,
 Michael

Changed in update-manager:
status: Confirmed → Fix Committed
status: New → Fix Committed
Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

Applying the patch doesn't do anything. I even removed the /usr/lib/python2.5/site-packages/UpdateManager/Core/MetaRelease.pyc file too.

This is a fairly recent install of a fairly early version of Feisty, I forgot to get the final release on CD.

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

Sorry, running update-manager as root works. Sorry about that.

Changed in update-manager:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Jean Elsner (silenter) wrote :

I can confirm this patch too, thank you :)

Revision history for this message
Eugene (varnav) wrote :

Thank you, the patch does help.

Revision history for this message
Eugene (varnav) wrote :

Now, after the patch, I was able to successfully upgrade from 7.04 to 7.10

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

update-manager (1:0.69) gutsy; urgency=low

  [ Michael Vogt ]
  * UpdateManager/Core/MetaRelease.py:
    - remove zero size meta-release files (LP: #127263)
  * utils/demoted.cfg:
    - updated to current gutsy
  * DistUpgrade/DistUpgrade.cfg:
    - added "esound", "esound-common" to forced obsoleted
      packages (replaced by pulseaudio)

  [ Jonathan Riddell ]
  * Change version text from 7.04 to 7.10 in KDE frontend

 -- Michael Vogt <email address hidden> Wed, 08 Aug 2007 12:41:02 +0200

Changed in update-manager:
status: Fix Committed → Fix Released
Revision history for this message
vMeson (rwmacleod) wrote :

I hope this will be pushed int Feisty soon as suggested by Eugene.
I'd apply the patch but I'd like prefer to test the mainstream upgrade path.
Thanks.
// Randy

Revision history for this message
Kyle Mathews (mathews-kyle) wrote :

I had the same problem -- and the patch seemed to solve the issue... so far anyways, I'm upgrading as I type

Kyle

Revision history for this message
Brett Alton (brett-alton-deactivatedaccount) wrote :

As of Feisty 2007-07-27, this still occurs:

$ sudo update-manager -c -d
Password:
warning: could not initiate dbus
current dist not found in meta-release file

Has the patch been uploaded to the repositories? I'm not sure how to merg a .diff file.

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote : Re: [Bug 127263] Re: update-manager cannot find meta-release info

On Mon, 2007-08-27 at 18:22 +0000, brettalton wrote:

> Has the patch been uploaded to the repositories? I'm not sure how to
> merg a .diff file.
>
sudo
patch /usr/lib/python2.5/site-packages/UpdateManager/Core/MetaRelease.py
u-m.diff should do it (I hope).
--
Bruce Cowan <email address hidden>

Revision history for this message
ysth (sthoenna) wrote :

That's really not sufficient. If If-Modified-Since is going to be used at all, the three different
http://changelogs.ubuntu.com/meta-release* files need to be cached as three separate files.
(Though I'm not sure how ~/.update-manager/meta-release plays into it.)

A workaround:

sudo touch -t 197001010000 /var/lib/update-manager/meta-release

before running update-manager -d.

Revision history for this message
ysth (sthoenna) wrote :

For an example of when the patch isn't good enough:

# make sure we don't already know about gutsy or have the problematic empty file
sudo rm /var/lib/update-manager/meta-release
sudo update-manager -c
# Close, then:
sudo update-manager -d

/var/lib/update-manager/meta-release created by update-manager -c won't have a gutsy entry, but update-manager -d won't fetch a new copy, since the timestamp on the file is recent, so the upgrade button won't appear.

Revision history for this message
Daniel Moyne (dmoyne) wrote :

Thanks as
$ sudo touch -t 197001010000 /var/lib/update-manager/meta-release
$ update-manager -d
is a fix.
Daniel

Revision history for this message
Martin Pool (mbp) wrote :

The recipe give by Daniel Moyne of just touching the file to the epoch does not work for me, neither does the one from ysth.

mvo's patch does fix it. I would suggest this should be pushed into feisty pretty soon.

Revision history for this message
Emiliano (emiliano-perulli) wrote :

I can confirm that the patch works in my case.
Please include it into feisty.

Revision history for this message
ysth (sthoenna) wrote :

On Tue, August 28, 2007 3:17 am, Martin Pool wrote:
> The recipe give by Daniel Moyne of just touching the file to the epoch
> does not work for me, neither does the one from ysth.

Touching the file may not work if you don't sudo update-manager.
I'd like to know what you tried.

> mvo's patch does fix it. I would suggest this should be pushed into
> feisty pretty soon.

Yes, it should resolve most problems - I think only people who used -c or -p
before trying -d might still have a problem - and then they should be able to
just rm the file to get it working.

Revision history for this message
Anders (andersja+launchpad-net) wrote :

I am experiencing this bug too, on a fully updated feisty:

After confirming that my system is up to date
$ sudo apt-get update
$ sudo apt-get upgrade

I run
$ gksudo "update-manager -c -d"
GTK Accessibility Module initialized
warning: could not initiate dbus
current dist not found in meta-release file
could not send the dbus Inhibit signal: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
GTK Accessibility Module initialized
GTK Accessibility Module initialized
andersja@plasken:~$

The meta-release bug appears present still? (the referenced 'fix released' has not yet been published?)

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

It's true, making committed instead.

Changed in update-manager:
status: Fix Released → Fix Committed
Revision history for this message
Anders (andersja+launchpad-net) wrote :

I tried

$ sudo touch -t 197001010000 /var/lib/update-manager/meta-release
$ update-manager -d

to no avail.

Revision history for this message
ysth (sthoenna) wrote :

On Thu, September 6, 2007 4:33 pm, Anders wrote:
> I tried
> $ sudo touch -t 197001010000 /var/lib/update-manager/meta-release
> $ update-manager -d
> to no avail.

Try using sudo for both commands. Or try:

$ rm ~/.update-manager-core/meta-release
$ update-manager -d

Revision history for this message
schnollk (schnollk) wrote :

I'd like to report what happend here[1]:

1. procedure as suggested <a href="https://wiki.ubuntu.com/GutsyGibbon/Tribe5#head-81cc88734ebf046f2eea75748ddc33707ae6cc4d">in ubuntu wiki</a>
2. needed the touch cli
3. "new release" showed up for one but coulnd't carry out the upgrade right away
4. next time I ran update-manager -d option was gone
5. variouse touches and update-manager -d's didn't help (sudoed or not)
6. finally a came around to rm ~/.update-manager-core/meta-release
7. now the option showes up every time update-manager is called without sudo. If I do sudo updat... it wouldn't show up.

Unfortunatelly I didn't capture the meta-release file... Hope this helps never the less. Let me know soon if you need more since I'd like to update in the next couple of days.

Cheers.

[1]
$ uname -a
Linux ubuntu-desktop-i386 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty

$ apt-cache policy update-manager
update-manager:
  Installed: 1:0.59.23
  Candidate: 1:0.59.23
  Version table:
 *** 1:0.59.23 0
        500 http://de.archive.ubuntu.com feisty-updates/main Packages
        500 http://archive.ubuntu.com feisty-updates/main Packages
        500 http://archive.ubuntu.com feisty-proposed/main Packages
        100 /var/lib/dpkg/status
     1:0.59.20 0
        500 http://de.archive.ubuntu.com feisty/main Packages

Revision history for this message
Will Newton (will-newton) wrote :

Should we be checking for corrupt meta release info as well as 0
length files here?

Is it that bad to download the meta release file every time when -d is passed?

On 9/7/07, schnollk <email address hidden> wrote:
> I'd like to report what happend here[1]:
>
> 1. procedure as suggested <a href="https://wiki.ubuntu.com/GutsyGibbon/Tribe5#head-81cc88734ebf046f2eea75748ddc33707ae6cc4d">in ubuntu wiki</a>
> 2. needed the touch cli
> 3. "new release" showed up for one but coulnd't carry out the upgrade right away
> 4. next time I ran update-manager -d option was gone
> 5. variouse touches and update-manager -d's didn't help (sudoed or not)
> 6. finally a came around to rm ~/.update-manager-core/meta-release
> 7. now the option showes up every time update-manager is called without sudo. If I do sudo updat... it wouldn't show up.
>
> Unfortunatelly I didn't capture the meta-release file... Hope this helps
> never the less. Let me know soon if you need more since I'd like to
> update in the next couple of days.
>
> Cheers.
>
> [1]
> $ uname -a
> Linux ubuntu-desktop-i386 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux
>
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 7.04
> Release: 7.04
> Codename: feisty
>
> $ apt-cache policy update-manager
> update-manager:
> Installed: 1:0.59.23
> Candidate: 1:0.59.23
> Version table:
> *** 1:0.59.23 0
> 500 http://de.archive.ubuntu.com feisty-updates/main Packages
> 500 http://archive.ubuntu.com feisty-updates/main Packages
> 500 http://archive.ubuntu.com feisty-proposed/main Packages
> 100 /var/lib/dpkg/status
> 1:0.59.20 0
> 500 http://de.archive.ubuntu.com feisty/main Packages
>
> --
> update-manager cannot find meta-release info
> https://bugs.launchpad.net/bugs/127263
> You received this bug notification because you are a direct subscriber
> of the bug.
>

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

This diff should fix both the sudo and the non-sudo case:

In the sudo case the empty file creates if-modified-since (I-M-S) hits that are newer than the version on the server so no metarelease file is downloaded. Empty files now get simply removed.

In the non-sudo case both the "meta-release" and the "meta-release-development" file are mapped onto the same local filename. This confuses the i-m-s mechanism. The metarelease filename now will be build based on the actual download filename.

Cheers,
 Michael

Changed in update-manager:
assignee: nobody → mvo
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

I put packages online at:

deb http://people.ubuntu.com/~mvo/update-manager /

Please give them a go.

Thanks,
 Michael

Revision history for this message
ysth (sthoenna) wrote :

On Mon, September 10, 2007 4:07 am, Michael Vogt wrote:
> I put packages online at:
>
> deb http://people.ubuntu.com/~mvo/update-manager /
>
> Please give them a go.
>
> Thanks,

Thank *you*. Seems to work just great, except that running
sudo update-manager -d, I needed to hit "Check" before the
new distribution was shown.

I didn't actually try the upgrade, since I need that box to
stay on Feisty for the moment, but I wonder if that "import os"
line you removed from DistUpgradeFetcher.py is actually
unneeded...I remember running into a problem with it before.

Revision history for this message
teedog (teedog) wrote :

Wanted to note that neither "touching" nor removing /var/lib/update-manager/meta-release worked for me. The following solution did work:
http://www.go2linux.org/upgrading-to-gutsy

Sorry I did not try update-manager_0.59.24 posted above.

Revision history for this message
Michael Heimann (michael-heimann) wrote :

Just had the "current dist not found in meta-release" error. But at least for me it was correct since the /var/lib/update-manager/meta-release file was empty (!!!). Quite strange since I just did an upgrade from edgy (possible to update edgy->gutsy, would have saved 800MB download...)

I then followed http://www.go2linux.org/upgrading-to-gutsy and corrected the cutted-off http:// lines from there (at least the gutsy part) and the upgrade is now running :)

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

Fixed in gutsy with the 0.72 upload

Changed in update-manager:
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Looks fine to me.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into feisty-proposed, please go ahead and test.

Changed in update-manager:
status: In Progress → Fix Committed
description: updated
Revision history for this message
Michael Hofmann (mh21) wrote :

Works for me, no empty /var/lib/update-manager/meta-release anymore.

Revision history for this message
Michael Hofmann (mh21) wrote :

I still get:

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
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 91, in <module>
    app.main(options)
  File "/usr/lib/python2.5/site-packages/UpdateManager/UpdateManager.py", line 1017, in main
    gtk.main()

which is fixed by the attached patch.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, Michael Hofmann, for the testing. Patch approved for feisty-proposed; mvo, can you please upload a new package to -proposed?

Changed in update-manager:
status: Fix Committed → In Progress
Revision history for this message
Brett Alton (brett-alton-deactivatedaccount) wrote :

I think Pitt is saying that the fix has not yet been approved, but I'll add this anyway.

As of upgrading Feisty on 2007-09-15 (on 2 computers), I still had to use:

sudo touch -t 197001010000 /var/lib/update-manager/meta-release

To run:

sudo upgrade-manager -d

and get it to work.

Revision history for this message
ThinkpadUBUNTU (wjkierstead) wrote :

I am afraid none of the above allowed the upgrade to run on my system -

here is the output

wes@ubuntu:~$ sudo touch -t 197001010000 /var/lib/update-manager/meta-release
wes@ubuntu:~$ sudo upgrade-manager -d
sudo: upgrade-manager: command not found
wes@ubuntu:~$ sudo update-manager -d
warning: could not initiate dbus
extracting '/tmp/tmphTlaZf/gutsy.tar.gz'
authenticate '/tmp/tmphTlaZf/gutsy.tar.gz' against '/tmp/tmphTlaZf/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
sem (semitones) wrote :

I can confirm this output (notably failing to initialize dbus, and the
NameErrors

--phix

On 9/20/07, ThinkpadUBUNTU <email address hidden> wrote:
>
> I am afraid none of the above allowed the upgrade to run on my system -
>
> here is the output
>
> wes@ubuntu:~$ sudo touch -t 197001010000
> /var/lib/update-manager/meta-release
> wes@ubuntu:~$ sudo upgrade-manager -d
> sudo: upgrade-manager: command not found
> wes@ubuntu:~$ sudo update-manager -d
> warning: could not initiate dbus
> extracting '/tmp/tmphTlaZf/gutsy.tar.gz'
> authenticate '/tmp/tmphTlaZf/gutsy.tar.gz' against
> '/tmp/tmphTlaZf/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
>
> --
> update-manager cannot find meta-release info
> https://bugs.launchpad.net/bugs/127263
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
William F Pearson (wfpearson) wrote :

I followed the fix here and it works http://www.go2linux.org/upgrading-to-gutsy

Populating the file /var/lib/update-manager/meta-release with the attatched file fixes the issue.

Original source:
http://www.go2linux.org/pics/other_files/meta-release.txt
Note: this is not my fix, thanks to Patrick and Projekt Enterprises, whoever they are.

Revision history for this message
Martin Pitt (pitti) wrote :

This needs to be verified today, so that people upgrading to gutsy tomorrow are good.

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

The version 0.59.25 in feisty-proposed should fix this issue as well as the issue with the missing imports.

Here are instruction to verify the problem:
0. install update-manager 0.59.23 from feisty-updates
1. make sure your time is correct (ntpdate pool.ntp.org)
2. run update-manager
3. close it again
4. check that ~/.update-manager-core/meta-release was created
5. run "update-manager -d"
6. no new version will come up (no upgrade to gutsy button)

To verify the fix install new version 0.59.25 for update-manager and update-manager-core
from feisty-proposed and repeat steps 1-5. In Step 6 there should be a button that lets you
upgrade to gutsy. Also verify that a new file ~/.update-manager-core/meta-release-development was created.

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

Using update-manager and update-manager-core 0.59.23 I did not see the distribution upgrade button. After updating to 0.59.25 in feisty-proposed I saw that the distribution upgrade button was available.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to -updates.

Changed in update-manager:
status: In Progress → Fix Released
Revision history for this message
Trance (emilien-girault) wrote :

I have followed all the indications but I still experiment the same problem ; I want to update to Gutsy and update-manager doesn't show me the update button.
I deleted my ~/.update-manager-core/meta-release, my ~/.update-manager/meta-release but it didn't fix anything. And I have no /var/lib/update-manager/meta-release. Moreover, I'm behind a proxy.
I've downloaded and installed the versions of update-manager and update-manager-core on http://people.ubuntu.com/~mvo/update-manager/ but it didn't change anything. I've also tried to follow http://www.go2linux.org/upgrading-to-gutsy (I don't have the message "current dist not found in meta-release") but it still don't help ; this update button remains invisible !

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.