** Description changed:

  Reproduce:
  
  1. Upgrade base-files to saucy, keep python-apt-common old.
  2. Try to add some repository.
  
  Result:
  
  root# add-apt-repository ppa:webupd8team/atom
  Traceback (most recent call last):
-   File "/usr/bin/add-apt-repository", line 91, in <module>
-     sp = SoftwareProperties(options=options)
-   File 
"/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 
109, in __init__
-     self.reload_sourceslist()
-   File 
"/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 
599, in reload_sourceslist
-     self.distro.get_sources(self.sourceslist)
-   File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in 
get_sources
-     (self.id, self.codename))
+   File "/usr/bin/add-apt-repository", line 91, in <module>
+     sp = SoftwareProperties(options=options)
+   File 
"/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 
109, in __init__
+     self.reload_sourceslist()
+   File 
"/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 
599, in reload_sourceslist
+     self.distro.get_sources(self.sourceslist)
+   File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in 
get_sources
+     (self.id, self.codename))
  aptsources.distro.NoDistroTemplateException: Error: could not find a 
distribution template for Ubuntu/saucy
  
  Expected:
  
  root# add-apt-repository ppa:webupd8team/atom
  Error: could not find a distribution template for Ubuntu/saucy in 
/usr/share/python-apt/templates
  
- 
- There is a number of problems:
+ There are number of problems:
  
  1. program dies with stacktrace, though it's not code error. Applicable
  environment errors (i.e. user-level errors like wrong data or missing
  files) must not show stack traces!
  
  2. error message doesn't give user a clue about how to fix the problem.
  Yes, it tells him about missing 'distribution template', but user
  doesn't know what is it and where to find it to fix it. Giving him
  template location ' /usr/share/python-apt/templates' helps to locate
  wrong package:
  
-     $ dpkg -S /usr/share/python-apt/templates
-     python-apt-common: /usr/share/python-apt/templates
+     $ dpkg -S /usr/share/python-apt/templates
+     python-apt-common: /usr/share/python-apt/templates
  
  3. the root of problem lies behind the fact, that there is no correct
  version dependencies between packages  base-files, software-properties-
  common, python3-apt, python-apt-common. Upgrade of base-files must
  trigger upgrade of software-properties-common, python3-apt, python-apt-
  common up to same release. Upgrade of python-apt-common must trigger
  upgrade of software-properties-common, python3-apt. Upgrade of software-
  properties-common must trigger upgrade of python3-apt. Ugrade of
  python3-apt must trigger upgrade of software-properties-common.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: software-properties-common 0.92.28
  ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
  Uname: Linux 3.0.0-12-generic x86_64
  ApportVersion: 2.12.5-0ubuntu2.2
  Architecture: amd64
  Date: Tue May 13 07:58:03 2014
  InstallationDate: Installed on 2010-02-04 (1558 days ago)
  InstallationMedia: Kubuntu 9.10 "Karmic Koala" - Beta amd64 (20090929.2)
  MarkForUpload: True
  PackageArchitecture: all
  SourcePackage: software-properties
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1318896

Title:
  add-apt-repository: stacktrace on missing template

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1318896/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to