Package: smartpm Version: 0.41+svn727-1.1 Severity: important Tags: patch The aptchannelsync plugin removes all unknown aptsync channels after processing each sources.list or sources.list.d file, so it ignores all channels generated from any but the last of these files. The attached patch fixes this problem.
This bug applies to both testing and unstable. - Josh Triplett and Jamey Sharp -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (990, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-1-686 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages smartpm depends on: ii libc6 2.3.6.ds1-8 GNU C Library: Shared libraries ii python 2.4.4-2 An interactive high-level object-o ii python-gtk2 2.8.6-8 Python bindings for the GTK+ widge ii python-pexpect 2.1-1 Python module for automating inter ii python-pycurl 7.15.5-1 Python bindings to libcurl ii python-rpm 4.4.1-13 Python bindings for RPM ii python-support 0.5.6 automated rebuilding support for p ii python2.4 2.4.4-1 An interactive high-level object-o smartpm recommends no packages. -- no debconf information
--- a/smart/plugins/aptchannelsync.py 2006-06-16 01:35:52.000000000 -0700 +++ b/smart/plugins/aptchannelsync.py 2007-01-01 20:50:29.000000000 -0800 @@ -32,11 +32,8 @@ APT_SOURCES_DIR = "/etc/apt/sources.list.d/" APT_SOURCES = "/etc/apt/sources.list" -def _readSourcesList(file): +def _readSourcesList(file, seen): - # the lines we have seen in the sources.list - seen = set() - for line in file: line = line.strip() # we only handle type "deb" or "rpm" @@ -73,22 +70,17 @@ else: sysconf.set(("channels", alias), descriptions[alias]) - # now delete the entries that are no longer in our sources.list - channels = sysconf.get("channels") - dellist = filter(lambda al: al.startswith("aptsync-") and al not in seen, channels) - for d in dellist: - sysconf.remove(("channels", d)) - - - def syncAptChannels(sourcesfile, sourcesdir, force=None): # FIXME: add the fingerprints as well! # and fix the gpg handling in smart + # the lines we have seen in the sources.list + seen = set() + # first sources.list if os.path.exists(sourcesfile): - _readSourcesList(open(sourcesfile)) + _readSourcesList(open(sourcesfile), seen) # then the channels dir if os.path.isdir(sourcesdir): @@ -101,9 +93,13 @@ if not os.path.isfile(filepath): continue file = open(filepath) - _readSourcesList(file) - + _readSourcesList(file, seen) + # now delete the entries that are no longer in our sources.list + channels = sysconf.get("channels") + dellist = filter(lambda al: al.startswith("aptsync-") and al not in seen, channels) + for d in dellist: + sysconf.remove(("channels", d)) if not sysconf.getReadOnly(): if sysconf.get("sync-apt-sources",False):
signature.asc
Description: Digital signature