improve backportpackage error message

Bug #1726483 reported by Leopold Talirz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Undecided
Unassigned

Bug Description

I'm running Ubuntu xenial and wanted to backport a package from zesty (my first backport). I tried:

$ backportpackage -u ppa:leopold-talirz/xenial-science-backports cp2k
Traceback (most recent call last):
  File "/usr/bin/backportpackage", line 416, in <module>
    sys.exit(main(sys.argv))
  File "/usr/bin/backportpackage", line 393, in main
    config)
  File "/usr/bin/backportpackage", line 210, in find_package
    source_release = info().devel()
  File "/usr/lib/python2.7/dist-packages/distro_info.py", line 96, in devel
    raise DistroDataOutdated()
distro_info.DistroDataOutdated: Distribution data outdated. Please check for an update for distro-info-data. See /usr/share/doc/distro-info-data/README.Debian for details.

First, /usr/share/doc/distro-info-data/README.Debian did not exist.
Then, I tried to update everything I could think of, but as far as I could tell everything was already up to date.
I then dug into /usr/lib/python2.7/dist-packages/distro_info.py and it turns out the reason it failed is that there simply was no release matching the criteria of a "development release" (namely: either no release date or release date in the future).
Indeed, backportpackage -h says

  -s SOURCE, --source=SOURCE
                        Backport from SOURCE release (default: devel release)

Simply specifying '-s zesty' solved it for me, but I spent quite a while trying to figure out what the problem was.

If my reasoning is correct, then one should not raise a DistroDataOutdated() exception in line 96 of distro_info.py but rather let the user know that no development release was found and suggest different options (updating or specifying a non-development release by hand).

description: updated
tags: added: xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers