apt-zeroconf crashes on start

Bug #404859 reported by Christian Schürer-Waldheim on 2009-07-26
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt-zeroconf
Undecided
Unassigned

Bug Description

I've installed the package apt-zeroconf from the ppa on karmic. The application crashes on start with the following error message:

2009-07-26 14:57:48 [MainThread] [INFO ] Using configuration file /etc/apt-zeroconf.conf
Traceback (most recent call last):
  File "/usr/bin/apt-zeroconf", line 78, in <module>
    aptzeroconf.main(options)
  File "/usr/lib/python2.6/dist-packages/aptzeroconf/__init__.py", line 61, in main
    from aptzeroconf.apt import apt_watcher
  File "/usr/lib/python2.6/dist-packages/aptzeroconf/apt.py", line 233, in <module>
    _watchmanager.add_watch(CACHE_PATH, _get_eventmask()) #: Watch Events
  File "/usr/lib/pymodules/python2.6/pyinotify.py", line 1434, in add_watch
    auto_add)
  File "/usr/lib/pymodules/python2.6/pyinotify.py", line 1366, in __add_watch
    ctypes.create_string_buffer(path),
  File "/usr/lib/python2.6/ctypes/__init__.py", line 68, in create_string_buffer
    raise TypeError(init)
TypeError: None

Changed in apt-zeroconf:
status: New → Incomplete
Jeremy Austin-Bardo (ausimage) wrote :

Thanks fro the report. By ppa, I assume this means apt-zeroconf's. Can you please try to install from my personal ppa <https://edge.launchpad.net/~ausimage/+archive/ppa> the unofficial 0.5.2. Your bug should be fixed. You may experience bugs configuring with dpkg with this unofficial package, but it should run otherwise.

Samat Jain (tamasrepus) wrote :

The package from your PPA gets rid of the error, thanks Jeremy.

However, I don't think it fixes the problem... the package in Jeremy's PPA works because it contains /etc/apt-zeroconf.conf, while the package in the apt-zeroconf PPA does not. If this file is used with the apt-zeroconf PPA's package, then the error goes away with that package as well.

If apt-zeroconf is going to require a configuration file, a better error message should be displayed than the above traceback, and the redundant configuration information contained in the file mentioned below removed.

The problem appears to be in config.py (that is, /usr/share/pyshared/aptzeroconf/config.py when installed). The Config class sets up a default configuration, but the configuration does not get used. I'm going to look at why the default configuration does not get used; the code looks fine, but perhaps it's the original author's (and my) misunderstanding of how ConfigParser in Python's stdlib works.

I installed the package 0.5.1-0ubuntu1~karmic~ppa1. This package does not include the config file /etc/apt-zeroconf.conf, thus I got the above mentioned error message again. Copying the config file from Jeremy's PPA solved the problem.

Should there be a config file or should a missing config file not hinder apt-zeroconf to start?

N.B.: I used the package from ppa:apt-zeroconf/ppa

Changed in apt-zeroconf:
status: Incomplete → New
Samat Jain (tamasrepus) wrote :

> Should there be a config file ...

IMHO, there should be a config file containing the defaults, but commented out (so the user know a configuration file exists, and what the defaults are, without having to read the source code.

> ... or should a missing config file not hinder apt-zeroconf to start?

Yes. apt-zeroconf's code is such that it *should* start anyway (which is why the error is so opaque. There is a logic error somewhere preventing it from doing so.

I get the same traceback and the same error running apt-zeroconf on Debian Sid when the /etc/apt-zeroconf file is missing.
I can provide a trace of a successful and a failing execution for comparison if you need them.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers