[Bug 1726483] [NEW] improve backportpackage error message

Leopold Talirz leopold.talirz at gmail.com
Mon Oct 23 16:45:24 UTC 2017


Public bug reported:

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).

** Affects: ubuntu-dev-tools (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  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()
+   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 not yet released or release date in the future).
+ 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)
+   -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 (?) but rather
- let the user know that no development release was found and provide
+ 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).

-- 
You received this bug notification because you are a member of MOTU,
which is subscribed to ubuntu-dev-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1726483

Title:
  improve backportpackage error message

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1726483/+subscriptions



More information about the universe-bugs mailing list