Import fails with "trying to import version ... again"

Bug #653832 reported by James Westby
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Distributed Development
Fix Released
High
John A Meinel

Bug Description

Traceback (most recent call last):
  File "/srv/package-import.canonical.com/new/scripts/import_package.py", line 1104, in <module>
    no_existing=options.no_existing))
  File "/srv/package-import.canonical.com/new/scripts/import_package.py", line 1034, in main
    import_package(temp_dir, importp, revid_db, bstore, possible_transports=possible_transports)
  File "/srv/package-import.canonical.com/new/scripts/import_package.py", line 632, in import_package
    use_time_from_changelog=True)
  File "/srv/package-import.canonical.com/new/scripts/plugins/builddeb/import_dsc.py", line 1354, in import_package
    "Trying to import version %s again" % str(version)
AssertionError: Trying to import version 0.6.4-0ubuntu3 again

http://package-import.ubuntu.com/status/desktopcouch.html
http://package-import.ubuntu.com/status/flash-kernel.html
http://package-import.ubuntu.com/status/man-db.html
http://package-import.ubuntu.com/status/plymouth.html

Related branches

James Westby (james-w)
description: updated
James Westby (james-w)
description: updated
Colin Watson (cjwatson)
description: updated
description: updated
Martin Pool (mbp)
Changed in udd:
assignee: nobody → canonical-bazaar (canonical-bazaar)
Revision history for this message
John A Meinel (jameinel) wrote :

This looks like a failure where we started working with Version objects, rather than version strings.

Looking at the import_dsc code it does:

def has_version(version):
  tag_name = self.tag_name(version)

Which is a cast via 'str(version)'

However, the outer code does this:

    if update_db.branch.tags.has_tag(importp.version):

in bzrlib, '.has_tag(x)' is just (return x in self.get_tag_dict())

And the Version object doesn't match the str() object in a dict.

The simple fix looks like just using
    tag_version = update_db.tag_name(importp.version)
    if update_db.branch.tags.has_tag(tag_version):
        update_db.branch.tags.delete_tag(tag_version)

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 653832] Re: Import fails with "trying to import version ... again"

On Fri, 21 Jan 2011 18:58:33 -0000, John A Meinel <email address hidden> wrote:
> The simple fix looks like just using
> tag_version = update_db.tag_name(importp.version)
> if update_db.branch.tags.has_tag(tag_version):
> update_db.branch.tags.delete_tag(tag_version)

Nice catch. This was code that I added around UDS, so it's not a
migration problem per-se, rather that it never likely worked.

Thanks,

James

Revision history for this message
John A Meinel (jameinel) wrote :

This has been rolled out on production. The tag was supposed to be deleted, and now is done so properly.

Changed in udd:
assignee: canonical-bazaar (canonical-bazaar) → John A Meinel (jameinel)
status: Triaged → 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.