Ticket #1417 (closed defect: fixed)

Opened 10 years ago

Last modified 8 years ago

Incorrect use of namespace packages in printing-config and metrics

Reported by: jdreed Owned by:
Priority: blocker Milestone: The Distant Future
Component: -- Keywords:
Cc: Fixed in version: debathena-metrics 1.11, debathena-printing-config 1.34.6
Upstream bug:

Description

Anders notes:

https://pythonhosted.org/setuptools/setuptools.html#namespace-packages
                                                        
- Both packages should specify namespace_packages=['debathena']. 
  (printing-config does, metrics doesn’t.)                             
- Both packages should have a debathena/__init__.py that says:       
  __import__('pkg_resources').declare_namespace(__name__)           
  (printing-config’s is empty and metrics’ is missing.) 

Change History

comment:1 Changed 8 years ago by andersk

  • Priority changed from normal to blocker

This is breaking printing on some cluster machines.

user@W20-575-13:~$ lpr
Traceback (most recent call last):
   File "/usr/bin/lpr", line 9, in <module>
     load_entry_point('debathena.printing==1.34.3-ubuntu14.04', 
'console_scripts', 'lpr.debathena')()
   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in 
load_entry_point
     return get_distribution(dist).load_entry_point(group, name)
   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in 
load_entry_point
     return ep.load()
   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in 
load
     entry = __import__(self.module_name, globals(),globals(), 
['__name__'])
ImportError: No module named printing.lpr
$ athinfo w20-575-13.mit.edu update.log
…
The following packages will be upgraded:
  debathena-printing-config
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/27.4 kB of archives.
After this operation, 3,072 B of additional disk space will be used.
(Reading database ... 644647 files and directories currently installed.)
Preparing to unpack .../debathena-printing-config_1.34.5~ubuntu14.04_all.deb ...
Unpacking debathena-printing-config (1.34.5~ubuntu14.04) over (1.34.3~ubuntu14.04) ...
dpkg: error processing archive /var/cache/apt/archives/debathena-printing-config_1.34.5~ubuntu14.04_all.deb (--unpack):
 trying to overwrite '/usr/lib/python2.7/dist-packages/debathena/__init__.py', which is also in package debathena-metrics 1.10~ubuntu14.04
Processing triggers for python-support (1.0.15) ...
Errors were encountered while processing:
 /var/cache/apt/archives/debathena-printing-config_1.34.5~ubuntu14.04_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ERROR: Simulation was successful, but update failed (shouldn't happen)
Attempting to auto-remove old packages
Simulating...
** Running: apt-get -y autoremove
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
** Running: apt-file update
** Ending Athena auto-update at Tue Aug 30 23:37:21 EDT 2016
-----

comment:2 Changed 8 years ago by andersk

  • Status changed from new to committed

committed  15514913157839e0d22c01a2f38e5ac516dfcf51 (Properly declare debathena as a namespace package) to master

comment:3 Changed 8 years ago by andersk

committed  098b1e065723725eab4fd67f5d2d93a9406c42a2 (Properly declare debathena as a namespace package) to master

comment:4 Changed 8 years ago by andersk

  • Status changed from committed to closed
  • Fixed in version set to debathena-metrics 1.11, debathena-printing-config 1.34.6
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.