[apt-proxy-devel] r610 - in tags/1.9.33-0.1: . apt_proxy apt_proxy/test apt_proxy/twisted_compat bin debian doc doc/po

Chris Halls halls at costa.debian.org
Thu Aug 3 10:12:50 UTC 2006


Author: halls
Date: Thu Aug  3 10:12:44 2006
New Revision: 610

Added:
   tags/1.9.33-0.1/
   tags/1.9.33-0.1/README
   tags/1.9.33-0.1/apbuilddoc   (contents, props changed)
   tags/1.9.33-0.1/apt-proxy.conf.test
   tags/1.9.33-0.1/apt_proxy/
   tags/1.9.33-0.1/apt_proxy/.cvsignore
   tags/1.9.33-0.1/apt_proxy/__init__.py
   tags/1.9.33-0.1/apt_proxy/apt_proxy.py
   tags/1.9.33-0.1/apt_proxy/apt_proxy_conf.py
   tags/1.9.33-0.1/apt_proxy/apt_proxytap.py
   tags/1.9.33-0.1/apt_proxy/memleak.py
   tags/1.9.33-0.1/apt_proxy/misc.py
   tags/1.9.33-0.1/apt_proxy/packages.py
   tags/1.9.33-0.1/apt_proxy/plugins.tml
   tags/1.9.33-0.1/apt_proxy/test/
   tags/1.9.33-0.1/apt_proxy/test/__init__.py
   tags/1.9.33-0.1/apt_proxy/test/test_apt_proxy.py
   tags/1.9.33-0.1/apt_proxy/test/test_config.py
   tags/1.9.33-0.1/apt_proxy/test/test_packages.py
   tags/1.9.33-0.1/apt_proxy/twisted_compat/
   tags/1.9.33-0.1/apt_proxy/twisted_compat/.cvsignore
   tags/1.9.33-0.1/apt_proxy/twisted_compat/__init__.py
   tags/1.9.33-0.1/apt_proxy/twisted_compat/compat.py
   tags/1.9.33-0.1/apt_proxy/twisted_compat/http.py
   tags/1.9.33-0.1/aptest   (contents, props changed)
   tags/1.9.33-0.1/aptest.testdb   (contents, props changed)
   tags/1.9.33-0.1/aptproxy.kdevelop
   tags/1.9.33-0.1/bin/
   tags/1.9.33-0.1/bin/apt-proxy   (contents, props changed)
   tags/1.9.33-0.1/bin/apt-proxy-import   (contents, props changed)
   tags/1.9.33-0.1/bin/apt-proxy-v1tov2   (contents, props changed)
   tags/1.9.33-0.1/debian/
   tags/1.9.33-0.1/debian/TODO
   tags/1.9.33-0.1/debian/changelog
   tags/1.9.33-0.1/debian/compat
   tags/1.9.33-0.1/debian/control
   tags/1.9.33-0.1/debian/copyright
   tags/1.9.33-0.1/debian/default
   tags/1.9.33-0.1/debian/dirs
   tags/1.9.33-0.1/debian/docs
   tags/1.9.33-0.1/debian/init.d   (contents, props changed)
   tags/1.9.33-0.1/debian/install
   tags/1.9.33-0.1/debian/lintian-overrides
   tags/1.9.33-0.1/debian/logrotate
   tags/1.9.33-0.1/debian/manpages
   tags/1.9.33-0.1/debian/po/
   tags/1.9.33-0.1/debian/po/POTFILES.in
   tags/1.9.33-0.1/debian/po/ca.po
   tags/1.9.33-0.1/debian/po/cs.po
   tags/1.9.33-0.1/debian/po/da.po
   tags/1.9.33-0.1/debian/po/de.po
   tags/1.9.33-0.1/debian/po/es.po
   tags/1.9.33-0.1/debian/po/fr.po
   tags/1.9.33-0.1/debian/po/ja.po
   tags/1.9.33-0.1/debian/po/nl.po
   tags/1.9.33-0.1/debian/po/pt.po
   tags/1.9.33-0.1/debian/po/pt_BR.po
   tags/1.9.33-0.1/debian/po/ru.po
   tags/1.9.33-0.1/debian/po/sv.po
   tags/1.9.33-0.1/debian/po/templates.pot
   tags/1.9.33-0.1/debian/po/vi.po
   tags/1.9.33-0.1/debian/postinst
   tags/1.9.33-0.1/debian/postrm
   tags/1.9.33-0.1/debian/preinst   (contents, props changed)
   tags/1.9.33-0.1/debian/prerm   (contents, props changed)
   tags/1.9.33-0.1/debian/rules   (contents, props changed)
   tags/1.9.33-0.1/debian/templates
   tags/1.9.33-0.1/doc/
   tags/1.9.33-0.1/doc/.cvsignore
   tags/1.9.33-0.1/doc/HISTORY
   tags/1.9.33-0.1/doc/Makefile
   tags/1.9.33-0.1/doc/TODO
   tags/1.9.33-0.1/doc/UPGRADING
   tags/1.9.33-0.1/doc/apt-proxy-import.8.inc
   tags/1.9.33-0.1/doc/apt-proxy-v1tov2.8
   tags/1.9.33-0.1/doc/apt-proxy.8
   tags/1.9.33-0.1/doc/apt-proxy.add.fr
   tags/1.9.33-0.1/doc/apt-proxy.conf
   tags/1.9.33-0.1/doc/apt-proxy.conf.5
   tags/1.9.33-0.1/doc/design.txt
   tags/1.9.33-0.1/doc/offline-tips
   tags/1.9.33-0.1/doc/po/
   tags/1.9.33-0.1/doc/po/apt-proxy.pot
   tags/1.9.33-0.1/doc/po/fr.po
   tags/1.9.33-0.1/doc/po4a.cfg
   tags/1.9.33-0.1/pychecker   (contents, props changed)
   tags/1.9.33-0.1/runtests   (contents, props changed)

Log:
Import NMU info svn


Added: tags/1.9.33-0.1/README
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/README	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,109 @@
+                 	apt-proxy README
+
+              Chris Halls <halls at debian.org>
+      Revised by Manuel Estrada Sainz <ranty at debian.org>
+
+This is part of the Debian GNU/Linux package for apt-proxy v2.
+
+apt-proxy v2 is dedicated to Manuel Estrada 'ranty' Sainz, who rewrote 
+apt-proxy version 1 in Python.  He died in a tragic car accident while
+returning from the Free Software conference held at Valencia, Spain in May
+2004.  http://www.debian.org/News/2004/20040515
+
+If you have installed apt-proxy using the Debian package, you now need to
+do the following:
+
+1. Edit apt-proxy.conf to select the nearest backend servers for you.  See
+   the apt-proxy.conf(5) manpage for details.
+2. Point your apt clients to the proxy.  See the apt-proxy(8) manpage for
+   details.
+3. run apt-get update on a client, to initialize the archive directories and
+   file lists.
+4. If you have an apt cache directory full of .debs, you can use
+   apt-proxy-import(8) to copy them into the apt-proxy archive.
+
+If you are installing from the source tar.gz, for example on a non-Debian
+machine, have a look at INSTALL for manual installation instructions.
+
+NOTE: Forget that for now, there is no support for installing on non-Debian
+machines currently, and that may take a while. It also depends on apt being
+installed, which may not be the case on a non-Debian machines.
+
+Using apt-proxy with Debian Potato/Woody?
+-----------------------------------------
+
+apt-proxy versoin 2 will not easily work on this version of Debian, it requires
+versions of twisted, python and python-apt not present in them.  Upgrade to
+Sarge or stick with version 1.
+
+Upgrading from apt-proxy v1
+---------------------------
+
+The maintainer scripts should have converted apt-proxy.conf to the new format
+as apt-proxy-v2.conf, and that will be used instead so you can upgrade and
+downgrade freely.
+
+FIXME: This is too short a description, should be extended when we actually
+implement this behavior.
+
+Frequently Asked Questions
+--------------------------
+Here are some of the issues that have been raised about apt-proxy:
+
+- Client setup -
+
+Q: Is apt-proxy really a proxy or is it an HTTP server?
+
+A: Strictly speaking, apt-proxy behaves like an HTTP server, not a proxy.  It
+   is very similar in concept to a proxy, because it sits between the client
+   and the backend server, forwarding requests to remote servers.  With a true
+   proxy, such as Squid, apt sends a request to the proxy for a file from
+   another site, such as ftp.debian.org.  Yet this doesn't make sense for
+   apt-proxy, because it decides itself which backend to use depending on
+   availability and type of file requested.  It also has the advantage that all
+   the apt clients do not have to be reconfigured whenever there is a change to
+   the backend server that is to be used.
+
+Q: My web proxy does not know about the apt-proxy machine (for example, you are
+   using a proxy at your ISP), and I can't get apt to contact apt-proxy, even
+   though I have added this to apt.conf: 
+   
+       Acquire::http::Proxy::<host> "DIRECT";
+
+A: Have you got http_proxy set?  From the apt.conf manpage:
+      "The http_proxy environment variable will override all settings."
+   
+   So you must unset http_proxy before running apt.
+
+- Using apt-proxy with other clients -
+
+Q: What else is apt-proxy known to work with?  How do I configure it?
+
+A1: wget.  For example, to get the Woody Release file:
+	wget http://localhost:9999/main/dists/woody/Release
+    
+    If you normally use a proxy, and that proxy is not aware of the machine that
+    apt-proxy is running, on you may need to specify --proxy=off.
+
+A2: debootstrap, which uses wget.  This means you can easily install new
+    machine using the packages out of your apt-proxy cache.  In boot floppies,
+    specify http://APTPROXY:9999/main as your debian mirror (replacing APTPROXY
+    with the name or IP address of the machine where apt-proxy is running).
+
+A3: rootstrap, a tool for making root images for user-mode-linux.  Assuming
+    that you are running rootstrap on the same machine as apt-proxy and have
+    used the default network addresses 192.168.10.x, put this in
+    rootstrap.conf:
+
+        mirror=http://192.168.10.1:9999/main
+
+    [Note: during testing, we encountered a strange problem where rootstrap
+    thought the architecture was i386-none, so we had to add --arch=i386 to the
+    deboostrap call in /usr/lib/rootstrap/modules/debian.]
+
+A4: pbuilder, which also uses debootstrap.  Add this to /etc/pbuilderrc:
+
+	MIRRORSITE=http://APTPROXT:9999/main
+	NONUSMIRRORSITE=http://APTPROXT:9999/non-US
+
+April 2004

Added: tags/1.9.33-0.1/apbuilddoc
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apbuilddoc	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,6 @@
+#!/bin/sh
+[ ! -d html ] && mkdir html
+cd html
+PYTHONPATH="`pwd`:../apt_proxy" pydoc -w ../apt_proxy/*
+
+

Added: tags/1.9.33-0.1/apt-proxy.conf.test
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt-proxy.conf.test	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,147 @@
+[DEFAULT]
+;; All times are in seconds, but you can add a suffix
+;; for minutes(m), hours(h) or days(d)
+
+;; Server IP to listen on
+;address = 192.168.0.254
+
+;; Server port to listen on
+port = 9998
+
+;; Control files (Packages/Sources/Contents) refresh rate
+;;
+;; Minimum time between attempts to refresh a file
+min_refresh_delay = 1h
+
+;; Minimum age of a file before attempting an update (NOT YET IMPLEMENTED)
+;min_age = 23h
+
+;; Uncomment to make apt-proxy continue downloading even if all
+;; clients disconnect.  This is probably not a good idea on a
+;; dial up line.
+;; complete_clientless_downloads = 1
+
+;; Debugging settings.
+;; for all debug information use this:
+;; debug = all:9
+debug = all:9
+
+;; Debugging remote python console
+;; Do not enable in an untrusted environment
+;telnet_port = 9998
+;telnet_user = apt-proxy
+;telnet_password = secret
+
+;; Network timeout when retrieving from backend servers
+timeout = 15
+
+;; Cache directory for apt-proxy
+cache_dir = testcache
+
+;; Use passive FTP? (default=on)
+;passive_ftp = on
+
+;; Use HTTP proxy?
+;http_proxy = host:port
+
+;; Enable HTTP pipelining within apt-proxy (for test purposes)
+;disable_pipelining=0
+
+;;--------------------------------------------------------------
+;; Cache housekeeping
+
+;; Time to perform periodic housekeeping:
+;;  - delete files that have not been accessed in max_age
+;;  - scan cache directories and update internal tables
+cleanup_freq = 1d
+
+;; Maximum age of files before deletion from the cache (seconds)
+max_age = 120d
+
+;; Maximum number of versions of a .deb to keep per distribution
+max_versions = 3
+
+;; Add HTTP backends dynamicaly if not already defined? (default=on)
+;dynamic_backends = on
+
+username=chris
+
+;;---------------------------------------------------------------
+;;---------------------------------------------------------------
+;; Backend servers
+;;
+;; Place each server in its own [section]
+
+[debian]
+;; The main Debian archive
+;; You can override the default timeout like this:
+;timeout = 30
+
+;; Rsync server used to rsync the Packages file (NOT YET IMPLEMENTED)
+;;rsyncpackages = rsync://ftp.de.debian.org/debian
+
+;; Backend servers, in order of preference
+backends = 
+	http://ftp.us.debian.org/debian
+	http://ftp.de.debian.org/debian
+	http://ftp2.de.debian.org/debian
+	ftp://ftp.uk.debian.org/debian
+
+
+[debian-non-US]
+;; Debian debian-non-US archive
+;timeout will be the global value
+backends =
+	http://ftp.uk.debian.org/debian-non-US
+	http://ftp.de.debian.org/debian-non-US
+	ftp://ftp.uk.debian.org/debian
+	
+[security]
+;; Debian security archive
+backends = 
+	http://security.debian.org/debian-security
+	http://ftp2.de.debian.org/debian-security
+
+[ubuntu]
+;; Ubuntu archive
+backends = http://archive.ubuntu.com/ubuntu
+
+[ubuntu-security]
+;; Ubuntu security updates
+backends = http://security.ubuntu.com/ubuntu
+
+;[openoffice]
+;; OpenOffice.org packages
+;backends =
+;	http://ftp.freenet.de/pub/debian-openoffice
+;	http://ftp.sh.cvut.cz/MIRRORS/OpenOffice.deb
+;	http://borft.student.utwente.nl/debian
+	
+;[apt-proxy]
+;; Apt-proxy new versions
+;backends = http://apt-proxy.sourceforge.net/apt-proxy
+
+;[backports.org]
+;; backports.org
+;backends = http://backports.org/debian
+
+;[blackdown]
+;; Blackdown Java
+;backends = http://ftp.gwdg.de/pub/languages/java/linux/debian
+
+
+;[debian-people]
+;; people.debian.org
+;backends = http://people.debian.org
+
+;[emdebian]
+;; The Emdebian project
+;backends = http://emdebian.sourceforge.net/emdebian
+
+;[rsync]
+;; An example using an rsync server.  This is not recommended
+;; unless http is not available, becuause rsync is only more
+;; efficient for transferring uncompressed files and puts much
+;; more overhead on the server.  See the rsyncpacakges parameter 
+;; for a way of rsyncing just the Packages files.
+;backends = rsync://ftp.uk.debian.org/debian

Added: tags/1.9.33-0.1/apt_proxy/.cvsignore
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/.cvsignore	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,2 @@
+*.pyo
+*.pyc

Added: tags/1.9.33-0.1/apt_proxy/__init__.py
==============================================================================

Added: tags/1.9.33-0.1/apt_proxy/apt_proxy.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/apt_proxy.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,1962 @@
+#
+# Copyright (C) 2002 Manuel Estrada Sainz <ranty at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+from twisted.internet import reactor, defer, abstract, protocol
+from twisted.protocols import ftp, basic
+
+import os, stat, signal, fcntl, exceptions
+from os.path import dirname, basename
+import tempfile
+import glob
+import re
+import urlparse
+import time
+import string
+import packages
+from twisted.python.failure import Failure
+import memleak
+from twisted.internet import error
+#from posixfile import SEEK_SET, SEEK_CUR, SEEK_END
+#since posixfile is considered obsolete I'll define the SEEK_* constants
+#myself.
+SEEK_SET = 0
+SEEK_CUR = 1
+SEEK_END = 2
+
+from types import *
+
+#sibling imports
+import misc
+log = misc.log
+
+from twisted_compat import compat
+from twisted_compat import http
+
+status_dir = '.apt-proxy'
+
+class FileType:
+    """
+    This is just a way to distinguish between different filetypes.
+
+    self.regex: regular expression that files of this type should
+    match. It could probably be replaced with something simpler,
+    but... o well, it works.
+    
+    self.contype: mime string for the content-type http header.
+    
+    mutable: do the contents of this file ever change?  Files such as
+    .deb and .dsc are never changed once they are created.
+    
+    """
+    def __init__ (self, regex, contype, mutable):
+        self.regex = regex
+        self.contype = contype
+        self.mutable = mutable
+
+    def check (self, name):
+        "Returns true if name is of this filetype"
+        if self.regex.search(name):
+            return 1
+        else:
+            return 0
+
+# Set up the list of filetypes that we are prepared to deal with.
+# If it is not in this list, then we will ignore the file and
+# return an error.
+filetypes = (
+    FileType(re.compile(r"\.deb$"), "application/dpkg", 0),
+    FileType(re.compile(r"\.udeb$"), "application/dpkg", 0),
+    FileType(re.compile(r"\.tar\.gz$"), "application/x-gtar", 0),
+    FileType(re.compile(r"\.dsc$"),"text/plain", 0),
+    FileType(re.compile(r"\.diff\.gz$"), "application/x-gzip", 0),
+    FileType(re.compile(r"\.gz$"), "application/x-gzip", 1),
+    FileType(re.compile(r"\.bin$"), "application/octet-stream", 0),
+    FileType(re.compile(r"\.tgz$"), "application/x-gtar", 0),
+    FileType(re.compile(r"\.txt$"), "application/plain-text", 1),
+    FileType(re.compile(r"\.html$"), "application/text-html", 1),
+
+    FileType(re.compile(r"/(Packages|Release(\.gpg)?|Sources|Contents-.*)"
+                        r"(\.(gz|bz2))?$"), 
+             "text/plain", 1),
+
+    FileType(re.compile(r"\.rpm$"), "application/rpm", 0),
+
+    FileType(re.compile(r"/(pkglist|release|srclist)(\.(\w|-)+)?"
+                        r"(\.(gz|bz2))?$"), 
+             "text/plain", 1),
+    )
+
+class FileVerifier(protocol.ProcessProtocol):
+    """
+    Verifies the integrity of a file by running an external
+    command.
+
+    self.deferred: a deferred that will be triggered when the command
+    completes, or if a timeout occurs.
+
+    Sample:
+    
+            verifier = FileVerifier(self)
+            verifier.deferred.addCallbacks(callback_if_ok, callback_if_fail)
+
+        then either callback_if_ok or callback_if_fail will be called
+        when the subprocess finishes execution.
+
+    Checkout twisted.internet.defer.Deferred on how to use self.deferred
+    
+    """
+    def __init__(self, request):
+        self.factory = request.factory
+        self.deferred = defer.Deferred() # Deferred that passes status back
+        self.path = request.local_file
+
+        if re.search(r"\.deb$", self.path):
+            exe = '/usr/bin/dpkg'
+            args = (exe, '--fsys-tarfile', self.path)
+        elif re.search(r"\.gz$", self.path):
+            exe = '/bin/gunzip'
+            args = (exe, '-t', '-v', self.path)
+        elif re.search(r"\.bz2$", self.path):
+            exe = '/usr/bin/bunzip2'
+            args = (exe, '--test', self.path)
+        else:
+            # Unknown file, just check it is not 0 size
+            try:
+                filesize = os.stat(self.path)[stat.ST_SIZE]
+            except:
+                filesize = 0
+
+            if(os.stat(self.path)[stat.ST_SIZE]) < 1:
+                log.debug('Verification failed for ' + self.path)
+                self.failed()
+            else:
+                log.debug('Verification skipped for ' + self.path)
+                self.deferred.callback(None)
+            return
+
+        log.debug("starting verification: " + exe + " " + str(args))
+	self.nullhandle = open("/dev/null", "w")
+        self.process = reactor.spawnProcess(self, exe, args, childFDs = { 0:"w", 1:self.nullhandle.fileno(), 2:"r" })
+        self.laterID = reactor.callLater(self.factory.config.timeout, self.timedout)
+
+    def connectionMade(self):
+        self.data = ''
+
+    def outReceived(self, data):
+        #we only care about errors
+        pass
+    
+    def errReceived(self, data):
+        self.data = self.data + data
+
+    def failed(self):
+        log.debug("verification failed: %s"%(self.path), 'verify', 1)
+        os.unlink(self.path)
+        self.deferred.errback(None)
+
+    def timedout(self):
+        """
+        this should not happen, but if we timeout, we pretend that the
+        operation failed.
+        """
+        self.laterID=None
+        log.debug("Process Timedout:",'verify')
+        self.failed()
+        
+    def processEnded(self, reason=None):
+        """
+        This get's automatically called when the process finishes, we check
+        the status and report through the Deferred.
+        """
+        __pychecker__ = 'unusednames=reason'
+        #log.debug("Process Status: %d" %(self.process.status),'verify')
+        #log.debug(self.data, 'verify')
+        if self.laterID:
+            self.laterID.cancel()
+            if self.process.status == 0:
+                self.deferred.callback(None)
+            else:
+                self.failed()
+
+def findFileType(name):
+    "Look for the FileType of 'name'"
+    for type in filetypes:
+        if type.check(name):
+            return type
+    return None
+
+class TempFile (file):
+    def __init__(self, mode='w+b', bufsize=-1):
+        (fd, name) = tempfile.mkstemp('.apt-proxy')
+        os.close(fd)
+        file.__init__(self, name, mode, bufsize)
+        os.unlink(name)
+    def append(self, data):
+        self.seek(0, SEEK_END)
+        self.write(data)
+    def size(self):
+        return self.tell()
+    def read_from(self, size=-1, start=None):
+        if start != None:
+            self.seek(start, SEEK_SET)
+        data = file.read(self, size)
+        return data
+
+
+class Fetcher:
+    """
+    This is the base class for all Fetcher*, it tries to hold as much
+    common code as posible.
+
+    Subclasses of this class are the ones responsible for contacting
+    the backend servers and fetching the actual data.
+    """
+    gzip_convert = re.compile(r"/Packages$")
+    post_convert = re.compile(r"/Packages.gz$")
+    status_code = http.OK
+    status_message = None
+    requests = None
+    request = None
+    length = None
+    transport = None
+        
+    def insert_request(self, request):
+        """
+        Request should be served through this Fetcher because it asked for
+        the same uri that we are waiting for.
+        
+        We also have to get it up to date, give it all received data, send it
+        the appropriate headers and set the response code.
+        """
+        if request in self.requests:
+            raise RuntimeError, \
+                  'this request is already assigned to this Fetcher'
+        self.requests.append(request)
+        request.apFetcher = self
+        if (self.request):
+            self.update_request(request)
+
+    def update_request(self, request):
+        """
+        get a new request up to date
+        """
+        request.local_mtime = self.request.local_mtime
+        request.local_size = self.request.local_size
+        if(self.status_code != None):
+            request.setResponseCode(self.status_code, self.status_message)
+        for name, value in self.request.headers.items():
+            request.setHeader(name, value)
+        if self.transfered.size() != 0:
+            request.write(self.transfered.read_from(start=0))
+
+    def remove_request(self, request):
+        """
+        Request should NOT be served through this Fetcher, the client
+        probably closed the connection.
+        
+        If this is our last request, we may also close the connection with the
+        server depending on the configuration.
+
+        We keep the last request for reference even if the client closed the
+        connection.
+        """
+        self.requests.remove(request)
+        if len(self.requests) == 0:
+            log.debug("Last request removed",'Fetcher')
+            if not self.factory.config.complete_clientless_downloads:
+                if self.transport:
+                    log.debug(
+                        "telling the transport to loseConnection",'Fetcher')
+                    try:
+                        self.transport.loseConnection()
+                    except KeyError:
+                        # Rsync fetcher already loses conneciton for us
+                        pass
+                if hasattr(self, 'loseConnection'):
+                    self.loseConnection()
+        else:
+            self.request = self.requests[0]
+        request.apFetcher = None
+
+    def transfer_requests(self, fetcher):
+        "Transfer all requests from self to fetcher"
+        for req in self.requests:
+            self.remove_request(req)
+            fetcher.insert_request(req)
+
+    def setResponseCode(self, code, message=None):
+        "Set response code for all requests"
+        #log.debug('Response code: %d - %s' % (code, message),'Fetcher')
+        self.status_code = code
+        self.status_message = message
+        for req in self.requests:
+            req.setResponseCode(code, message)
+
+    def setResponseHeader(self, name, value):
+        "set 'value' for header 'name' on all requests"
+        for req in self.requests:
+            req.setHeader(name, value)
+
+    def __init__(self, request=None):
+        self.requests = []
+        self.transfered = TempFile()
+        if(request):
+            self.activate(request)
+            
+    def activate(self, request):
+        log.debug(str(request.backend) + request.uri, 'Fetcher.activate')
+        self.local_file = request.local_file
+        self.local_mtime = request.local_mtime
+        self.factory = request.factory
+        self.request = request
+        request.content.read()
+
+        for req in self.requests:
+            self.update_request(req)
+        self.requests.append(request)
+
+        request.apFetcher = self
+        if self.factory.runningFetchers.has_key(request.uri):
+            raise RuntimeError, 'There already is a running fetcher'
+        self.factory.runningFetchers[request.uri]=self
+
+    def apDataReceived(self, data):
+        """
+        Should be called from the subclasses when data is available for
+        streaming.
+
+        Keeps all transfered data in 'self.transfered' for requests which arrive
+        later and to write it in the cache at the end.
+
+        Note: self.length if != None is the amount of data pending to be
+        received.
+        """
+        if self.length != None:
+            self.transfered.append(data[:self.length])
+            for req in self.requests:
+                req.write(data[:self.length])
+        else:
+            self.transfered.append(data)
+            for req in self.requests:
+                req.write(data)
+
+    def apDataEnd(self, data, saveData=True):
+        """
+        Called by subclasses when the data transfer is over.
+
+           -caches the received data if everyting went well (if saveData=True)
+           -takes care of mtime and atime
+           -finishes connection with server and the requests
+           
+        """
+        import shutil
+        log.debug("Finished receiving data, status:%d saveData:%d" %(self.status_code, saveData), 'Fetcher');
+        if (self.status_code == http.OK):
+            if saveData:
+                dir = dirname(self.local_file)
+                if(not os.path.exists(dir)):
+                    os.makedirs(dir)
+                f = open(self.local_file, "w")
+                fcntl.lockf(f.fileno(), fcntl.LOCK_EX)
+                f.truncate(0)
+                if type(data) is StringType:
+                    f.write(data)
+                else:
+                    data.seek(0, SEEK_SET)
+                    shutil.copyfileobj(data, f)
+                f.close()
+                if self.local_mtime != None:
+                    os.utime(self.local_file, (time.time(), self.local_mtime))
+                else:
+                    log.debug("no local time: "+self.local_file,'Fetcher')
+                    os.utime(self.local_file, (time.time(), 0))
+
+            self.factory.file_served(self.request.uri)
+
+            #self.request.backend.get_packages_db().packages_file(self.request.uri)
+        
+        if self.transport:
+            try:
+              self.transport.loseConnection()
+            except exceptions.KeyError:
+              # Couldn't close connection - already closed?
+              log.debug("transport.loseConnection() - "
+                        "connection already closed", 'Fetcher')
+              pass
+                
+        for req in self.requests:
+            req.finish()
+
+        self.transfered.close()
+        self.apEnd()
+
+    def apEnd(self):
+        """
+        Called by subclasses when apDataEnd does too many things.
+
+        Let's everyone know that we are not the active Fetcher for our uri.
+        """
+        try:
+            del self.factory.runningFetchers[self.request.uri]
+        except exceptions.KeyError:
+            log.debug("We are not on runningFetchers!!!",'Fetcher')
+            log.debug("Class is not in runningFetchers: "+str(self.__class__),
+                      'Fetcher')
+            if self.request:
+                log.debug(' URI:' + self.request.uri, 'Fetcher')
+            log.debug('Running fetchers: '
+                      +str(self.factory.runningFetchers),'Fetcher')
+            #raise exceptions.KeyError
+        for req in self.requests[:]:
+            self.remove_request(req)
+
+        import gc
+        #Cleanup circular references
+        reactor.callLater(5, gc.collect)
+
+    def apEndCached(self):
+        """
+        A backend has indicated that this file has not changed,
+        so serve the file from the disk cache
+        """
+        self.setResponseCode(http.OK)
+        self.apEndTransfer(FetcherCachedFile)
+        
+    def apEndTransfer(self, fetcher_class):
+        """
+        Remove this Fetcher and transfer all it's requests to a new instance of
+        'fetcher_class'.
+        """
+        #Consider something like this:
+        #req = dummyFetcher.fix_ref_request()
+        #fetcher = fetcher_class()
+        #dummyFetcher.transfer_requests(fetcher)
+        #dummyFetcher.apEnd()
+        #fetcher.activate(req)
+
+        #self.setResponseCode(http.OK)
+        requests = self.requests[:]
+        self.apEnd()  # Remove requests from this fetcher
+        fetcher = None
+        for req in requests:
+            if (fetcher_class != FetcherCachedFile or req.serve_if_cached):
+                running = req.factory.runningFetchers
+                if (running.has_key(req.uri)):
+                    #If we have an active Fetcher just use that
+                    log.debug("have active Fetcher",'Fetcher')
+                    running[req.uri].insert_request(req)
+                    fetcher = running[req.uri]
+                else:
+                    fetcher = fetcher_class(req)
+            else:
+                req.finish()
+        return fetcher
+            
+    def connectionFailed(self, reason=None):
+        """
+        Tell our requests that the connection with the server failed.
+        """
+        msg = '[%s] Connection Failed: %s/%s'%(
+            self.request.backend.base,
+            self.request.backendServer.path, self.request.backend_uri)
+
+        if reason:
+            msg = '%s (%s)'%(msg, reason.getErrorMessage())
+            log.debug("Connection Failed: "+str(reason), 'Fetcher')
+        log.err(msg)
+
+        # Look for alternative fetchers
+        if not self.request.activateNextBackendServer(self):
+            # No more backends, send error response back to client
+            if reason.check(error.ConnectError):
+                self.setResponseCode(http.SERVICE_UNAVAILABLE, "Connect Error")
+            else:
+                self.setResponseCode(http.SERVICE_UNAVAILABLE)
+            self.apDataReceived("")
+            self.apDataEnd(self.transfered, False)
+            #Because of a bug in tcp.Client we may be called twice,
+            #Make sure that next time nothing will happen
+            #FIXME: This hack is probably not anymore pertinent.
+            self.connectionFailed = lambda : log.debug('connectionFailed(2)',
+                                                    'Fetcher','9')
+            
+
+class FetcherDummy(Fetcher):
+    """
+    """
+    gzip_convert = re.compile(r"^Nothing should match this$")
+    post_convert = re.compile(r"^Nothing should match this$")
+    status_code = http.INTERNAL_SERVER_ERROR
+    status_message = None
+        
+    def insert_request(self, request):
+        """
+        """
+        if request in self.requests:
+            raise RuntimeError, \
+                  'this request is already assigned to this Fetcher'
+        self.requests.append(request)
+        request.apFetcher = self
+
+    def remove_request(self, request):
+        """
+        """
+        #make sure that it has updated values, since the requests
+        #may be cached and we need them to serve it.
+        request.local_mtime = self.request.local_mtime
+        request.local_size = self.request.local_size
+
+        self.requests.remove(request)
+        request.apFetcher = None
+
+    def fix_ref_request(self):
+        if self.requests != []:
+            if self.request not in self.requests:
+                request = self.requests[0]
+                request.local_mtime = self.request.local_mtime
+                request.local_size = self.request.local_size
+                self.request = request
+            self.remove_request(self.request)
+        else:
+            self.request = None
+            
+        return self.request
+
+class FetcherFile(Fetcher):
+
+    def activate(self, request):
+        Fetcher.activate(self, request)
+        log.debug("FetcherFile.activate(): uri='%s' server='%s'" % (request.uri, request.backendServer.uri))
+        if not request.apFetcher:
+            log.debug("no request.apFetcher")
+            return
+
+        self.factory.file_served(request.uri)
+
+        # start the transfer
+        self.local_file = request.backendServer.uri[len("file:"):]+ request.uri
+        if not os.path.exists(self.local_file):
+            log.debug("not found: %s" % self.local_file)
+            request.setResponseCode(http.NOT_FOUND)
+            request.write("")
+            request.finish()
+            self.remove_request(request)
+            Fetcher.apEnd(self)
+            return
+        self.local_size = os.stat(self.local_file)[stat.ST_SIZE]
+        
+        log.debug("Serving local file: " + self.local_file + " size:" + str(self.local_size), 'FetcherCachedFile')
+        file = open(self.local_file,'rb')
+        fcntl.lockf(file.fileno(), fcntl.LOCK_SH)
+            
+        request.setHeader("Content-Length", self.local_size)
+        #request.setHeader("Last-modified",
+        #                  http.datetimeToString(request.local_mtime))
+        basic.FileSender().beginFileTransfer(file, request) \
+                          .addBoth(self.file_transfer_complete, request) \
+                          .addBoth(lambda r: file.close())
+
+    # A file transfer has completed
+    def file_transfer_complete(self, result, request):
+        log.debug("transfer complete", 'FetcherCachedFile')
+        request.finish()
+        # Remove this client from request list
+        self.remove_request(request)
+        if len(self.requests) == 0:
+            Fetcher.apEnd(self)
+
+class FetcherHttp(Fetcher, http.HTTPClient):
+
+    forward_headers = [
+        'last-modified',
+        'content-length'
+        ]
+    log_headers = None
+
+    proxy_host = None
+    proxy_port = None
+
+    def activate(self, request):
+        Fetcher.activate(self, request)
+
+        if not self.factory.config.http_proxy is '':
+            (self.proxy_host, self.proxy_port) = request.factory.config.http_proxy.split(':')
+
+        if not request.apFetcher:
+            return
+
+        class ClientFactory(protocol.ClientFactory):
+            "Dummy ClientFactory to comply with current twisted API"
+	    #FIXME: Double check this, haggai thinks it is to blame for the
+	    #hangs.
+            def __init__(self, instance):
+                self.instance = instance
+            def buildProtocol(self, addr):
+                return self.instance
+            def clientConnectionFailed(self, connector, reason):
+                self.instance.connectionFailed(reason)
+            def clientConnectionLost(self, connector, reason):
+                log.debug("XXX clientConnectionLost", "http-client")
+
+        if not self.proxy_host:
+            reactor.connectTCP(request.backendServer.host, request.backendServer.port,
+                               ClientFactory(self), request.backend.config.timeout)
+        else:
+            reactor.connectTCP(self.proxy_host, int(self.proxy_port),
+                               ClientFactory(self), request.backend.config.timeout)
+    def connectionMade(self):
+        if not self.proxy_host:
+            self.sendCommand(self.request.method, self.request.backendServer.path
+                             + "/" + self.request.backend_uri)
+        else:
+            self.sendCommand(self.request.method, "http://"
+                             + self.request.backendServer.host + ":" + str(self.request.backendServer.port)
+                             + "/" + self.request.backendServer.path
+                             + "/" + self.request.backend_uri)
+            
+        self.sendHeader('host', self.request.backendServer.host)
+
+        if self.local_mtime != None:
+            datetime = http.datetimeToString(self.local_mtime)
+            self.sendHeader('if-modified-since', datetime)
+
+        self.endHeaders()
+
+    def handleStatus(self, version, code, message):
+        __pychecker__ = 'unusednames=version,message'
+        log.debug('handleStatus %s - %s' % (code, message), 'http_client')
+        self.status_code = int(code)
+        
+        # Keep a record of server response even if overriden later by setReponseCode
+        self.http_status = self.status_code  
+
+        self.setResponseCode(self.status_code)
+        
+    def handleHeader(self, key, value):
+
+        log.debug("Received: " + key + " " + str(value))
+        key = string.lower(key)
+
+        if key == 'last-modified':
+            self.local_mtime = http.stringToDatetime(value)
+
+        if key in self.forward_headers:
+            self.setResponseHeader(key, value)
+
+    def handleEndHeaders(self):
+        if self.http_status == http.NOT_MODIFIED:
+            log.debug("NOT_MODIFIED " + str(self.status_code),'http_client')
+            self.apEndCached()
+
+    def rawDataReceived(self, data):
+        self.apDataReceived(data)
+
+    def handleResponse(self, buffer):
+        if self.length == 0:
+            self.setResponseCode(http.NOT_FOUND)
+        # print "length: " + str(self.length), "response:", self.status_code
+        if self.http_status == http.NOT_MODIFIED:
+            self.apDataEnd(self.transfered, False)
+        else:
+            self.apDataEnd(self.transfered, True)
+
+    def lineReceived(self, line):
+        """
+        log the line and handle it to the appropriate the base classe.
+        
+        The location header gave me trouble at some point, so I filter it just
+        in case.
+
+        Note: when running a class method directly and not from an object you
+        have to give the 'self' parameter manualy.
+        """
+        #log.debug(line,'http_client')
+        if self.log_headers == None:
+            self.log_headers = line
+        else:
+            self.log_headers += ", " + line;
+        if not re.search('^Location:', line):
+            http.HTTPClient.lineReceived(self, line)
+
+    def sendCommand(self, command, path):
+        "log the line and handle it to the base class."
+        log.debug(command + ":" + path,'http_client')
+        http.HTTPClient.sendCommand(self, command, path)
+
+    def endHeaders(self):
+        "log and handle to the base class."
+        if self.log_headers != None:
+            log.debug(" Headers: " + self.log_headers, 'http_client')
+            self.log_headers = None;
+        http.HTTPClient.endHeaders(self)
+
+    def sendHeader(self, name, value):
+        "log and handle to the base class."
+        log.debug(name + ":" + value,'http_client')
+        http.HTTPClient.sendHeader(self, name, value)
+
+class FetcherFtp(Fetcher, protocol.Protocol):
+    """
+    This is the secuence here:
+
+        -Start and connect the FTPClient
+        -Ask for mtime
+        -Ask for size
+        -if couldn't get the size
+            -try to get it by listing
+        -get all that juicy data
+        
+    NOTE: Twisted's FTPClient code uses it's own timeouts here and there,
+    so the timeout specified for the backend may not always be used
+    """
+    def activate (self, request):
+        Fetcher.activate(self, request)
+        if not request.apFetcher:
+            return
+
+        self.passive_ftp = self.request.backend.config.passive_ftp
+        
+        self.remote_file = (self.request.backendServer.path + "/" 
+                            + self.request.backend_uri)
+
+        from twisted.internet.protocol import ClientCreator
+
+        if not request.backendServer.username:
+            creator = ClientCreator(reactor, ftp.FTPClient, passive=0)
+        else:
+            creator = ClientCreator(reactor, ftp.FTPClient, request.backendServer.username,
+                                    request.backendServer.password, passive=0)
+        d = creator.connectTCP(request.backendServer.host, request.backendServer.port,
+                               request.backend.config.timeout)
+        d.addCallback(self.controlConnectionMade)
+        d.addErrback(self.connectionFailed)
+
+    def controlConnectionMade(self, ftpclient):
+        self.ftpclient = ftpclient
+        
+        if(self.passive_ftp):
+            log.debug('Got control connection, using passive ftp', 'ftp_client')
+            self.ftpclient.passive = 1
+        else:
+            log.debug('Got control connection, using active ftp', 'ftp_client')
+            self.ftpclient.passive = 0
+
+        if log.isEnabled('ftp_client'):
+            self.ftpclient.debug = 1
+
+        self.ftpFetchMtime()
+
+    def ftpFinish(self, code, message=None):
+        "Finish the transfer with code 'code'"
+        self.ftpclient.quit()
+        self.setResponseCode(code, message)
+        self.apDataReceived("")
+        self.apDataEnd(self.transfered)
+
+    def ftpFinishCached(self):
+        "Finish the transfer giving the requests the cached file."
+        self.ftpclient.quit()
+        self.apEndCached()
+
+    def ftpFetchMtime(self):
+        "Get the modification time from the server."
+        def apFtpMtimeFinish(msgs, fetcher, fail):
+            """
+            Got an answer to the mtime request.
+            
+            Someone should check that this is timezone independent.
+            """
+            code = None
+            if not fail:
+                code, msg = msgs[0].split()
+            mtime = None
+            if code == '213':
+                time_tuple=time.strptime(msg[:14], "%Y%m%d%H%M%S")
+                #replace day light savings with -1 (current)
+                time_tuple = time_tuple[:8] + (-1,)
+                #correct the result to GMT
+                mtime = time.mktime(time_tuple) - time.altzone
+            if (fetcher.local_mtime and mtime
+                and fetcher.local_mtime >= mtime):
+                fetcher.ftpFinishCached()
+            else:
+                fetcher.local_mtime = mtime
+                fetcher.ftpFetchSize()
+
+        d = self.ftpclient.queueStringCommand('MDTM ' + self.remote_file)
+        d.addCallbacks(apFtpMtimeFinish, apFtpMtimeFinish,
+                       (self, 0), None, (self, 1), None)
+
+    def ftpFetchSize(self):
+        "Get the size of the file from the server"
+        def apFtpSizeFinish(msgs, fetcher, fail):
+            code = None
+            if not fail:
+                code, msg = msgs[0].split()
+            if code != '213':
+                log.debug("SIZE FAILED",'ftp_client')
+                fetcher.ftpFetchList()
+            else:
+                fetcher.setResponseHeader('content-length', msg)
+                fetcher.ftpFetchFile()
+
+        d = self.ftpclient.queueStringCommand('SIZE ' + self.remote_file)
+        d.addCallbacks(apFtpSizeFinish, apFtpSizeFinish,
+                       (self, 0), None, (self, 1), None)
+
+    def ftpFetchList(self):
+        "If ftpFetchSize didn't work try to get the size with a list command."
+        def apFtpListFinish(msg, filelist, fetcher, fail):
+            __pychecker__ = 'unusednames=msg'
+            if fail:
+                fetcher.ftpFinish(http.INTERNAL_SERVER_ERROR)
+                return
+            if len(filelist.files)== 0:
+                fetcher.ftpFinish(http.NOT_FOUND)
+                return
+            file = filelist.files[0]
+            fetcher.setResponseHeader('content-length', file['size'])
+            fetcher.ftpFetchFile()
+        filelist = ftp.FTPFileListProtocol()
+        d = self.ftpclient.list(self.remote_file, filelist)
+        d.addCallbacks(apFtpListFinish, apFtpListFinish,
+                       (filelist, self, 0), None,
+                       (filelist, self, 1), None)
+
+    def ftpFetchFile(self):
+        "And finally, we ask for the file."
+        def apFtpFetchFinish(msg, code, status, fetcher):
+            __pychecker__ = 'unusednames=msg,status'
+            fetcher.ftpFinish(code)
+        log.debug('ftpFetchFile: ' + self.remote_file, 'ftp_client')
+        d = self.ftpclient.retrieveFile(self.remote_file, self)
+        d.addCallbacks(apFtpFetchFinish, apFtpFetchFinish,
+                       (http.OK, "good", self), None,
+                       (http.NOT_FOUND, "fail", self), None)
+
+    def dataReceived(self, data):
+        self.setResponseCode(http.OK)
+        self.apDataReceived(data)
+
+    def connectionLost(self, reason=None):
+        """
+        Maybe we should do some recovery here, I don't know, but the Deferred
+        should be enough.
+        """
+        log.debug("lost connection: %s"%(reason),'ftp_client')
+
+class FetcherGzip(Fetcher, protocol.ProcessProtocol):
+    """
+    This is a fake Fetcher, it uses the real Fetcher from the request's
+    backend via LoopbackRequest to get the data and gzip's or gunzip's as
+    needed.
+
+    NOTE: We use the serve_cached=0 parameter to Request.fetch so if
+    it is cached it doesn't get uselessly read, we just get it from the cache.
+    """
+    post_convert = re.compile(r"^Should not match anything$")
+    gzip_convert = post_convert
+
+    exe = '/bin/gzip'
+    def activate(self, request, postconverting=0):
+        log.debug("FetcherGzip request:" + str(request.uri) + " postconvert:" + str(postconverting), 'gzip')
+        Fetcher.activate(self, request)
+        if not request.apFetcher:
+            return
+
+        self.args = (self.exe, '-c', '-9', '-n')
+        if(log.isEnabled('gzip',9)):
+            self.args += ('-v',)
+
+        if request.uri[-3:] == '.gz':
+            host_uri = request.uri[:-3]
+        else:
+            host_uri = request.uri+'.gz'
+            self.args += ('-d',)
+        self.host_file = self.factory.config.cache_dir + host_uri
+        self.args += (self.host_file,)
+
+        running = self.factory.runningFetchers
+        if not postconverting or running.has_key(host_uri):
+            #Make sure that the file is there
+            loop = LoopbackRequest(request, self.host_transfer_done)
+            loop.uri = host_uri
+            loop.local_file = self.host_file
+            loop.process()
+            self.loop_req = loop
+            loop.serve_if_cached=0
+            if running.has_key(host_uri):
+                #the file is on it's way, wait for it.
+                running[host_uri].insert_request(loop)
+            else:
+                #we are not postconverting, so we need to fetch the host file.
+                loop.fetch(serve_cached=0)
+        else:
+            #The file should be there already.
+            self.loop_req = None
+            self.host_transfer_done()
+
+    def host_transfer_done(self):
+        """
+        Called by our LoopbackRequest when the real Fetcher calls
+        finish() on it.
+
+        If everything went well, check mtimes and only do the work if needed.
+
+        If posible arrange things so the target file gets the same mtime as
+        the host file.
+        """
+        log.debug('transfer done', 'gzip')
+        if self.loop_req and self.loop_req.code != http.OK:
+            self.setResponseCode(self.loop_req.code,
+                                 self.loop_req.code_message)
+            self.apDataReceived("")
+            self.apDataEnd("")
+            return
+
+        if os.path.exists(self.host_file):
+            self.local_mtime = os.stat(self.host_file)[stat.ST_MTIME]
+        old_mtime = None
+        if os.path.exists(self.local_file):
+            old_mtime = os.stat(self.local_file)[stat.ST_MTIME]
+        if self.local_mtime == old_mtime:
+            self.apEndCached()
+        else:
+            log.debug("Starting process: " + self.exe + " " + str(self.args), 'gzip')
+            self.process = reactor.spawnProcess(self, self.exe, self.args)
+
+    def outReceived(self, data):
+        self.setResponseCode(http.OK)
+        self.apDataReceived(data)
+
+    def errReceived(self, data):
+        log.debug('gzip: ' + data,'gzip')
+
+    def loseConnection(self):
+        """
+        This is a bad workaround Process.loseConnection not doing it's
+        job right.
+        The problem only happends when we try to finish the process
+        while decompresing.
+        """
+        if hasattr(self, 'process') and self.process.pid:
+            try:
+                os.kill(self.process.pid, signal.SIGTERM)
+                self.process.connectionLost()
+            except exceptions.OSError, Error:
+                import errno
+                (Errno, Errstr) = Error
+                if Errno != errno.ESRCH:
+                    log.debug('Passing OSError exception '+Errstr)
+                    raise 
+                else:
+                    log.debug('Threw away exception OSError no such process')
+
+    def processEnded(self, reason=None):
+        __pychecker__ = 'unusednames=reason'
+        log.debug("Status: %d" %(self.process.status),'gzip')
+        if self.process.status != 0:
+            self.setResponseCode(http.NOT_FOUND)
+
+        self.apDataReceived("")
+        self.apDataEnd(self.transfered)
+
+class FetcherRsync(Fetcher, protocol.ProcessProtocol):
+    """
+    I frequently am not called directly, Request.fetch makes the
+    arrangement for FetcherGzip to use us and gzip the result if needed.
+    """
+    post_convert = re.compile(r"^Should not match anything$")
+    gzip_convert = re.compile(r"/Packages.gz$")
+    
+    "Temporary filename that rsync streams to"
+    rsyncTempFile = None
+    
+    "Number of bytes sent to client already"
+    bytes_sent = 0
+
+    def activate (self, request):
+        Fetcher.activate(self, request)
+        if not request.apFetcher:
+            return
+
+        # Change /path/to/FILE -> /path/to/.FILE.* to match rsync tempfile
+        self.globpattern = re.sub(r'/([^/]*)$', r'/.\1.*', self.local_file)
+        
+        for file in glob.glob(self.globpattern):
+          log.msg('Deleting stale tempfile:' + file)
+          unlink(file)
+                
+        uri = 'rsync://'+request.backendServer.host\
+              +request.backendServer.path+'/'+request.backend_uri
+        self.local_dir=re.sub(r"/[^/]*$", "", self.local_file)+'/'
+
+        exe = '/usr/bin/rsync'
+        if(log.isEnabled('rsync',9)):
+            args = (exe, '--partial', '--progress', '--verbose', '--times',
+                    '--timeout', "%d"%(request.backend.config.timeout),
+                    uri, '.',)
+        else:
+            args = (exe, '--quiet', '--times', uri, '.',
+                    '--timeout',  "%d"%(request.backend.config.timeout),
+                    )
+        if(not os.path.exists(self.local_dir)):
+            os.makedirs(self.local_dir)
+        self.process = reactor.spawnProcess(self, exe, args, None,
+                                            self.local_dir)
+
+    def findRsyncTempFile(self):
+        """
+        Look for temporary file created by rsync during streaming
+        """
+        files = glob.glob(self.globpattern)
+        
+        if len(files)==1:
+            self.rsyncTempFile = files[0]
+            log.debug('tempfile: ' + self.rsyncTempFile, 'rsync_client')
+        elif not files:
+            # No file created yet
+            pass
+        else:
+            log.err('found more than one tempfile, abort rsync')
+            self.transport.loseConnection()
+             
+    def connectionMade(self):
+        pass
+
+    "Data received from rsync process to stdout"
+    def outReceived(self, data):
+        for s in string.split(data, '\n'):
+            if len(s):
+                log.debug('rsync: ' + s, 'rsync_client')
+        #self.apDataReceived(data)
+        if not self.rsyncTempFile:
+            self.findRsyncTempFile()
+            # Got tempfile?
+            if self.rsyncTempFile:
+                self.setResponseCode(http.OK)
+        if self.rsyncTempFile:
+            self.sendData()
+
+
+    "Data received from rsync process to stderr"
+    def errReceived(self, data):
+        for s in string.split(data, '\n'):
+            if len(s):
+                log.err('rsync error: ' + s, 'rsync_client')
+
+    def sendData(self):
+        f = None
+        if self.rsyncTempFile:
+            try:
+                f = open(self.rsyncTempFile, 'rb')
+            except IOError:
+                return
+        else:
+            # Tempfile has gone, stream main file
+            #log.debug("sendData open dest " + str(self.bytes_sent))
+            f = open(self.local_file, 'rb')
+            
+        if f:
+            f.seek(self.bytes_sent)
+            data = f.read(abstract.FileDescriptor.bufferSize)
+            #log.debug("sendData got " + str(len(data)))
+            f.close()
+            if data:
+                self.apDataReceived(data)
+                self.bytes_sent = self.bytes_sent + len(data)
+                reactor.callLater(0, self.sendData)
+            elif not self.rsyncTempFile:
+                # Finished reading final file
+                #self.transport = None
+                log.debug("sendData complete")
+                # Tell clients, but data is already saved by rsync so don't
+                # write file again
+                self.apDataEnd(self.transfered, False)
+                
+        
+    def processEnded(self, status_object):
+        __pychecker__ = 'unusednames=reason'
+        log.debug("Status: %d" %(status_object.value.exitCode)
+                  ,'rsync_client')
+        self.rsyncTempFile = None
+        
+        # Success?
+        exitcode = status_object.value.exitCode
+        
+        if exitcode == 0:
+            # File received.  Send to clients.
+            self.local_mtime = os.stat(self.local_file)[stat.ST_MTIME]
+            reactor.callLater(0, self.sendData)
+        else:
+            if exitcode == 10:
+                # Host not found
+                self.setResponseCode(http.INTERNAL_SERVER_ERROR)
+            else:
+                self.setResponseCode(http.NOT_FOUND)
+                
+            if not os.path.exists(self.local_file):
+                try:
+                    os.removedirs(self.local_dir)
+                except:
+                    pass
+            self.apDataReceived("")
+            self.apDataEnd(self.transfered)
+
+    def loseConnection(self):
+        "Kill rsync process"
+        if self.transport:
+            if self.transport.pid:
+                log.debug("killing rsync child" + 
+                          str(self.transport.pid), 'rsync_client')
+                os.kill(self.transport.pid, signal.SIGTERM)
+            #self.transport.loseConnection()
+        
+        
+
+class FetcherCachedFile(Fetcher):
+    """
+    Sends the cached file or tells the client that the file was not
+    'modified-since' if appropriate.
+    """
+    post_convert = re.compile(r"/Packages.gz$")
+    gzip_convert = re.compile(r"^Should not match anything$")
+
+    request = None
+    def if_modified(self, request):
+        """
+        Check if the file was 'modified-since' and tell the client if it
+        wasn't.
+        """
+        if_modified_since = request.getHeader('if-modified-since')
+        if if_modified_since != None:
+            if_modified_since = http.stringToDatetime(
+                    if_modified_since)
+
+        if request.local_mtime <= if_modified_since:
+            request.setResponseCode(http.NOT_MODIFIED)
+            request.setHeader("Content-Length", 0)
+            request.write("")
+            request.finish()
+            self.remove_request(request)
+        
+    def insert_request(self, request):
+        if not request.serve_if_cached:
+            request.finish()
+            return
+        Fetcher.insert_request(self, request)
+        
+        log.debug("Serving from cache for additional client: " + self.local_file + " size:" + str(self.size))
+        self.start_transfer(request)
+        
+    def activate(self, request):
+        Fetcher.activate(self, request)
+        if not request.apFetcher:
+            return
+        self.factory.file_served(request.uri)
+        self.size = request.local_size
+        
+        self.start_transfer(request)
+        
+    def start_transfer(self, request):
+        self.if_modified(request)
+        
+        if len(self.requests) == 0:
+            #we had a single request and didn't have to send it
+            self.apEnd()
+            return
+
+        if self.size:
+            log.debug("Serving from cache: " + self.local_file + " size:" + str(self.size), 'FetcherCachedFile')
+            file = open(self.local_file,'rb')
+            fcntl.lockf(file.fileno(), fcntl.LOCK_SH)
+            
+            request.setHeader("Content-Length", request.local_size)
+            request.setHeader("Last-modified",
+                            http.datetimeToString(request.local_mtime))
+            basic.FileSender().beginFileTransfer(file, request) \
+                            .addBoth(self.file_transfer_complete, request) \
+                            .addBoth(lambda r: file.close())
+#                            .addBoth(lambda r: request.transport.loseConnection())
+        else:
+            log.debug("Zero length file! " + self.local_file, 'FetcherCachedFile')
+            self.file_transfer_complete(None, request)
+            request.finish()
+
+    # A file transfer has completed
+    def file_transfer_complete(self, result, request):
+        log.debug("transfer complete", 'FetcherCachedFile')
+        request.finish()
+        # Remove this client from request list
+        self.remove_request(request)
+        if len(self.requests) == 0:
+            Fetcher.apEnd(self)
+                                         
+class Backend:
+    """
+    A backend repository.  There is one Backend for each [...] section
+    in apt-proxy.conf
+    """
+
+    "Sequence of BackendServers, in order of preference"
+    uris = []
+
+    "Packages database for this backend"
+    packages = None
+    base = None
+
+    def __init__(self, factory, config):
+        self.factory = factory
+        self.config = config # apBackendConfig configuration information
+        self.base = config.name # Name of backend
+        self.uris=[]
+
+        for uri in config.backends:
+            self.addURI(uri)
+        #self.get_packages_db().load()
+
+    def addURI(self, uri):
+        newBackend = BackendServer(self, uri)
+        self.uris.append(newBackend)
+
+    def get_first_server(self): 
+        "Provide first BackendServer for this Backend"
+        return self.uris[0]
+
+    def get_next_server(self, previous_server):
+        "Return next server, or None if this is the last server"
+        oldServerIdx = self.uris.index(previous_server)
+        if(oldServerIdx+1 >= len(self.uris)):
+            return None
+        return self.uris[oldServerIdx+1]
+
+    def __str__(self):
+        return '('+self.base+')'+' servers:'+str(len(self.uris))
+
+    def get_packages_db(self):
+        "Return packages parser object for the backend, creating one if necessary"
+        if self.packages == None:
+            self.packages = packages.AptPackages(self.base, self.factory.config.cache_dir)
+        return self.packages
+
+    def get_path(self, path):
+        """
+        'path' is the original uri of the request.
+        
+        We return the path to be appended to the backend path to
+        request the file from the backend server
+        """
+        return path[len(self.base)+2:]
+        
+class BackendServer:
+    """
+    A repository server.  A BackendServer is created for each URI defined in 'backends'
+    for a Backend
+    """
+    
+    backend = None        # Backend for this URI
+    uri = None            # URI of server
+
+    fetchers = {
+        'http' : FetcherHttp,
+        'ftp'  : FetcherFtp,
+        'rsync': FetcherRsync,
+        'file' : FetcherFile,
+        }
+    ports = {
+        'http' : 80,
+        'ftp'  : 21,
+        'rsync': 873,
+        'file' : 0,
+        }
+    
+    def __init__(self, backend, uri):
+        self.backend = backend
+        self.uri = uri
+        log.debug("Created new BackendServer: " + uri)
+
+        # hack because urlparse doesn't support rsync
+        if uri[0:5] == 'rsync':
+            uri = 'http'+uri[5:]
+            is_rsync=1
+        else:
+            is_rsync=0
+
+        self.scheme, netloc, self.path, parameters, \
+                     query, fragment = urlparse.urlparse(uri)
+
+        if '@' in netloc:
+            auth = netloc[:netloc.rindex('@')]
+            netloc = netloc[netloc.rindex('@'):]
+            self.username, self.password = auth.split(':')
+        else:
+            self.username = None
+        if ':' in netloc:
+            self.host, self.port = netloc.split(':')
+        else:
+            self.host = netloc
+            self.port = self.ports[self.scheme]
+        if is_rsync:
+            self.scheme = 'rsync'
+        self.fetcher = self.fetchers[self.scheme]
+        try:
+            self.port = int(self.port)
+        except ValueError:
+            pass 
+
+    def __str__(self):
+        return ('(' + self.backend.base + ') ' + self.scheme + '://' +
+               self.host + ':' + str(self.port))
+              
+class Request(http.Request):
+    """
+    Each new request from connected clients generates a new instance of this
+    class, and process() is called.
+    """
+    local_mtime = None
+    local_size = None
+    serve_if_cached = 1
+    apFetcher = None
+    uriIndex = 0             # Index of backend URI
+    backend = None           # Backend for this request
+    backendServer = None     # Current server to be tried
+    
+    def __init__(self, channel, queued):
+        self.factory=channel.factory
+        http.Request.__init__(self, channel, queued)
+
+    def process(self):
+        """
+        Each new request begins processing here
+        """
+        log.debug("Request: " + self.method + " " + self.uri);
+        # Clean up URL
+        self.uri = self.simplify_path(self.uri)
+
+        self.local_file = self.factory.config.cache_dir + self.uri
+        backendName = self.uri[1:].split('/')[0]
+        log.debug("Request: %s %s backend=%s local_file=%s"%(self.method, self.uri, backendName, self.local_file))
+
+        if self.factory.config.disable_pipelining:
+            self.setHeader('Connection','close')
+            self.channel.persistent = 0
+
+        if self.method != 'GET':
+            #we currently only support GET
+            log.debug("abort - method not implemented")
+            self.finishCode(http.NOT_IMPLEMENTED)
+            return
+
+        if re.search('/\.\./', self.uri):
+            log.debug("/../ in simplified uri ("+self.uri+")")
+            self.finishCode(http.FORBIDDEN)
+            return
+
+        self.backend = self.factory.getBackend(backendName)
+        if self.backend is None:
+            if not self.factory.config.dynamic_backends:
+                log.debug("abort - non existent Backend")
+                self.finishCode(http.NOT_FOUND, "NON-EXISTENT BACKEND")
+                return
+
+            # We are using dynamic backends so we will use the name as
+            # the hostname to get the files.
+            backendName = self.uri[1:].split('/')[0]
+            backendServer = "http://" + backendName
+            log.debug("Adding " + backendName + " backend dynamicaly")
+            backendConfig = self.factory.config.addBackend(None, backendName, (backendServer,))
+            self.backend = Backend(self.factory, backendConfig)
+        self.backend_uri = self.backend.get_path(self.uri)
+
+        log.debug("backend: %s %s" % (self.backend.base, self.backend.uris))
+        self.backendServer = self.backend.get_first_server()
+        self.filetype = findFileType(self.uri)
+
+        if not self.filetype:
+            log.debug("abort - unknown extension")
+            self.finishCode(http.NOT_FOUND)
+            return
+
+        self.setHeader('content-type', self.filetype.contype)
+
+        if os.path.isdir(self.local_file):
+            log.debug("abort - Directory listing not allowed")
+            self.finishCode(http.FORBIDDEN)
+            return
+
+        self.fetch()
+
+    def fetch(self, serve_cached=1):
+        """
+        Serve 'self' from cache or through the appropriate Fetcher
+        depending on the asociated backend.
+    
+        Use post_convert and gzip_convert regular expresions of the Fetcher
+        to gzip/gunzip file before and after download.
+    
+        'serve_cached': this is somewhat of a hack only useful for
+        LoopbackRequests (See LoopbackRequest class for more information).
+        """
+        def fetch_real(result, dummyFetcher, cached, running):
+            """
+            This is called after verifying if the file is properly cached.
+            
+            If 'cached' the requested file is properly cached.
+            If not 'cached' the requested file was not there, didn't pass the
+            integrity check or may be outdated.
+            """
+            __pychecker__ = 'unusednames=result'
+
+            if len(dummyFetcher.requests)==0:
+                #The request's are gone, the clients probably closed the
+                #conection
+                log.debug("THE REQUESTS ARE GONE (Clients closed conection)", 
+                          'fetch')
+                dummyFetcher.apEnd()
+                return
+
+
+            req = dummyFetcher.request
+
+            log.debug("cached: %s" % cached)
+            
+            if cached:
+                msg = ("Using cached copy of %s"
+                       %(dummyFetcher.request.local_file))
+                fetcher_class = FetcherCachedFile
+            else:
+                msg = ("Consulting server about %s"
+                       %(dummyFetcher.request.local_file))
+                fetcher_class = req.backendServer.fetcher
+
+            if fetcher_class.gzip_convert.search(req.uri):
+                msg = ("Using gzip/gunzip to get %s"
+                       %(dummyFetcher.request.local_file))
+                fetcher_class = FetcherGzip
+
+            log.debug(msg, 'fetch_real')
+            fetcher = dummyFetcher.apEndTransfer(fetcher_class)
+            if (fetcher and fetcher.post_convert.search(req.uri)
+                and not running.has_key(req.uri[:-3])):
+                log.debug("post converting: "+req.uri,'convert')
+                loop = LoopbackRequest(req)
+                loop.uri = req.uri[:-3]
+                loop.local_file = req.local_file[:-3]
+                loop.process()
+                loop.serve_if_cached=0
+                #FetcherGzip will attach as a request of the
+                #original Fetcher, efectively waiting for the
+                #original file if needed
+                gzip = FetcherGzip()
+                gzip.activate(loop, postconverting=1)
+
+        self.serve_if_cached = serve_cached
+        running = self.factory.runningFetchers
+        if (running.has_key(self.uri)):
+            #If we have an active fetcher just use that
+            log.debug("have active fetcher: "+self.uri,'client')
+            running[self.uri].insert_request(self)
+            return running[self.uri]
+        else:
+            #we make a FetcherDummy instance to hold other requests for the
+            #same file while the check is in process. We will transfer all
+            #the requests to a real fetcher when the check is done.
+            dummyFetcher = FetcherDummy(self)
+            #Standard Deferred practice
+            d = self.check_cached()
+            d.addCallbacks(fetch_real, fetch_real,
+                           (dummyFetcher, 1, running,), None,
+                           (dummyFetcher, 0, running,), None)
+            return None
+    
+    def simplify_path(self, old_path):
+        """
+        change //+ with /
+        change /directory/../ with /
+        More than three ocurrences of /../ together will not be
+        properly handled
+        
+        NOTE: os.path.normpath could probably be used here.
+        """
+        path = re.sub(r"//+", "/", old_path)
+        path = re.sub(r"/\./+", "/", path)
+        new_path = re.sub(r"/[^/]+/\.\./", "/", path)
+        while (new_path != path):
+            path = new_path
+            new_path = re.sub(r"/[^/]+/\.\./", "/", path)
+        if (new_path != old_path):
+            log.debug("simplified path from " + old_path + 
+                      " to " + new_path,'simplify_path')
+        return path
+
+    def finishCode(self, responseCode, message=None):
+        "Finish the request with an status code"
+        self.setResponseCode(responseCode, message)
+        self.write("")
+        self.finish()
+
+    def finish(self):
+        http.Request.finish(self)
+        if self.factory.config.disable_pipelining:
+            if hasattr(self.transport, 'loseConnection'):
+                self.transport.loseConnection()
+
+    def check_cached(self):
+        """
+        check the existence and ask for the integrity of the requested file and
+        return a Deferred to be trigered when we find out.
+        """
+        def file_ok(result, deferred, self):
+            """
+            called if FileVerifier has determined that the file is cached and
+            in good shape.
+
+            Now we check NOTE: The file may still be too old or not fresh
+            enough.
+            """
+            __pychecker__ = 'unusednames=result'
+            stat_tuple = os.stat(self.local_file)
+
+            self.local_mtime = stat_tuple[stat.ST_MTIME]
+            self.local_size = stat_tuple[stat.ST_SIZE]
+            log.debug("Modification time:" + 
+                      time.asctime(time.localtime(self.local_mtime)), 
+                      "file_ok")
+            update_times = self.factory.update_times
+
+            if update_times.has_key(self.uri): 
+                last_access = update_times[self.uri]
+                log.debug("last_access from db: " + 
+                          time.asctime(time.localtime(last_access)), 
+                          "file_ok")
+            else:
+                last_access = self.local_mtime
+
+
+            cur_time = time.time()
+            min_time = cur_time - self.factory.config.min_refresh_delay
+
+            if not self.filetype.mutable:
+                log.debug("file is immutable: "+self.local_file, 'file_ok')
+                deferred.callback(None)
+            elif last_access < min_time:
+                log.debug("file is too old: "+self.local_file, 'file_ok')
+                update_times[self.uri] = cur_time
+                deferred.errback()
+            else:
+                log.debug("file is ok: "+self.local_file, 'file_ok')
+                deferred.callback(None)
+
+        log.debug("check_cached: "+self.local_file, 'file_ok')
+        deferred = defer.Deferred()
+        if os.path.exists(self.local_file):
+            verifier = FileVerifier(self)
+            verifier.deferred.addCallbacks(file_ok, deferred.errback,
+                                           (deferred, self), None,
+                                           None, None)
+        else:
+            deferred.errback()
+        return deferred
+        
+    def connectionLost(self, reason=None):
+        """
+        The connection with the client was lost, remove this request from its
+        Fetcher.
+        """
+        __pychecker__ = 'unusednames=reason'
+        #If it is waiting for a file verification it may not have an
+        #apFetcher assigned
+        if self.apFetcher:
+            self.apFetcher.remove_request(self)
+        self.finish()
+
+    def activateNextBackendServer(self, fetcher):
+        """
+        The attempt to retrieve a file from the BackendServer failed.
+        Look for the next possible BackendServer and transfer requests to that
+        Returns true if another BackendServer was found
+        """
+        self.backendServer = self.backend.get_next_server(self.backendServer)
+        if(self.backendServer == None):
+            log.debug("no more Backends", "fetcher")
+            return False
+        
+        fetcher_class = self.backendServer.fetcher
+        log.debug('Trying next backendServer', 'fetcher')
+        fetcher.apEndTransfer(fetcher_class)
+        
+        return True
+        
+        
+class LoopbackRequest(Request):
+    """
+    This is just a fake Request so a Fetcher can attach to another
+    Fetcher and be notified when then transaction is completed.
+
+    Look at FetcherGzip for a sample.
+    """
+    __pychecker__ = 'no-callinit'
+    import cStringIO
+    local_mtime = None
+    headers = {}
+    content = cStringIO.StringIO()
+    
+    def __init__(self, other_req, finish=None):
+
+        self.finish_cb = finish
+        http.Request.__init__(self, None, 1)
+        self.backend = other_req.backend
+        self.factory = other_req.factory
+        self.filetype = other_req.filetype
+        self.method = other_req.method
+        self.clientproto = other_req.clientproto
+    def process(self):
+        self.backend_uri = self.backend.get_path(self.uri)
+    def write(self, data):
+        "We don't care for the data, just want to know then it is served."
+        pass
+    def finish(self):
+        "If he wanted to know, tell daddy that we are served."
+        if self.finish_cb:
+            self.finish_cb()
+        self.transport = None
+        pass
+
+class Channel(http.HTTPChannel):
+    """
+    This class encapsulates a channel (an HTTP socket connection with a single
+    client).
+
+    Each incoming request is passed to a new Request instance.
+    """
+    requestFactory = Request
+    log_headers = None
+
+    def headerReceived(self, line):
+        "log and pass over to the base class"
+        #log.debug("Header: " + line)
+        if self.log_headers == None:
+            self.log_headers = line
+        else:
+            self.log_headers += ", " + line
+        http.HTTPChannel.headerReceived(self, line)
+
+    def allContentReceived(self):
+        if self.log_headers != None:
+            log.debug("Headers: " + self.log_headers)
+            self.log_headers = None
+        http.HTTPChannel.allContentReceived(self)
+
+    def connectionLost(self, reason=None):
+        "If the connection is lost, notify all my requests"
+        __pychecker__ = 'unusednames=reason'
+        for req in self.requests:
+            req.connectionLost()
+        log.debug("Client connection closed")
+        if log.isEnabled('memleak'):
+            memleak.print_top_10()
+        #reactor.stop()   # use for shutting down apt-proxy when a client disconnects
+
+class Factory(protocol.ServerFactory):
+    """
+    This is the center of apt-proxy, it holds all configuration and global data
+    and gets attached everywhere.
+
+    Factory receives incoming client connections and creates a Channel for
+    each client request.
+
+    interesting attributes:
+
+    self.runningFetchers: a dictionary, uri/Fetcher pairs, that holds the
+    active Fetcher for that uri if any. If there is an active Fetcher for
+    a certain uri at a certain time the request is inserted into the Fetcher
+    found here instead of instanciating a new one.
+
+    Persisten dictionaries:
+    self.update_times: last time we checked the freashness of a certain file.
+    self.access_times: last time that a certain file was requested.
+    self.packages: all versions of a certain package name.
+    
+    """
+    databases=('update_times', 'access_times', 'packages')
+
+    def periodic(self):
+        "Called periodically as configured mainly to do mirror maintanace."
+        log.debug("Doing periodic cleaning up")
+        self.clean_old_files()
+        self.recycler.start()
+        log.debug("Periodic cleaning done")
+        if (self.config.cleanup_freq != None):
+            reactor.callLater(self.config.cleanup_freq, self.periodic)
+    def __del__(self):
+        for f in self.databases:
+            try:
+                if hasattr(self, f): 
+                    getattr(self, f).close()
+            except Exception:
+                pass
+    def __init__ (self, config):
+        self.runningFetchers = {}
+        self.backends = []
+        self.config = config
+
+    def __getattr__ (self, name):
+        def open_shelve(dbname):
+            from bsddb import db,dbshelve
+ 
+            shelve = dbshelve.DBShelf()
+            db_dir = self.config.cache_dir+'/'+status_dir+'/db'
+            if not os.path.exists(db_dir):
+                os.makedirs(db_dir)
+
+            filename = db_dir + '/' + dbname + '.db'
+            if os.path.exists(filename):
+                 try:
+                     log.debug('Verifying database: ' + filename)
+                     shelve.verify(filename)
+                 except:
+                     os.rename(filename, filename+'.error')
+                     log.msg(filename+' could not be opened, moved to '+filename+'.error','db', 1)
+                     log.msg('Recreating '+ filename,'db', 1)
+            try:
+               log.debug('Opening database ' + filename)
+               shelve = dbshelve.open(filename)
+
+            # Handle upgrade to new format included on 1.9.20.
+            except db.DBInvalidArgError:
+                log.msg('Upgrading from previous database format: %s' % filename + '.previous')
+                import bsddb.dbshelve
+                os.rename(filename, filename + '.previous')
+                previous_shelve = bsddb.dbshelve.open(filename + '.previous')
+                shelve = dbshelve.open(filename)
+
+                for k in previous_shelve.keys():
+                    shelve[k] = previous_shelve[k]
+                log.msg('Upgrade complete')
+                    
+            return shelve
+
+        if name == 'update_times':
+            self.update_times = open_shelve('update')
+            return self.update_times
+        elif name == 'access_times':
+            self.access_times = open_shelve('access')
+            return self.access_times
+        elif name == 'packages':
+            self.packages = open_shelve('packages')
+            return self.packages
+        else:
+            raise AttributeError(name)
+
+    def startFactory(self):
+        #start periodic updates
+        self.configurationChanged()
+        self.recycler = misc.MirrorRecycler(self, 1)
+        self.recycler.start()
+
+    def configurationChanged(self, oldconfig = None):
+        """
+        Configuration has changed - update backends and background processes
+        """
+        if oldconfig is not None:
+            for param in 'address', 'port', 'telnet_port', 'telnet_user', 'telnet_pass', 'cache_dir':
+                if getattr(self.config, param) != getattr(oldconfig, param):
+                    log.err('Configuration value %s has changed, ignored'%(param))
+                    log.err('You must restart apt-proxy for the change to take effect')
+                    setattr(self.config, param, getattr(oldconfig, param))
+
+        if self.config.cleanup_freq != None and (oldconfig is None or oldconfig.cleanup_freq == None):
+            reactor.callLater(self.config.cleanup_freq, self.periodic)
+        self.createBackends()
+
+    def createBackends(self):
+        self.backends = {}
+        for name, bconf in self.config.backends.items():
+            #print "[",name,"]"
+            self.backends[name] = Backend(self, bconf)
+
+    def getBackend(self, name):
+        """
+        Return backend with given name
+        @param name Name of backend as specified in [backendName] section in config file
+        @return Backend class, or None if not found
+        """
+        if self.backends.has_key(name):
+            return self.backends[name]
+        return None
+
+    def clean_versions(self, packages):
+        """
+        Remove entries for package versions which are not in cache, and delete
+        some files if needed to respect the max_versions configuration.
+
+        TODO: This must be properly done per distribution.
+        """
+        if self.config.max_versions == None:
+            #max_versions is disabled
+            return
+        package_name = None
+        cache_dir = self.config.cache_dir
+
+        cached_packages = []   # all packages in cache directory
+        current_packages = []  # packages referenced by Packages files
+
+        import apt_pkg
+        def reverse_compare(a, b):
+            """ Compare package versions in reverse order """
+            return apt_pkg.VersionCompare(b[0], a[0])
+
+        if len(packages) <= self.config.max_versions:
+            return
+
+        from packages import AptDpkgInfo, get_mirror_versions
+        for uri in packages[:]:
+            if not os.path.exists(cache_dir +'/'+ uri):
+                packages.remove(uri)
+            else:
+                try:
+                    info = AptDpkgInfo(cache_dir +'/'+ uri)
+                    cached_packages.append([info['Version'], uri])
+                    package_name = info['Package']
+                except SystemError:
+                    log.msg("Found problems with %s, aborted cleaning"%(uri),
+                            'max_versions')
+                    return
+
+        if len(info):
+            import apt_pkg
+            cached_packages.sort(reverse_compare)
+            log.debug(str(cached_packages), 'max_versions')
+
+            current_packages = get_mirror_versions(self, package_name)
+            current_packages.sort(reverse_compare)
+            log.debug("Current Versions: " + str(current_packages), 'max_versions')
+
+            version_count = 0
+
+            while len(cached_packages):
+                #print 'current:',len(current_packages),'cached:',len(cached_packages), 'count:', version_count
+                if len(current_packages):
+                    compare_result = apt_pkg.VersionCompare(current_packages[0][0], cached_packages[0][0])
+                    #print 'compare_result %s , %s = %s ' % (
+                    #              current_packages[0][0], cached_packages[0][0], compare_result)
+                else:
+                    compare_result = -1
+
+                if compare_result >= 0:
+                    log.debug("reset at "+ current_packages[0][1], 'max_versions')
+                    del current_packages[0]
+                    version_count = 0
+                else:
+                    version_count += 1
+                    if version_count > self.config.max_versions:
+                        log.msg("Deleting " + cache_dir +'/'+ cached_packages[0][1], 'max_versions')
+                        os.unlink(cache_dir +'/'+ cached_packages[0][1])
+                    del cached_packages[0]
+
+    def clean_old_files(self):
+        """
+        Remove files which haven't been accessed for more than 'max_age' and
+        all entries for files which are no longer there.
+        """
+        if self.config.max_age == None:
+            #old file cleaning is disabled
+            return
+        cache_dir = self.config.cache_dir
+        files = self.access_times.keys()
+        min_time = time.time() - self.config.max_age
+
+        for file in files:
+            local_file = cache_dir + '/' + file
+            if not os.path.exists(local_file):
+                log.debug("old_file: non-existent "+file)
+                del self.access_times[file]
+            elif self.access_times[file] < min_time:
+                log.debug("old_file: removing "+file)
+                os.unlink(local_file)
+                del self.access_times[file]
+
+        #since we are at it, clear update times for non existent files
+        files = self.update_times.keys()
+        for file in files:
+            if not os.path.exists(cache_dir+'/'+file):
+                log.debug("old_file: non-existent "+file)
+                del self.update_times[file]
+
+    def file_served(self, uri):
+        "Update the databases, this file has just been served."
+        self.access_times[uri]=time.time()
+        if re.search("\.deb$", uri):
+            package = re.sub("^.*/", "", uri)
+            package = re.sub("_.*$", "", package)
+            if not self.packages.has_key(package):
+                packages = [uri]
+                self.packages[package] = packages
+            else:
+                packages = self.packages[package]
+                if not uri in packages:
+                    packages.append(uri)
+                self.clean_versions(packages)
+                self.packages[package] = packages
+        self.dumpdbs()
+
+    def stopFactory(self):
+        import packages
+        self.dumpdbs()
+        self.update_times.close()
+        self.access_times.close()
+        self.packages.close()
+        packages.cleanup(self)
+
+    def dumpdbs (self):
+        def dump_update(key, value):
+            log.msg("%s: %s"%(key, time.ctime(value)),'db')
+        def dump_access(key, value):
+            log.msg("%s: %s"%(key, time.ctime(value)),'db')
+        def dump_packages(key, list):
+            log.msg("%s: "%(key),'db')
+            for file in list:
+                log.msg("\t%s"%(file),'db')
+        def dump(db, func):
+            keys = db.keys()
+            for key in keys:
+                func(key,db[key])
+        if log.isEnabled('db'):
+            log.msg("=========================",'db')
+            log.msg("Dumping update times",'db')
+            log.msg("=========================",'db')
+            dump(self.update_times, dump_update)
+            log.msg("=========================",'db')
+            log.msg("Dumping access times",'db')
+            log.msg("=========================",'db')
+            dump(self.access_times, dump_access)
+            log.msg("=========================",'db')
+            log.msg("Dumping packages",'db')
+            log.msg("=========================",'db')
+            dump(self.packages, dump_packages)
+
+
+    def buildProtocol(self, addr):
+        __pychecker__ = 'unusednames=addr'
+        proto = Channel()
+        proto.factory = self;
+        return proto
+
+    def log(self, request):
+        return
+
+    def debug(self, message):
+        log.debug(message)

Added: tags/1.9.33-0.1/apt_proxy/apt_proxy_conf.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/apt_proxy_conf.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,264 @@
+#
+# Copyright (C) 2002 Manuel Estrada Sainz <ranty at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+from apt_proxy import Backend
+from misc import log
+import os, sys
+from types import StringType, NoneType
+import urlparse
+from ConfigParser import RawConfigParser,DEFAULTSECT
+    
+class ConfigError(Exception):
+    def __init__(self, message):
+        self.message = message
+    def __str__(self):
+        return repr(self.message)
+
+class apConfigParser(RawConfigParser):
+    """
+    Adds 'gettime' to ConfigParser to interpret the suffixes.
+    Interprets 'disabled_keyword' as disabled (None).
+    """
+    time_multipliers={
+        's': 1,    #seconds
+        'm': 60,   #minutes
+        'h': 3600, #hours
+        'd': 86400,#days
+        }
+    DISABLED_KEYWORD = 'off'
+    def isOff(self, section, option):
+        value = self.get(section, option)
+        return value == self.DISABLED_KEYWORD
+
+    def getint(self, section, option):
+        value = self.get(section, option)
+        return int(value)
+    def gettime(self, section, option):
+        mult = 1
+        value = self.get(section, option)
+        suffix = value[-1].lower()
+        if suffix in self.time_multipliers.keys():
+            mult = self.time_multipliers[suffix]
+            value = value[:-1]
+        return int(value)*mult
+    def getstring(self, section, option):
+        return self.get(section,option)
+    def getstringlist(self, section, option):
+        return self.get(section,option).split()
+
+class apConfig:
+    """
+    Configuration module for apt-proxy
+    holds main configuration values in class and backend
+    configs in backends[backend-name]
+    """
+    
+    """
+    Configuration items for default section
+    [0] - name of config parameter and resulting class variable name
+    [1] - default value
+    [2] - getXXX method to use to read config.
+          A method prefixed with '*' will return None if disabled
+    """
+    CONFIG_ITEMS = [
+        ['address', '', 'string'],
+        ['port', 9999, 'int'],
+        ['min_refresh_delay', 30, 'time'],
+        ['complete_clientless_downloads', '0', 'boolean'],
+        ['telnet_port', 0, 'int'],
+        ['telnet_user', '', 'string'],
+        ['telnet_pass', '', 'string'],
+        ['timeout', 30, 'time'],
+        ['cleanup_freq', 600, '*time'],
+        ['cache_dir', '/var/cache/apt-proxy', 'string'],
+        ['max_versions', 3, '*int'],
+        ['max_age', 10, '*time'],
+        ['import_dir', '/var/cache/apt-proxy/import', 'string'],
+        ['disable_pipelining', '1', 'boolean'],
+        ['passive_ftp', 'on', 'boolean'],
+        ['dynamic_backends', 'on', 'boolean'],
+        ['http_proxy', '' , 'string'],
+        ['username', 'aptproxy', 'string']
+        ]
+
+    """
+    Configuration items for backends
+    [0] - name of config parameter and resulting class variable name
+    [1] - default value, None to use factory default
+    [2] - getXXX method to use to read config.
+          A method prefixed with '*' will return None if disabled
+    """
+    BACKEND_CONFIG_ITEMS = [
+        ['timeout', None, 'time'],
+        ['passive_ftp', None, 'boolean'],
+        ['backends', '', 'stringlist']
+        ]
+
+    DEFAULT_CONFIG_FILE = ['/etc/apt-proxy/apt-proxy-v2.conf',
+                            '/etc/apt-proxy/apt-proxy-2.conf',
+                            '/etc/apt-proxy/apt-proxy.conf']
+
+    "Backend configurations are held here"
+    backends = {}
+    parser = None
+    debugDomains = {}
+    debug = '0'
+    
+    def __init__(self, config_file = None):
+        """
+        Read configuration from specified source, or default config
+        file location if not specified
+
+        @param config_file Filename to read, or descriptor of already-open file
+        """
+        self.backends = {}
+        if type(config_file) is StringType or type(config_file) is NoneType:
+            c = self.readFromFile(config_file)
+        else:
+            c = self.readFromStream(config_file)
+
+        self.parseConfig(c)
+
+    def readFromFile(self, config_file):
+        """
+        Read configuration from filename given
+        @param config_file filename to read from, or None for default
+        """
+        conf = apConfigParser()
+
+        if config_file is not None:
+            config_files = config_file,
+        else:
+            config_files = self.DEFAULT_CONFIG_FILE
+
+        for f in config_files:
+            if os.path.exists(f):
+                conf.read(f)
+                break
+        else:
+            raise ConfigError("%s: Configuration file does not exist" % config_files[0])
+
+        return conf
+
+    def readFromStream(self, filehandle):
+        "Read from open file handle, for test suite"
+        conf = apConfigParser()
+        conf.readfp(filehandle)
+        filehandle.close()
+        return conf
+    
+    def setDebug(self, levels):
+        "Set logger debug level"
+        self.debug = levels
+        for domain in self.debug.split():
+            #print "domain:",domain
+            if domain.find(':') != -1:
+                name, level = domain.split(':')
+            else:
+                name, level = domain, 9
+            self.debugDomains[name] = int(level)
+        log.setDomains(self.debugDomains)
+
+    def parseConfig(self, config):
+        "Read values from apConfigParser config"
+
+        # debug setting
+        if config.has_option(DEFAULTSECT, 'debug'):
+            self.debug=config.get(DEFAULTSECT, 'debug')
+        else:
+            self.debug='all:3'
+        self.setDebug(self.debug)
+
+        # read default values
+        for name,default,getmethod in self.CONFIG_ITEMS:
+            value = self.parseConfigValue(config, DEFAULTSECT, name, default, getmethod)
+            setattr(self, name, value)
+            if value != default and name != "telnet_pass":
+                log.debug("config value %s=%s"%(name, value), 'config')
+
+        self.address = self.address.split(" ")
+
+        if not self.telnet_user or not self.telnet_pass:
+            self.telnet_port = 0  # No server if empty username or password
+
+        # Read backend configurations
+        for backendName in config.sections():
+            self.addBackend(config, backendName)
+
+    def addBackend(self, config, backendName, backendServers=None):
+        """
+        Add a new backend configuration
+        @param config Configuration file parser to get backend values from.  If None, backend is dynamic
+        @param backendName Name of backend to create
+        @param backendServers List of backend servers to use (if backend is dynamic)
+        @ret newly created apBackendConfig
+        """
+        if backendName.find('/') != -1:
+            log.msg("WARNING: backend %s contains '/' (ignored)"%(name))
+            return None
+
+        backend = apBackendConfig(backendName)
+        for paramName,default,getmethod in self.BACKEND_CONFIG_ITEMS:
+            if default is None:
+                default = getattr(self, paramName) # Use default section's default value
+            value = self.parseConfigValue(config, backendName, paramName, default, getmethod)
+            setattr(backend,paramName, value)
+            if value != default:
+                log.debug("[backend %s] %s=%s"%(backendName, paramName, value), 'config')
+
+        if backendServers is None:
+            backend.dynamic = False
+            backendServers = backend.backends
+        else:
+            # Dynamic backend
+            backend.dynamic = True
+
+        backend.backends = []
+        for server in backendServers:
+            if server[-1] == '/':
+                log.msg ("Removing unnecessary '/' at the end of %s"%(server))
+                server = server[0:-1]
+            if urlparse.urlparse(server)[0] in ['http', 'ftp', 'rsync', 'file']:
+                backend.backends.append(server)
+            else:
+                log.msg ("WARNING: Wrong server '%s' found in backend '%s'. It was skipped." % (server, backendName))
+                return None
+        if len(backend.backends) == 0:
+            log.msg("WARNING: [%s] has no backend servers (ignored)"%backendName)
+            return None
+
+        self.backends[backendName] = backend
+        return backend
+
+    def parseConfigValue(self, config, section, name, default, getmethod):
+        "Determine value of given config item"
+        if config is None or not config.has_option(section, name):
+            return default
+        if getmethod[0]=='*':
+            if config.isOff(section, name):
+                return None
+            else:
+                return getattr(config, 'get'+getmethod[1:])(section, name)
+        else:
+                return getattr(config, 'get'+getmethod)(section, name)
+
+class apBackendConfig:
+    """
+    Configuration information for an apt-proxy backend
+    """
+    name = "UNKNOWN"
+    def __init__(self, name):
+        self.name = name

Added: tags/1.9.33-0.1/apt_proxy/apt_proxytap.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/apt_proxytap.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,16 @@
+import apt_proxy
+from apt_proxy_conf import aptProxyFactoryConfig
+from apt_proxy import AptProxyFactory
+from twisted.internet.app import Application
+
+from twisted.python import usage        # twisted command-line processing
+
+class Options(usage.Options):
+    optParameters = [];
+
+def updateApplication(app, config):
+    factory = AptProxyFactory()
+    aptProxyFactoryConfig(factory)
+    app = Application("AptProxy")
+    app.listenTCP(factory.proxy_port, factory)
+

Added: tags/1.9.33-0.1/apt_proxy/memleak.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/memleak.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,28 @@
+import sys
+import types
+
+def get_refcounts():
+    d = {}
+    sys.modules
+    # collect all classes
+    for m in sys.modules.values():
+        for sym in dir(m):
+            o = getattr (m, sym)
+            if type(o) is types.ClassType:
+                d[o] = sys.getrefcount (o)
+    # sort by refcount
+    pairs = map (lambda x: (x[1],x[0]), d.items())
+    pairs.sort()
+    pairs.reverse()
+    return pairs
+
+def print_top_n(n):
+    print "Top %i:"%n
+    for n, c in get_refcounts()[:n]:
+        print '%10d %s' % (n, c.__name__)
+
+def print_top_100():
+    print_top_n(100)
+
+def print_top_10():
+    print_top_n(10)

Added: tags/1.9.33-0.1/apt_proxy/misc.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/misc.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,190 @@
+#
+# Copyright (C) 2002 Manuel Estrada Sainz <ranty at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os
+from twisted.internet import reactor
+from twisted import python
+
+class DomainLogger:
+    """
+    This class should help us classify messages into domains and levels.
+
+    This way we can select messages by kind and level.
+
+    You just have to set in the configuration file something like:
+
+        debug = db:3 import:8
+
+      Which means that we only want to see messages of domain 'db' and
+      level <= 3 and domain 'import' and level <= 8
+
+      There are three special domains:
+
+         all: if enabled all messages will be shown.
+         log: is on by default and only the level can be changed
+              it is meant for production logging.
+         debug: aptProxyConfig will define it if you select any loging
+                domains.
+
+    Pretended meaning of levels:
+       0: nothing or maybe critical information
+       1: important information
+       ...
+       9: useless information
+    """
+    def __init__(self, enabled={'all':9}):
+        self.enabled = enabled
+
+    def setDomains(self, domains):
+        self.enabled = domains
+
+    def addDomains(self, domains):
+        self.enabled.update(domains)
+        #print "enabled: ", self.enabled
+    def isEnabled(self, domain, level=9):
+        domains = self.enabled.keys()
+        if domain in domains and level > self.enabled[domain]:
+            return 0
+        if(('all' in domains and level <= self.enabled['all'])
+           or (domain in domains and level <= self.enabled[domain])):
+            return 1
+        else:
+            return 0
+
+    def msg(self, msg, domain='log', level=4):
+        "Logs 'msg' if domain and level are appropriate"
+        #print 'domain:', domain, 'level:', level
+        if self.isEnabled(domain, level):
+            try:
+                python.log.msg("[%s] %s"%(domain, msg))
+            except IOError:
+                pass
+    def debug(self, msg, domain='debug', level=9):
+        "Useful to save typing on new debuging messages"
+        if self.isEnabled(domain, level):
+            try:
+                python.log.msg("[%s] %s"%(domain, msg), debug=True)
+            except IOError:
+                pass
+    def err(self, msg, domain='error', level=9):
+        "Log an error message"
+        try:
+            python.log.err("[%s] %s"%(domain, msg))
+        except IOError:
+            pass
+        
+
+# Prevent log being replace on reload.  This only works in cpython.
+try:
+    log
+except NameError:
+    log = DomainLogger()
+
+
+
+class MirrorRecycler:
+    """
+    Reads the mirror tree looking for 'forgotten' files and adds them to
+    factory.access_times so they can age and be removed like the others.
+
+    It processes one directory entry per 'timer' seconds, which unless
+    set to 0 is very slow, but it is also very light weight. And files
+    which get recuested are recycled automatically anyway, so it is
+    not urgent to find forgotten files. If also uses the files oun
+    atime, so if the files has been there for a long time it will soon
+    be removed anyway.
+    
+    """
+    working = 0
+    
+    def __init__(self, factory, timer):
+        self.timer = timer
+        self.factory = factory
+    def start(self):
+        """
+        Starts the Recycler if it is not working, it will use
+        callLater to keep working until it finishes with the whole
+        tree.
+        """
+        if not self.working:
+            if self.factory.backends == []:
+                log.msg("NO BACKENDS FOUND",'recycle')
+                return
+            self.cur_uri = '/'
+            self.cur_dir = self.factory.config.cache_dir
+            self.pending = []
+            for backend in self.factory.backends.values():
+                 self.pending.append(backend.base)
+            self.stack = []
+            reactor.callLater(self.timer, self.process)
+            self.working = 1
+    def pop(self):
+        if self.stack:
+            (self.cur_dir, self.cur_uri, self.pending) = self.stack.pop()
+        else:
+            self.working = 0
+    def push(self):
+        if self.pending:
+            self.stack.append((self.cur_dir, self.cur_uri, self.pending))
+        
+    def process(self):
+        """
+        Process the next entry, is called automatically via callLater.
+        """
+        entry = self.pending.pop()
+        uri  = os.path.join(self.cur_uri, entry)
+        path = os.path.join(self.cur_dir, entry)
+        if not os.path.exists(path):
+            pass
+        elif os.path.isdir(path):
+            self.push()
+            self.cur_dir = path
+            self.cur_uri = uri
+            self.pending = os.listdir(self.cur_dir)
+            if not self.pending:
+                log.msg("Pruning empty directory: "+path,'recycle')
+                os.removedirs(path)
+        else:
+            if os.path.isfile(path):
+                #print "PATH:", path
+                #print "URI: ", uri
+                if not self.factory.access_times.has_key(uri):
+                    log.msg("Adopting new file: "+ uri,'recycle')
+                    self.factory.access_times[uri] = os.path.getatime(path)
+            else:
+                log.msg("UNKNOWN:"+path,'recycle')
+
+        if not self.pending:
+            self.pop()
+        if self.working:
+            reactor.callLater(self.timer, self.process)
+
+if __name__ == '__main__':
+    #Just for testing purposes.
+    from apt_proxy_conf import aptProxyFactoryConfig
+    import shelve
+    
+    class DummyFactory:
+        pass
+    factory = DummyFactory()
+    aptProxyFactoryConfig(factory)
+    factory.access_times=shelve.open("tmp.db")
+    recycle = MirrorRecycler(factory, 10)
+    recycle.start()
+    while recycle.working:
+        recycle.process()
+
+    factory.access_times.close()

Added: tags/1.9.33-0.1/apt_proxy/packages.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/packages.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,455 @@
+#
+# Copyright (C) 2002 Manuel Estrada Sainz <ranty at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import apt_pkg, apt_inst, sys, os, stat
+from os.path import dirname, basename
+import re, shelve, shutil, fcntl
+from twisted.internet import process
+import apt_proxy, copy, UserDict
+from misc import log
+
+aptpkg_dir='.apt-proxy'
+apt_pkg.InitSystem()
+
+class AptDpkgInfo(UserDict.UserDict):
+    """
+    Gets control fields from a .deb file.
+
+    And then behaves like a regular python dictionary.
+
+    See AptPackages.get_mirror_path
+    """
+
+    def __init__(self, filename):
+        UserDict.UserDict.__init__(self)
+        try:
+            filehandle = open(filename);
+            try:
+                self.control = apt_inst.debExtractControl(filehandle)
+            finally:
+                # Make sure that file is always closed.
+                filehandle.close()
+        except SystemError:
+            log.debug("Had problems reading: %s"%(filename), 'AptDpkgInfo')
+            raise
+        for line in self.control.split('\n'):
+            if line.find(': ') != -1:
+                key, value = line.split(': ', 1)
+                self.data[key] = value
+
+class PackageFileList:
+    """
+    Manages a list of package files belonging to a backend
+    """
+    def __init__(self, backendName, cache_dir):
+        self.cache_dir = cache_dir
+        packagedb_dir = cache_dir+'/'+ apt_proxy.status_dir + \
+                           '/backends/' + backendName
+        if not os.path.exists(packagedb_dir):
+            os.makedirs(packagedb_dir)
+        self.packages = shelve.open(packagedb_dir+'/packages.db')
+    def __del__(self):
+        try:
+            self.packages.close()
+        except:
+            pass
+
+    def update_file(self, uri):
+        """
+        Called from apt_proxy.py when files get updated so we can update our
+        fake lists/ directory and sources.list.
+
+        @param uri Filename of cached file (without cache_dir prefix)
+        """
+        if basename(uri)=="Packages" or basename(uri)=="Release":
+            log.msg("REGISTERING PACKAGE:"+uri,'apt_pkg',4)
+            stat_result = os.stat(self.cache_dir+'/'+uri)
+            self.packages[uri] = stat_result
+    def get_files(self):
+        """
+        Get list of files in database.  Each file will be checked that it exists
+        """
+        files = self.packages.keys()
+        #print self.packages.keys()
+        for f in files:
+            if not os.path.exists(self.cache_dir + '/' + f):
+                log.debug("File in packages database has been deleted: "+f, 'apt_pkg')
+                del files[files.index(f)]
+                del self.packages[f]
+        return files
+
+class AptPackages:
+    """
+    Uses AptPackagesServer to answer queries about packages.
+
+    Makes a fake configuration for python-apt for each backend.
+    """
+    DEFAULT_APT_CONFIG = {
+        #'APT' : '',
+        'APT::Architecture' : apt_pkg.CPU,
+        #'APT::Default-Release' : 'unstable',
+   
+        'Dir':'.', # /
+        'Dir::State' : 'apt/', # var/lib/apt/
+        'Dir::State::Lists': 'lists/', # lists/
+        #'Dir::State::cdroms' : 'cdroms.list',
+        'Dir::State::userstatus' : 'status.user',
+        'Dir::State::status': 'dpkg/status', # '/var/lib/dpkg/status'
+        'Dir::Cache' : '.apt/cache/', # var/cache/apt/
+        #'Dir::Cache::archives' : 'archives/',
+        'Dir::Cache::srcpkgcache' : 'srcpkgcache.bin',
+        'Dir::Cache::pkgcache' : 'pkgcache.bin',
+        'Dir::Etc' : 'apt/etc/', # etc/apt/
+        'Dir::Etc::sourcelist' : 'sources.list',
+        'Dir::Etc::vendorlist' : 'vendors.list',
+        'Dir::Etc::vendorparts' : 'vendors.list.d',
+        #'Dir::Etc::main' : 'apt.conf',
+        #'Dir::Etc::parts' : 'apt.conf.d',
+        #'Dir::Etc::preferences' : 'preferences',
+        'Dir::Bin' : '',
+        #'Dir::Bin::methods' : '', #'/usr/lib/apt/methods'
+        'Dir::Bin::dpkg' : '/usr/bin/dpkg',
+        #'DPkg' : '',
+        #'DPkg::Pre-Install-Pkgs' : '',
+        #'DPkg::Tools' : '',
+        #'DPkg::Tools::Options' : '',
+        #'DPkg::Tools::Options::/usr/bin/apt-listchanges' : '',
+        #'DPkg::Tools::Options::/usr/bin/apt-listchanges::Version' : '2',
+        #'DPkg::Post-Invoke' : '',
+        }
+    essential_dirs = ('apt', 'apt/cache', 'apt/dpkg', 'apt/etc', 'apt/lists',
+                      'apt/lists/partial')
+    essential_files = ('apt/dpkg/status', 'apt/etc/sources.list',)
+        
+    def __init__(self, backendName, cache_dir):
+        """
+        Construct new packages manager
+        backend: Name of backend associated with this packages file
+        cache_dir: cache directory from config file
+        """
+        self.backendName = backendName
+        self.cache_dir = cache_dir
+        self.apt_config = copy.deepcopy(self.DEFAULT_APT_CONFIG)
+
+        self.status_dir = (cache_dir+'/'+ aptpkg_dir
+                           +'/backends/'+backendName)
+        for dir in self.essential_dirs:
+            path = self.status_dir+'/'+dir
+            if not os.path.exists(path):
+                os.makedirs(path)
+        for file in self.essential_files:
+            path = self.status_dir+'/'+file
+            if not os.path.exists(path):
+                f = open(path,'w')
+                f.close()
+                del f
+                
+        self.apt_config['Dir'] = self.status_dir
+        self.apt_config['Dir::State::status'] = self.status_dir + '/apt/dpkg/status'
+        #os.system('find '+self.status_dir+' -ls ')
+        #print "status:"+self.apt_config['Dir::State::status']
+        self.packages = PackageFileList(backendName, cache_dir)
+        self.loaded = 0
+        #print "Loaded aptPackages [%s] %s " % (self.backendName, self.cache_dir)
+        
+    def __del__(self):
+        self.cleanup()
+        #print "start aptPackages [%s] %s " % (self.backendName, self.cache_dir)
+        del self.packages
+        #print "Deleted aptPackages [%s] %s " % (self.backendName, self.cache_dir)
+    def file_updated(self, uri):
+        """
+        A file in the backend has changed.  If this affects us, unload our apt database
+        """
+        if self.packages.update_file(uri):
+            self.unload()
+
+    def __save_stdout(self):
+        self.real_stdout_fd = os.dup(1)
+        os.close(1)
+                
+    def __restore_stdout(self):
+        os.dup2(self.real_stdout_fd, 1)
+        os.close(self.real_stdout_fd)
+        del self.real_stdout_fd
+
+    def load(self):
+        """
+        Regenerates the fake configuration and load the packages server.
+        """
+        if self.loaded: return True
+        apt_pkg.InitSystem()
+        #print "Load:", self.status_dir
+        shutil.rmtree(self.status_dir+'/apt/lists/')
+        os.makedirs(self.status_dir+'/apt/lists/partial')
+        sources_filename = self.status_dir+'/'+'apt/etc/sources.list'
+        sources = open(sources_filename, 'w')
+        sources_count = 0
+        for file in self.packages.get_files():
+            # we should probably clear old entries from self.packages and
+            # take into account the recorded mtime as optimization
+            filepath = self.cache_dir + file
+            fake_uri='http://apt-proxy/'+file
+            source_line='deb '+dirname(fake_uri)+'/ /'
+            listpath=(self.status_dir+'/apt/lists/'
+                    +apt_pkg.URItoFileName(fake_uri))
+            sources.write(source_line+'\n')
+            log.debug("Sources line: " + source_line, 'apt_pkg')
+            sources_count = sources_count + 1
+
+            try:
+                #we should empty the directory instead
+                os.unlink(listpath)
+            except:
+                pass
+            os.symlink('../../../../../'+file, listpath)
+        sources.close()
+
+        if sources_count == 0:
+            log.msg("No Packages files available for %s backend"%(self.backendName), 'apt_pkg')
+            return False
+
+        log.msg("Loading Packages database for "+self.status_dir,'apt_pkg')
+        #apt_pkg.Config = apt_pkg.newConfiguration(); #-- this causes unit tests to fail!
+        for key, value in self.apt_config.items():
+            apt_pkg.Config[key] = value
+#         print "apt_pkg config:"
+#         for I in apt_pkg.Config.keys():
+#            print "%s \"%s\";"%(I,apt_pkg.Config[I]);
+
+        if log.isEnabled('apt'):
+            self.cache = apt_pkg.GetCache()
+        else:
+            # apt_pkg prints progress messages to stdout, disable
+            self.__save_stdout()
+            try:
+                self.cache = apt_pkg.GetCache()
+            finally:
+                self.__restore_stdout()
+
+        self.records = apt_pkg.GetPkgRecords(self.cache)
+        #for p in self.cache.Packages:
+        #    print p
+        #log.debug("%s packages found" % (len(self.cache)),'apt_pkg')
+        self.loaded = 1
+        return True
+
+    def unload(self):
+        "Tries to make the packages server quit."
+        if self.loaded:
+            del self.cache
+            del self.records
+            self.loaded = 0
+
+    def cleanup(self):
+        self.unload()
+
+    def get_mirror_path(self, name, version):
+        "Find the path for version 'version' of package 'name'"
+        if not self.load(): return None
+        try:
+            for pack_vers in self.cache[name].VersionList:
+                if(pack_vers.VerStr == version):
+                    file, index = pack_vers.FileList[0]
+                    self.records.Lookup((file,index))
+                    path = self.records.FileName
+                    if len(path)>2 and path[0:2] == './': 
+                        path = path[2:] # Remove any leading './'
+                    return path
+
+        except KeyError:
+            pass
+        return None
+      
+
+    def get_mirror_versions(self, package_name):
+        """
+        Find the available versions of the package name given
+        @type package_name: string
+        @param package_name: package name to search for e.g. ;apt'
+        @return: A list of mirror versions available
+
+        """
+        vers = []
+        if not self.load(): return vers
+        try:
+            for pack_vers in self.cache[package_name].VersionList:
+                vers.append(pack_vers.VerStr)
+        except KeyError:
+            pass
+        return vers
+
+
+def cleanup(factory):
+    for backend in factory.backends:
+        backend.get_packages_db().cleanup()
+
+def get_mirror_path(factory, file):
+    """
+    Look for the path of 'file' in all backends.
+    """
+    info = AptDpkgInfo(file)
+    paths = []
+    for backend in factory.backends.values():
+        path = backend.get_packages_db().get_mirror_path(info['Package'],
+                                                info['Version'])
+        if path:
+            paths.append('/'+backend.base+'/'+path)
+    return paths
+
+def get_mirror_versions(factory, package):
+    """
+    Look for the available version of a package in all backends, given
+    an existing package name
+    """
+    all_vers = []
+    for backend in factory.backends.values():
+        vers = backend.get_packages_db().get_mirror_versions(package)
+        for ver in vers:
+            path = backend.get_packages_db().get_mirror_path(package, ver)
+            all_vers.append((ver, "%s/%s"%(backend.base,path)))
+    return all_vers
+
+def closest_match(info, others):
+    def compare(a, b):
+        return apt_pkg.VersionCompare(a[0], b[0])
+
+    others.sort(compare)
+    version = info['Version']
+    match = None
+    for ver,path in others:
+        if version <= ver:
+            match = path
+            break
+    if not match:
+        if not others:
+            return None
+        match = others[-1][1]
+
+    dirname=re.sub(r'/[^/]*$', '', match)
+    version=re.sub(r'^[^:]*:', '', info['Version'])
+    if dirname.find('/pool/') != -1:
+        return "/%s/%s_%s_%s.deb"%(dirname, info['Package'],
+                                  version, info['Architecture'])
+    else:
+        return "/%s/%s_%s.deb"%(dirname, info['Package'], version)
+
+def import_directory(factory, dir, recursive=0):
+    """
+    Import all files in a given directory into the cache
+    This is used by apt-proxy-import to import new files
+    into the cache
+    """
+    if not os.path.exists(dir):
+        log.err('Directory ' + dir + ' does not exist', 'import')
+        return
+
+    if recursive:    
+        log.msg("Importing packages from directory tree: " + dir, 'import',3)
+        for root, dirs, files in os.walk(dir):
+            for file in files:
+                import_file(factory, root, file)
+    else:
+        log.debug("Importing packages from directory: " + dir, 'import',3)
+        for file in os.listdir(dir):
+            mode = os.stat(dir + '/' + file)[stat.ST_MODE]
+            if not stat.S_ISDIR(mode):
+                import_file(factory, dir, file)
+
+    for backend in factory.backends.values():
+        backend.get_packages_db().unload()
+    
+    
+def import_file(factory, dir, file):
+    """
+    Import a .deb or .udeb into cache from given filename
+    """
+    if file[-4:]!='.deb' and file[-5:]!='.udeb':
+        log.msg("Ignoring (unknown file type):"+ file, 'import')
+        return
+    
+    log.debug("considering: " + dir + '/' + file, 'import')
+    try:
+        paths = get_mirror_path(factory, dir+'/'+file)
+    except SystemError:
+        log.msg(file + ' skipped - wrong format or corrupted', 'import')
+        return
+    if paths:
+        if len(paths) != 1:
+            log.debug("WARNING: multiple ocurrences", 'import')
+            log.debug(str(paths), 'import')
+        cache_path = paths[0]
+    else:
+        log.debug("Not found, trying to guess", 'import')
+        info = AptDpkgInfo(dir+'/'+file)
+        cache_path = closest_match(info,
+                                get_mirror_versions(factory, info['Package']))
+    if cache_path:
+        log.debug("MIRROR_PATH:"+ cache_path, 'import')
+        src_path = dir+'/'+file
+        dest_path = factory.config.cache_dir+cache_path
+        
+        if not os.path.exists(dest_path):
+            log.debug("IMPORTING:" + src_path, 'import')
+            dest_path = re.sub(r'/\./', '/', dest_path)
+            if not os.path.exists(dirname(dest_path)):
+                os.makedirs(dirname(dest_path))
+            f = open(dest_path, 'w')
+            fcntl.lockf(f.fileno(), fcntl.LOCK_EX)
+            f.truncate(0)
+            shutil.copy2(src_path, dest_path)
+            f.close()
+            if hasattr(factory, 'access_times'):
+                atime = os.stat(src_path)[stat.ST_ATIME]
+                factory.access_times[cache_path] = atime
+            log.msg(file + ' imported', 'import')
+        else:
+            log.msg(file + ' skipped - already in cache', 'import')
+
+    else:
+        log.msg(file + ' skipped - no suitable backend found', 'import')
+            
+def test(factory, file):
+    "Just for testing purposes, this should probably go to hell soon."
+    for backend in factory.backends:
+        backend.get_packages_db().load()
+
+    info = AptDpkgInfo(file)
+    path = get_mirror_path(factory, file)
+    print "Exact Match:"
+    print "\t%s:%s"%(info['Version'], path)
+
+    vers = get_mirror_versions(factory, info['Package'])
+    print "Other Versions:"
+    for ver in vers:
+        print "\t%s:%s"%(ver)
+    print "Guess:"
+    print "\t%s:%s"%(info['Version'], closest_match(info, vers))
+if __name__ == '__main__':
+    from apt_proxy_conf import factoryConfig
+    class DummyFactory:
+        def debug(self, msg):
+            pass
+    factory = DummyFactory()
+    factoryConfig(factory)
+    test(factory,
+         '/home/ranty/work/apt-proxy/related/tools/galeon_1.2.5-1_i386.deb')
+    test(factory,
+         '/storage/apt-proxy/debian/dists/potato/main/binary-i386/base/'
+         +'libstdc++2.10_2.95.2-13.deb')
+
+    cleanup(factory)
+

Added: tags/1.9.33-0.1/apt_proxy/plugins.tml
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/plugins.tml	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,7 @@
+register("apt-proxy TAP Builder",
+         "apt_proxy.apt_proxytap",
+         description="""
+         apt-proxy TAP module 
+         """,
+         type="tap",
+         tapname="apt-proxy")

Added: tags/1.9.33-0.1/apt_proxy/test/__init__.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/test/__init__.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1 @@
+__all__ = ["ConfigTest"]

Added: tags/1.9.33-0.1/apt_proxy/test/test_apt_proxy.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/test/test_apt_proxy.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,137 @@
+#
+# Copyright (C) 2005 Chris Halls <halls at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+"""Unit test for apt_proxy.py"""
+
+import copy, tempfile, os, shutil
+
+from twisted.trial import unittest
+from StringIO import StringIO
+
+from apt_proxy.apt_proxy_conf import apConfig
+from apt_proxy.apt_proxy import Factory
+
+config1="""
+[DEFAULT]
+debug=all:9
+port=9999
+address=
+cleanup_freq=off
+
+[backend1]
+backends = http://a.b.c/d
+
+[backend2]
+backends = http://d.e.f/g
+
+[backend3]
+backends = http://h.i.j/k
+"""
+
+config2="""
+[DEFAULT]
+debug=all:1
+port=8888
+address=1.2.3.4
+cleanup_freq=off
+
+# Backend 1 deleted
+
+[backend2]
+# no change
+backends = http://d.e.f/g
+
+[backend3]
+# changed
+backends = http://l.m.n/o
+
+[backend4]
+# new
+backends = http://p.q.r/s
+
+[backend5]
+# another new
+backends = http://t.u.v/w
+"""
+
+class apTestHelper(unittest.TestCase):
+    default_config = "[DEFAULT]\ndebug=all:9 apt:0\n" # Config string to use
+    def setUp(self):
+        self.cache_dir = tempfile.mkdtemp('.aptproxy')
+        self.config = self.default_config.replace('[DEFAULT]','[DEFAULT]\ncache_dir=' + self.cache_dir)
+    def tearDown(self):
+        shutil.rmtree(self.cache_dir)
+    
+class FactoryInitTest(apTestHelper):
+    def setUp(self):
+        self.default_config = config1
+        apTestHelper.setUp(self)
+        self.c = apConfig(StringIO(self.config))
+    def testFactoryInit(self):
+        factory = Factory(self.c)
+        self.assertEquals(factory.config, self.c)
+        del factory
+    def testFactoryBackendInit(self):
+        factory = Factory(self.c)
+        factory.configurationChanged()
+        self.assertEquals(len(factory.backends),3)
+        self.assertEquals(factory.backends.keys(), ['backend1', 'backend2', 'backend3'])
+        self.assertEquals(factory.backends['backend1'].uris[0].host, 'a.b.c')
+        del factory
+
+class StartFactoryTest(unittest.TestCase):
+    def setUp(self):
+        self.cache_dir = tempfile.mkdtemp('.aptproxy')
+        config = config1.replace('[DEFAULT]','[DEFAULT]\ncache_dir=' + self.cache_dir)
+        self.c = apConfig(StringIO(config))
+    def tearDown(self):
+        shutil.rmtree(self.cache_dir)
+    def testFactoryStart(self):
+        factory = Factory(self.c)
+        factory.startFactory
+
+class ConfigChangeTest(unittest.TestCase):
+    def setUp(self):
+        self.tempdir = tempfile.mkdtemp('.aptproxy')
+        configOld = config1.replace('[DEFAULT]','[DEFAULT]\ncache_dir=%s/old'%(self.tempdir))
+        self.cOld = apConfig(StringIO(configOld))
+        self.factory = Factory(self.cOld)
+        self.factory.configurationChanged()
+    def tearDown(self):
+        del(self.factory)
+        shutil.rmtree(self.tempdir)
+    def loadNewConfig(self):
+        configNew = config2.replace('[DEFAULT]','[DEFAULT]\ncache_dir=%s/new'%(self.tempdir))
+        self.cNew = apConfig(StringIO(configNew))
+        self.factory.config = copy.copy(self.cNew)
+        self.factory.configurationChanged(self.cOld)
+    def testNotAllowedChanges(self):
+        self.loadNewConfig()
+        self.assertNotEquals(self.factory.config.port, self.cNew.port)
+        self.assertEquals(self.factory.config.port, self.cOld.port)
+        self.assertEquals(self.factory.config.address, self.cOld.address)
+    def testGlobalChanges(self):
+        self.loadNewConfig()
+        self.assertEquals(self.factory.config.debug, 'all:1')
+        self.assertEquals(self.factory.config.debug, self.cNew.debug)
+    def testBackendCount(self):
+        self.loadNewConfig()
+        self.assertEquals(len(self.factory.backends),4)
+    def testBackendChanges(self):
+        self.assertEquals(self.factory.backends['backend3'].uris[0].host, 'h.i.j')
+        self.loadNewConfig()
+        self.assertEquals(self.factory.backends.keys(), ['backend2', 'backend3', 'backend4', 'backend5'])
+        self.assertEquals(self.factory.backends['backend3'].uris[0].host, 'l.m.n')

Added: tags/1.9.33-0.1/apt_proxy/test/test_config.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/test/test_config.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,82 @@
+#
+# Copyright (C) 2005 Chris Halls <halls at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+"""Unit test for apt_proxy_conf.py"""
+
+from twisted.trial import unittest
+from StringIO import StringIO
+
+from apt_proxy.apt_proxy_conf import apConfig
+
+class EmptyConfigTest(unittest.TestCase):
+    def setUp(self):
+        self.c = apConfig(StringIO())
+    def testEmptyConfig(self):
+        self.assertEquals(len(self.c.backends),0)
+    def testDefaultPort(self):
+        self.assertEquals(self.c.port,9999)
+
+config1="""
+[DEFAULT]
+debug=all:9
+port=8989
+address=1.2.3.4 5.6.7.8
+timeout = 888
+
+[backend1]
+backends = ftp://a.b.c
+timeout = 999
+
+[backend2]
+backends = 
+  http://x.y.z
+  rsync://d.e.f
+  file://g.h.i
+
+# This backend will not be added
+[backend3]
+backends = invalid://aa.bb
+"""
+
+class ConfigTest(unittest.TestCase):
+    def setUp(self):
+        self.c = apConfig(StringIO(config1))
+    def testPort(self):
+        self.assertEquals(self.c.port,8989)
+    def testAddress(self):
+        self.assertEquals(self.c.address,['1.2.3.4','5.6.7.8'])
+    def testBackendCount(self):
+        self.assertEquals(len(self.c.backends),2)
+    def testBackend1(self):
+        self.assertEquals(self.c.backends['backend1'].backends,['ftp://a.b.c'])
+        self.assertEquals(self.c.backends['backend1'].name,'backend1')
+        self.assertEquals(self.c.backends['backend1'].dynamic,False)
+    def testBackend2(self):
+        self.assertEquals(self.c.backends['backend2'].backends,
+           ['http://x.y.z','rsync://d.e.f','file://g.h.i'])
+    def testTimeout(self):
+        self.assertEquals(self.c.timeout,888)
+    def testTimeout1(self):
+        self.assertEquals(self.c.backends['backend1'].timeout,999)
+    def testTimeout2(self):
+        self.assertEquals(self.c.backends['backend2'].timeout,888) # Default section timeout
+    def testDynamicBackend(self):
+        self.c.addBackend(None, 'dynamic1', ['http://a.b.c'])
+        self.assertEquals(self.c.backends['dynamic1'].backends,['http://a.b.c'])
+        self.assertEquals(self.c.backends['dynamic1'].name,'dynamic1')
+        self.assertEquals(self.c.backends['dynamic1'].dynamic,True)
+        self.assertEquals(self.c.backends['dynamic1'].timeout,888)
+

Added: tags/1.9.33-0.1/apt_proxy/test/test_packages.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/test/test_packages.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,127 @@
+#
+# Copyright (C) 2005 Chris Halls <halls at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+"""Unit test for packages.py"""
+
+from apt_proxy.packages import AptPackages, PackageFileList, get_mirror_versions, AptDpkgInfo
+from apt_proxy.apt_proxy import Factory
+from apt_proxy.test.test_apt_proxy import apTestHelper
+from apt_proxy.apt_proxy_conf import apConfig
+from StringIO import StringIO
+from twisted.trial import unittest
+import shutil, os, re, glob
+
+class PackageFileListTest(apTestHelper):
+    def setUp(self):
+        apTestHelper.setUp(self)
+        self.f = PackageFileList('test', self.cache_dir)
+    def tearDown(self):
+        del(self.f) # Needed otherwise we'll get a database exception when cache dir is removed
+        apTestHelper.tearDown(self)
+    def testEmpty(self):
+        self.assertEqual(self.f.get_files(),[])
+    def testAddPackages(self):
+        shutil.copytree('../test_data/packages', self.cache_dir+'/packages')
+        self.f.update_file('packages/Packages')
+        self.assertEqual(self.f.get_files(),['packages/Packages'])
+        self.f.update_file('packages/Packages.gz') # This file should not be added
+        self.assertNotIn('packages/Packages.gz', self.f.get_files())
+
+        # Remove packages file and check that it is removed from database
+        os.unlink(self.cache_dir+'/packages/Packages')
+        self.assertEqual(self.f.get_files(),[])
+
+class PackagesCacheTest(apTestHelper):
+    def setUp(self):
+        apTestHelper.setUp(self)
+        self.p = AptPackages('test', self.cache_dir)
+    def tearDown(self):
+        del(self.p)
+        apTestHelper.tearDown(self)
+    def testLoadEmpty(self):
+        self.failIfEqual(self.p.load(),True)
+    def testReLoadEmpty(self):
+        self.failIfEqual(self.p.load(),True)
+        del(self.p)
+        self.p = AptPackages('test', self.cache_dir)
+
+class PackagesTestHelper(apTestHelper):
+    """
+    Create a test AptPackages using test data
+    """
+    def setUp(self):
+        apTestHelper.setUp(self)
+        self.p = AptPackages('test1', self.cache_dir)
+        shutil.copytree('../test_data/packages', self.cache_dir+'/packages')
+        self.p.file_updated('packages/Packages')
+        #print "Cache dir:", self.cache_dir, '\n'
+    def tearDown(self):
+        del(self.p)
+        apTestHelper.tearDown(self)
+
+    def testGetMirrorVersions(self):
+        self.assertEquals(self.p.load(),True)
+        # Test that an unknown package returns empty version set
+        self.assertEqual(self.p.get_mirror_versions('nonexistent'), [])
+        # Test for apt package from test_data directory
+        aptver = get_test_deb_info()['Version']
+        self.assertNotEquals(re.match('[0-9.a-z]+', aptver), None)
+
+def get_test_deb_name():
+    "Return filename of test deb file"
+    debs = glob.glob('../test_data/packages/apt_*_*.deb')
+    return debs[0]
+
+def get_test_deb_info():
+    "Return an AptDpkgInfo for our test deb"
+    return AptDpkgInfo(get_test_deb_name())
+
+class AptDpkgInfoTest(unittest.TestCase):
+    def testGetInfo(self):
+        info = get_test_deb_info()
+        self.assertEquals(info['Package'], 'apt')
+        self.assertNotEquals(re.match('[0-9.a-z]+', info['Version']), None)
+
+# Backend definition for factory.get_mirror_versions
+config_mirrorvers="""
+[packages]
+backends=http://dummy
+"""
+
+class FactoryVersionFuncsTest(apTestHelper):
+    def setUp(self):
+        apTestHelper.setUp(self)
+        shutil.copytree('../test_data/packages', self.cache_dir+'/packages')
+        self.c = apConfig(StringIO(self.config+config_mirrorvers))
+        self.factory = Factory(self.c)
+        self.factory.createBackends()
+        # Register test package files in db
+        self.factory.getBackend('packages').get_packages_db().file_updated('packages/Packages')
+        # Get version of apt used for testing
+        self.aptinfo = get_test_deb_info()
+        #print self.cache_dir
+    def tearDown(self):
+        del(self.factory)
+        apTestHelper.tearDown(self)
+
+    def testGetAllMirrorVersions(self):
+        aptversions = get_mirror_versions(self.factory, 'apt')
+        self.assertEquals(self.aptinfo['Version'], aptversions[0][0])
+        testdeb_name = get_test_deb_name().replace('../test_data/','') # strip test data directory
+        self.assertEquals(testdeb_name, aptversions[0][1])
+        self.assertEquals([], get_mirror_versions(self.factory, 'unknown'))
+    def testGetEmptyMirrorVersions(self):
+        self.assertEquals([], get_mirror_versions(self.factory, 'unknown'))

Added: tags/1.9.33-0.1/apt_proxy/twisted_compat/.cvsignore
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/twisted_compat/.cvsignore	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,2 @@
+*.pyo
+*.pyc

Added: tags/1.9.33-0.1/apt_proxy/twisted_compat/__init__.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/twisted_compat/__init__.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,4 @@
+"""
+Compaibility with twisted 0.19.0
+"""
+

Added: tags/1.9.33-0.1/apt_proxy/twisted_compat/compat.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/twisted_compat/compat.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,14 @@
+from twisted import copyright
+
+#This is a gross hack to get non-released features
+update_needed=0
+if copyright.version in ("0.99.2","1.0.0", "1.2.0", "1.3.0rc1", "2.0.1", "2.1.0"):
+    #print "Updating twisted's process module."
+    if not update_needed:
+        pass
+        #print "No updating required."
+else:
+    print "WARNING: apt-proxy has not been tested under this version of"\
+          " twisted (%s)."%(copyright.version)
+    if not update_needed:
+        print "WARNING: although it should work without problem."

Added: tags/1.9.33-0.1/apt_proxy/twisted_compat/http.py
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/apt_proxy/twisted_compat/http.py	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,10 @@
+from twisted import copyright
+
+# This ugly code is need to remain compatible with previous versions
+# of twisted.
+if copyright.version in ("0.99.2","1.0.0", "1.2.0", "1.3.0rc1"):
+    from twisted.protocols import http
+    from twisted.protocols.http import *
+else:
+    from twisted.web import http
+    from twisted.web.http import *

Added: tags/1.9.33-0.1/aptest
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/aptest	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+profile=
+
+# If you run 'aptest profile' you will get a dump of all functions to ap-profile.log
+if [ "$1" = profile ]; then
+  profile="-p ap-profile.log"
+fi
+
+echo "----------- `date` -------------------" >> aptest.log
+PYTHONPATH="`pwd`" twistd --pidfile=/var/run/apt-proxy/twistd.pid $profile -n -y bin/apt-proxy | tee -a aptest.log

Added: tags/1.9.33-0.1/aptest.testdb
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/aptest.testdb	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+profile=
+
+# If you run 'aptest profile' you will get a dump of all functions to ap-profile.log
+if [ "$1" = profile ]; then
+  profile="-p ap-profile.log"
+fi
+
+echo "----------- `date` -------------------" >> aptest.log
+PYTHONPATH="`pwd`" bin/apt-proxy -c apt-proxy.conf.test | tee -a aptest.log

Added: tags/1.9.33-0.1/aptproxy.kdevelop
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/aptproxy.kdevelop	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,145 @@
+<?xml version = '1.0'?>
+<kdevelop>
+  <general>
+    <author>Chris Halls</author>
+    <email>halls at debian.org</email>
+    <version>$VERSION$</version>
+    <projectmanagement>KDevScriptProject</projectmanagement>
+    <primarylanguage>Python</primarylanguage>
+    <ignoreparts/>
+    <projectdirectory>.</projectdirectory>
+    <absoluteprojectpath>false</absoluteprojectpath>
+    <description/>
+    <secondaryLanguages>
+      <language>Bash</language>
+    </secondaryLanguages>
+    <versioncontrol>kdevsubversion</versioncontrol>
+  </general>
+  <kdevscriptproject>
+    <run>
+      <mainprogram>./aptproxy.py</mainprogram>
+      <directoryradio>executable</directoryradio>
+    </run>
+    <general>
+      <includepatterns>*.py</includepatterns>
+      <excludepatterns>*~ debian/apt-proxy/*</excludepatterns>
+    </general>
+  </kdevscriptproject>
+  <kdevdoctreeview>
+    <ignoretocs>
+      <toc>bash</toc>
+      <toc>bash_bugs</toc>
+      <toc>c++_bugs_gcc</toc>
+      <toc>clanlib</toc>
+      <toc>w3c-dom-level2-html</toc>
+      <toc>fortran_bugs_gcc</toc>
+      <toc>gnome1</toc>
+      <toc>gnustep</toc>
+      <toc>gtk</toc>
+      <toc>gtk_bugs</toc>
+      <toc>haskell</toc>
+      <toc>haskell_bugs_ghc</toc>
+      <toc>java_bugs_gcc</toc>
+      <toc>java_bugs_sun</toc>
+      <toc>kde2book</toc>
+      <toc>libc</toc>
+      <toc>libstdc++</toc>
+      <toc>opengl</toc>
+      <toc>pascal_bugs_fp</toc>
+      <toc>php</toc>
+      <toc>php_bugs</toc>
+      <toc>perl</toc>
+      <toc>perl_bugs</toc>
+      <toc>qt-kdev3</toc>
+      <toc>ruby</toc>
+      <toc>ruby_bugs</toc>
+      <toc>sdl</toc>
+      <toc>stl</toc>
+      <toc>w3c-svg</toc>
+      <toc>sw</toc>
+      <toc>w3c-uaag10</toc>
+      <toc>wxwindows_bugs</toc>
+    </ignoretocs>
+    <ignoreqt_xml>
+      <toc>Guide to the Qt Translation Tools</toc>
+      <toc>Qt Assistant Manual</toc>
+      <toc>Qt Designer Manual</toc>
+      <toc>Qt Reference Documentation</toc>
+      <toc>qmake User Guide</toc>
+    </ignoreqt_xml>
+    <ignoredoxygen>
+      <toc>KDE Libraries (Doxygen)</toc>
+    </ignoredoxygen>
+    <projectdoc>
+      <userdocDir>html/</userdocDir>
+      <apidocDir>html/</apidocDir>
+    </projectdoc>
+    <ignorekdocs/>
+    <ignoredevhelp/>
+  </kdevdoctreeview>
+  <kdevfilecreate>
+    <filetypes/>
+    <useglobaltypes>
+      <type ext="py" />
+    </useglobaltypes>
+  </kdevfilecreate>
+  <kdevpythonsupport>
+    <run>
+      <interpreter>python</interpreter>
+      <terminal>true</terminal>
+    </run>
+  </kdevpythonsupport>
+  <kdevfileview>
+    <groups>
+      <group pattern="*.py" name="Python" />
+      <hidenonprojectfiles>false</hidenonprojectfiles>
+      <hidenonlocation>false</hidenonlocation>
+    </groups>
+    <tree>
+      <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+      <hidenonprojectfiles>false</hidenonprojectfiles>
+      <showvcsfields>true</showvcsfields>
+    </tree>
+  </kdevfileview>
+  <kdevdocumentation>
+    <projectdoc>
+      <docsystem/>
+      <docurl/>
+      <usermanualurl/>
+    </projectdoc>
+  </kdevdocumentation>
+  <kdevcvsservice>
+    <recursivewhenupdate>true</recursivewhenupdate>
+    <prunedirswhenupdate>true</prunedirswhenupdate>
+    <createdirswhenupdate>true</createdirswhenupdate>
+    <recursivewhencommitremove>true</recursivewhencommitremove>
+    <revertoptions>-C</revertoptions>
+  </kdevcvsservice>
+  <kdevdebugger>
+    <general>
+      <programargs/>
+      <gdbpath/>
+      <dbgshell/>
+      <configGdbScript/>
+      <runShellScript/>
+      <runGdbScript/>
+      <breakonloadinglibs>true</breakonloadinglibs>
+      <separatetty>false</separatetty>
+      <floatingtoolbar>false</floatingtoolbar>
+    </general>
+    <display>
+      <staticmembers>false</staticmembers>
+      <demanglenames>true</demanglenames>
+      <outputradix>10</outputradix>
+    </display>
+  </kdevdebugger>
+  <kdevvisualadvance>
+    <emulator>VisualBoyAdvance</emulator>
+    <binary/>
+    <addOptions/>
+    <terminal>false</terminal>
+    <fullscreen>false</fullscreen>
+    <graphicFilter>-f0</graphicFilter>
+    <scaling>-1</scaling>
+  </kdevvisualadvance>
+</kdevelop>

Added: tags/1.9.33-0.1/bin/apt-proxy
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/bin/apt-proxy	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+
+# Load apt-proxy application
+#
+# There are two ways apt-proxy can be started:
+#  1. twistd -y apt-proxy
+#     - twistd will load this file and execute the app
+#       in 'application' variable
+#  2. from command line
+#     - __name__ will be '__main__' 
+
+import pwd,sys
+
+from twisted.application import service, internet, app
+from twisted.internet import reactor
+from twisted.manhole.telnet import ShellFactory
+from twisted.python import usage, log
+
+from apt_proxy.apt_proxy_conf import apConfig
+from apt_proxy.apt_proxy import Factory
+
+config_file = None
+
+if __name__ == '__main__':
+    # Parse command line parameters when started on command line
+    class AptProxyOptions(usage.Options):
+        optFlags = [
+            ['help', 'h'],
+            ]
+        optParameters = [
+            ['config-file', 'c', None, "Configuration file"],
+            ]
+        longdesc="apt-proxy is a proxy for saving bandwidth for apt users"
+        def opt_version(self):
+            print "apt-proxy 1.9.x"
+            sys.exit(0)
+    
+    opts = AptProxyOptions()
+    try:
+        opts.parseOptions()
+    except usage.UsageError, ue:
+        print '%s: %s' % (sys.argv[0], ue)
+        sys.exit(1)
+
+    config_file = opts.opts['config-file']
+
+config = apConfig(config_file)
+factory = Factory(config)
+uid,gid = pwd.getpwnam(config.username)[2:4]
+
+if config.telnet_port:
+    shell = ShellFactory()
+    shell.username = config.telnet_user
+    shell.password = config.telnet_pass
+    shell.port = config.telnet_port
+
+# application to be started by twistd
+application = service.Application("AptProxy", uid, gid)
+
+for address in config.address:
+    if config.telnet_port:
+        internet.TCPServer(config.telnet_port, shell, interface=address).setServiceParent(application)
+    internet.TCPServer(config.port, factory, interface=address).setServiceParent(application)
+
+if __name__ == '__main__':
+    # Run on command line
+    log.startLogging(sys.stdout, setStdout=0)
+    service.IServiceCollection(application).privilegedStartService()
+    service.IServiceCollection(application).startService()
+    reactor.run()

Added: tags/1.9.33-0.1/bin/apt-proxy-import
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/bin/apt-proxy-import	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+
+#
+# Copyright (C) 2002 Manuel Estrada Sainz <ranty at debian.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import twisted
+import apt_proxy
+from twisted.python import usage
+import sys, pwd, os
+
+from apt_proxy.apt_proxy_conf import apConfig
+from apt_proxy import packages
+from apt_proxy.apt_proxy import Factory
+
+packages.aptpkg_dir = '.apt-proxy-import'
+
+class MyOptions(usage.Options):
+    optFlags = [
+        ['version', 'V', 'print version and quit'],
+        ['verbose', 'v', 'give verbose output'],
+        ['debug', 'd', 'debug output'],
+        ['quiet', 'q', "try not to write messages to stdout"],
+        ['recursive', 'r', 'recurse into subdirectories'],
+        ['help', 'h'],
+        ]
+    optParameters = [
+        ['config-file', 'c', None, "Configuration file"],
+        ]
+    longdesc="apt-proxy-import imports .deb files into the apt-proxy cache."
+
+    def __init__(self):
+        usage.Options.__init__(self)
+    def getSynopsis(self):
+        return "Usage: %s [options] <filename> ..." % (os.path.basename(sys.argv[0])) + \
+               "\n       %s -r [options] <directory> ..." % (os.path.basename(sys.argv[0]))
+
+    def parseArgs(self, *args):
+        if len(args)==0:
+            print self.getSynopsis()
+            raise usage.UsageError("Specify files to import")
+        self.importargs = args
+    def opt_version(self):
+        print "apt-proxy-import 1.9.x"
+        sys.exit(0)
+
+try:
+    config = MyOptions()
+    config.parseOptions()
+except usage.UsageError, ue:
+    print '%s: %s' % (sys.argv[0], ue)
+    sys.exit(1)
+
+apiConfig = apConfig(config.opts['config-file'])
+
+uid,gid = pwd.getpwnam(apiConfig.username)[2:4]
+should_be_uid = pwd.getpwnam(apiConfig.username)[2]
+if os.getuid() != should_be_uid:
+    try:
+        os.setuid(should_be_uid)
+    except OSError:
+        print "Error, couldn't change to user %s."%(apiConfig.username)
+        sys.exit(1)
+
+twisted.python.log.startLogging(sys.stdout)
+
+if config.opts['debug']:
+    print 'debug'
+    apiConfig.setDebug('all:9')
+elif config.opts['verbose']:
+    print "verbose"
+    apiConfig.setDebug('all:5')
+if config.opts['quiet']:
+    apiConfig.setDebug('all:0')
+
+factory=Factory(apiConfig)
+factory.configurationChanged() # Load backends
+for import_dir in config.importargs:
+    packages.import_directory(factory, import_dir, config.opts['recursive'])

Added: tags/1.9.33-0.1/bin/apt-proxy-v1tov2
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/bin/apt-proxy-v1tov2	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,166 @@
+#!/bin/sh
+
+usage () {
+	echo >&2
+	echo "usage:" >&2
+	echo "	$0 v1_config_file v2_template_file > v2_config_file" >&2
+	echo >&2
+}
+
+# Default values
+V1_CONFIG_FILE=/etc/apt-proxy/apt-proxy.conf
+V2_CONFIG_FILE=/etc/apt-proxy/apt-proxy-v2.conf
+
+if [ -n "$1" ]; then
+	V1_CONFIG_FILE="$1"
+fi
+if [ -n "$2" ]; then
+	V2_CONFIG_FILE="$2"
+fi
+
+if [ ! -r "$V1_CONFIG_FILE" ] || [ ! -r "$V2_CONFIG_FILE" ]
+then
+	usage
+	exit 1
+fi
+
+
+# Called from config script to add back ends.
+# APT_PROXY_BACKENDS is a list of backends seperated by spaces.
+#  Whitespace from the add_backend command is replaced by commas
+#	add_backend(url-prefix, file-prefix, backend-prefix...)
+add_backend()
+{
+    [ $# -ge 3 ] || warn Bad add_backend "$@".
+    APT_PROXY_BACKENDS="$APT_PROXY_BACKENDS`echo $@ | tr -s ' \t' ,` "
+}
+
+warn()
+{
+    echo "WARNING: $*" >&2
+}
+
+
+################################# MAIN START ##############################
+# Read V1 configuration
+. $V1_CONFIG_FILE
+
+# Set KEEP_STATS if debug is on
+[ -n "$DEBUG" ] && KEEP_STATS=1
+
+
+min_refresh_delay="min_refresh_delay = $BACKEND_FREQ"
+
+if [ -n "${CLEAN_SWEEP}" ];then
+	cleanup_freq="cleanup_freq = ${CLEAN_SWEEP}d"
+else
+	warn
+	warn "'cleanup_freq' and 'CLEAN_SWEEP' don't quite mean the same,"
+	warn "v2 does more than just erase old files on cleanup."
+	warn
+	cleanup_freq="cleanup_freq = off"
+fi
+
+if [ -n "${CLEANUP_DAYS}" ];then
+	max_age="max_age = ${CLEANUP_DAYS}d" 
+	warn
+	warn "'max_age' and 'CLEANUP_DAYS' don't quite mean the same, 'max_age'"
+	warn "doesn't take into acount if there is a newer version of the"\
+		"package"
+	warn
+else
+	max_age="max_age = off"
+fi
+
+if [ -n "${MAX_VERSIONS}" ];then
+	max_versions="max_versions = ${MAX_VERSIONS}"
+else
+	max_versions="max_versions = off"
+fi
+
+if [ -n "${WGET_TIMEOUT}" ] && [ "${RSYNC_TIMEOUT}" != "${WGET_TIMEOUT}" ]; then
+	warn "WGET_TIMEOUT differs from RSYNC_TIMEOUT, using RSYNC_TIMEOUT"
+fi
+timeout="timeout = ${RSYNC_TIMEOUT:-30}"
+
+cache_dir="cache_dir = ${APT_PROXY_CACHE}"
+
+if $DEBUG; then
+	debug="debug = all db:3"
+fi
+
+SED_SCRIPT="
+s|^min_refresh_delay *=.*$|$min_refresh_delay|
+s|^cleanup_freq *=.*$|$cleanup_freq|
+s|^max_age *=.*$|$max_age|
+s|^max_versions *=.*$|$max_versions|
+s|^timeout *=.*$|$timeout|
+s|^cache_dir *=.*$|$cache_dir|
+s|^debug *=.*$|$debug|"
+
+BACKEND_CONF=""
+append() {
+	BACKEND_CONF="$BACKEND_CONF
+$*"
+}
+
+for BACKEND_STR in $APT_PROXY_BACKENDS
+do
+	NAME=$(echo $BACKEND_STR | sed -e's/,.*$//' -e 's/\///g')
+	append "[$NAME]"
+	SED_SCRIPT="$SED_SCRIPT
+	/^\[$NAME\]/{
+		s/^/;/
+		a\\
+;This backend has been commented out to prevent clash with a \\
+;backend of the same name imported from v1 configuration \\
+;
+	}
+	/^;\[$NAME\]/{
+		: comment
+		n
+		/^\(;*\[\)/b end_backend
+		s/^/;/
+		b comment
+		: end_backend
+	}
+	"
+	CACHE_PATH=$(echo $BACKEND_STR | cut -d, -f2 | sed -e's|/\+|/|g')
+	CACHE_PATH_SHOULD_BE=$(echo $APT_PROXY_CACHE/$NAME/ \
+				| sed -e's|/\+|/|g') 
+	if [ "$CACHE_PATH" != "$CACHE_PATH_SHOULD_BE" ]; then
+		warn
+		warn "cache directory for backend '$NAME' differs" \
+			"from it's name."
+		warn " 	it is '$CACHE_PATH'"
+		warn " 	and should be '$CACHE_PATH_SHOULD_BE'"
+		warn " apt-proxy v2 will not find previously cached" \
+			"files for '$NAME'"
+		warn
+	fi
+	append backends =
+	for BACKEND in $(echo $BACKEND_STR \
+			| sed \
+				-e 's/^\([^,]*,\)\{2\}//' \
+				-e 's|/\?,| |g' \
+				-e 's|/$||g')
+	do
+		#Remove '+' prefix
+		if expr "$BACKEND" : '\+' > /dev/null ; then
+			warn " the '+' prefix is not supported by v2"
+			BACKEND=$(expr "$BACKEND" : '\+\(.*\)$')
+		fi
+		#Put rsync backends in standart proto://host/path notation
+		BACKEND=$(echo $BACKEND|sed -e's|\([^:]*\)::|rsync://\1/|')
+
+		if expr "$BACKEND" : 'rsync:' > /dev/null ; then
+			warn " rsync support is not recommended for general use,"
+                        warn "   please consider using an http backend instead."
+		fi
+		append "	$BACKEND"
+	done
+done
+
+sed -e "$SED_SCRIPT" $V2_CONFIG_FILE
+
+echo "$BACKEND_CONF"

Added: tags/1.9.33-0.1/debian/TODO
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/TODO	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,25 @@
+TODO list for apt-proxy
+
+- Return a better error message if the backend servers do not exist, rather
+  than 'directory does not exist'
+
+- Make it more clear that apt-proxy should not be configured as an http proxy,
+  but as an http server, or support using apt-proxy as a proxy...
+
+- Do not start if run as root - it is unnecessarily risky and someone starting
+  apt-proxy as root from the command line ends up with directories owned by root
+  in the cache, which is a problem
+
+- Add debconf questions for default user and cache directory
+
+- Add more possible servers to default config file.  I would be grateful if
+  people who are using alternative servers would file a wishlist bug containing
+  their apt-proxy.conf, and I'll integrate it into the distribution.
+
+- Work through the remaining wishlist bugs in the BTS.  Keep those reports
+  coming in folks!
+
+- Rewrite in perl.  Join the apt-proxy-user list or #apt-proxy on IRC if you
+  want to be involved!
+
+Chris Halls, April 2002

Added: tags/1.9.33-0.1/debian/changelog
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/changelog	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,897 @@
+apt-proxy (1.9.33-0.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Update for bsddb module (Closes: #352917).
+  * Add comma in depends (Closes: #353386, #350551, #354668, #355228).
+  * Updated Vietnamese debconf translation (Closes: #313121).
+  * Complete manpage translation with po4a (Closes: #334380).
+  * Fix typos in apt-proxy.conf.5 (Closes: #355225).
+  * Remove extra 'by default' from apt-proxy.8 (Closes: #355229).
+  * Add German debconf translation (Closes: #352484).
+  * Updated French debconf translation (Closes: #328689).
+  * Add Portuguese debconf translation (Closes: #330202).
+  * Add Swedish debconf translation (Closes: #331515).
+  * Add Catalan debconf translation (Closes: #336384).
+  * Updated Danish debconf translation (Closes: #340132).
+  * Updated Dutch debconf translation (Closes: #356210).
+  * Add Spanish debconf translation (Closes: #333874).
+  * Updated Czech debconf translation (Closes: #335361).
+  * Updated French manpage translation (Closes: #332304).
+
+ -- Luk Claes <luk at debian.org>  Wed, 29 Mar 2006 00:05:51 +0200
+
+apt-proxy (1.9.33) unstable; urgency=low
+
+  [ Chris Halls ]
+  * Update for twisted 2.1.0.  Thanks Tuncer Ayazi and Andreas Pakulat for
+    their patches and suggestions.
+  * Depend on python-twisted-web if using twisted > 2.0.1 (Closes: #349596)
+  * Remove use of deprecated arm calls (Closes: #349447)
+  * Rework apt-proxy.conf manpage. Thanks to Roey Katz for all the
+    suggestions
+  * debian/rules: swap dh_python and dh_installinit calls, so that
+    update-python-modules is called before init script in postinst
+
+  [ Debconf Translations ]
+  * Yuriy Talakan <yt at amur.elektra.ru>: ru.po (closes: #310326)
+
+ -- Chris Halls <halls at debian.org>  Thu, 26 Jan 2006 11:59:56 +0000
+
+apt-proxy (1.9.32) unstable; urgency=low
+
+  [ Chris Halls ]
+  * Add support for file:// backends.  Thanks to Michael Vogt for
+    the patch.  FetcherFile is renamed to FetcherCachedFile and
+    FetcherFile is now the file: backend.
+  * Change apt-proxy-import command line: files/directories to import are
+    specified as regular parameters instead of using -i switch
+  * Add --config-file command line option to apt-proxy and apt-proxy-import
+    so more than one apt-proxy can be started independently.  This makes
+    it possible to test apt-proxy in parallel with the system version.
+  * Seperate out configuration file loading code into standalone classes
+    that can be used (and tested independently)
+  * Seperate management of the list of Packages files associated with a
+    backend
+  * When building a list of Packages files to parse using apt_pkg, check that
+    the files exist, and do not load apt_pkg at all if there are no files.
+    Added a test case to verify this (closes: #270874)
+  * doc/Makefile: Use absolute PYTHONPATH when running a-p-i.  Fixes build
+    error in some build environments
+
+  [ Otavio Salvador ]
+  * Add debconf-2.0 as alternative to satisfy debconf requirement to
+    run. This will be need for transition to cdebconf later
+  * Use twisted.web.http instead of twisted.protocols.http, which is
+    depreciated in twisted 2 but only if running with newer versions of
+    twisted library
+  * Bump Standards-Version to 3.6.2. No changes needed
+  * Only use update-inetd on upgrades and then we check if it exists
+    before calling it. That way we avoid a dependency on netbase
+  * Add dependency on adduser because postinst uses it
+  * Call debconf-updatepo in package clean target
+  * Update pt_BR debconf translations
+
+ -- Otavio Salvador <otavio at debian.org>  Fri, 19 Aug 2005 14:22:25 -0300
+
+apt-proxy (1.9.31) unstable; urgency=low
+
+  * Merged back changes from 1.9.29 that were reverted for sarge release
+  * apt-proxy-import; add command line parameter to change configuration
+    file
+  * Fix problem parsing usernames with @ char inside. Closes: #309288 (Otavio)
+  * All seems to be ok with new twisted (2.0.1)
+
+ -- Chris Halls <halls at debian.org>  Tue, 14 Jun 2005 22:54:47 +0100
+
+apt-proxy (1.9.30) unstable; urgency=high
+
+  * Back out all changes in 1.9.29 except for the fix for
+    #304182, the RC bug that caused apt-proxy to be removed from
+    Sarge
+  * Re-enable gunzip postprocessing for Packages, needed for
+    packages database to work properly.  This code was commented out
+    in 1.9.23 because I thought it was related to another problem.
+    Closes: #277916: /usr/sbin/apt-proxy-import: apt-proxy-import
+    doesn't work- no suitable backend found
+    Closes: #285792: apt-proxy-import does not work
+    Closes: #305015: max_versions not respected - keeps many versions
+    more than defined there
+
+ -- Chris Halls <halls at debian.org>  Thu, 19 May 2005 17:28:33 +0100
+
+apt-proxy (1.9.29) unstable; urgency=low
+
+  * Hey, we moved to Alioth and Subversion :-D (Otavio)
+  * Apply patch provided by Patrick B. Carlisle <carlislp at reed.edu> to fix
+    the empty timeout value in conversion. Closes: #304182 (Otavio)
+  * Apply patch provided by Achim Bohnet <ach at mpe.mpg.de> to improve the
+    manpages. Closes: #299682 (Otavio)
+  * Add a doc giving tips how to use it offline. Thanks for Achim Bohnet
+    <ach at mpe.mpg.de> by it. Closes: #299675 (Otavio)
+  * Fix the option handle of apt-proxy-import to display its version
+    instead of Twisted one. Closes: #308666 (Otavio)
+  * Fix a spelling error on template. Closes: 308930 (Otavio)
+  * Debconf Translations:
+    - Vietnamese (vi.po) by Clytie Siddall <clytie at riverland.net.au>.
+      Closes: 308814 (Otavio)
+  * Manpage Translations:
+    - French (fr.po) by Christian Perrier <bubulle at debian.org>.
+      Closes: 300172 (Otavio)
+
+ -- Otavio Salvador <otavio at debian.org>  Mon, 16 May 2005 01:29:14 -0300
+
+apt-proxy (1.9.28) unstable; urgency=low
+
+  * Fix exception in dynamic backends.  Closes: #296513
+  * If another client requests the same Packages/Releases file,
+    send the file instead of HTTP 304 Not Modified.  Closes: #284584
+
+ -- Chris Halls <halls at debian.org>  Thu,  3 Mar 2005 14:55:30 +0000
+
+apt-proxy (1.9.27) unstable; urgency=low
+
+  * Delay database directory creation until after uid change.
+    Older installations are fixed by chmoding directory in
+    postinst.  Closes: #288829
+  * Fix exception in apt-proxy-import. Closes: #296574
+  * Close connection where necessary after sending complete file.
+    Closes: #288905
+  * Pipe file verification output to /dev/null for UML speedups,
+    thanks Paul Wagland for the patch.  Closes: #292818
+  * init script:
+     - Fix bashism in init script.  Closes: #296710
+     - Improve output and remove first sleep, thanks
+       again Herbert Thielen.  Closes: #296875
+
+ -- Chris Halls <halls at debian.org>  Fri, 25 Feb 2005 20:53:20 +0000
+
+apt-proxy (1.9.26) unstable; urgency=low
+
+  * Add Depends to disallow upgrade of python2.3 without
+    upgrade of twisted.  Closes: #294626
+  * init script: wait longer for apt-proxy to stop, thanks
+    Herbert Thielen for the patch. Closes: #284432
+
+ -- Chris Halls <halls at debian.org>  Tue, 22 Feb 2005 23:52:09 +0000
+
+apt-proxy (1.9.25) unstable; urgency=low
+
+  * Postpone database creating to first request. Closes: #288829. (Otavio)
+  * Reorganise Backends. Now the packages databse is not opened multiple
+    times for each alternative URL given.
+  * Each [backend] section in apt-proxy.conf creates a new class Backend
+  * Each URL in the backend section creates a new class BackendServer
+  * New class layout is:
+      Backend -> base, packages database, list of BackendServers
+      BackendServer -> fetcher, host, port, user etc
+  * init script: Change twistd2.3->twistd to help python transitions
+  * apt-proxy.conf: Add ubuntu and ubuntu-security archives
+
+ -- Chris Halls <halls at debian.org>  Fri, 28 Jan 2005 10:26:49 +0000
+
+apt-proxy (1.9.24) unstable; urgency=low
+
+  * Fix module import.
+  * Add some debug/log messages when upgrading database
+  * apt-proxy.8:
+    - Add Otavio to authors
+    - Change example deb lines: 'woody' to 'stable' and add security
+      example
+  * debian/manpages: use wildcard to install pages
+
+ -- Chris Halls <halls at debian.org>  Fri,  3 Dec 2004 19:21:23 +0000
+
+apt-proxy (1.9.23) unstable; urgency=low
+
+  * Improve upgrade from previous database format. (Otavio)
+
+ -- Otavio Salvador <otavio at debian.org>  Fri,  3 Dec 2004 15:48:25 -0200
+
+apt-proxy (1.9.22) unstable; urgency=low
+
+  * Load database when requested. Closes: #283685. (Otavio)
+  * Remove previous database and recreate it because the format has
+    change. Closes: #284011. (Otavio)
+
+ -- Otavio Salvador <otavio at debian.org>  Fri,  3 Dec 2004 11:37:26 -0200
+
+apt-proxy (1.9.21) unstable; urgency=low
+
+  * Fix caching of files that was broken in 1.9.20, thanks
+    to Paul Wagland for the help 
+    (closes: #283441, #283893, #257611)
+  * Create database file if it does not exist (closes: #283686)
+  * Fix bug in gzip conversion class
+  * Clean up memory after sending files from cache directory
+    (closes: #260951, #258025)
+
+ -- Chris Halls <halls at debian.org>  Thu,  2 Dec 2004 11:24:52 +0000
+
+apt-proxy (1.9.20) unstable; urgency=low
+
+  * Close temporary files when finish to transfer data.
+    Closes: #281156 (Otavio)
+  * Change to use bsddb3 database library bacause it's faster then python
+    native version. Closes: #262097 (Otavio)
+  * Files were being stored in memory while they were downloaded, 
+    removed.  Reduces CPU usage while downloading large files.
+    Closes: #271820 (Chris)
+  * Simple profiling: Run 'aptest profile' to get a function call dump
+    in ap-profile.log (Chris)
+  * Change where we import the tempfile module to improve the
+    speed. (Otavio)
+
+ -- Otavio Salvador <otavio at debian.org>  Sun, 28 Nov 2004 20:32:34 -0200
+
+apt-proxy (1.9.19) unstable; urgency=low
+
+  * Fix format in apt-proxy.conf(5). (closes: #272153) (Otavio)
+  * Add default to 30 in timeout parameter when importing from version
+    1. (closes: #266776, #266567) (Otavio)
+  * Allow listening on multiple IP addresses. (closes: #266453) (Otavio)
+  * Change to wait by the _server_ closes the connection, this solve the
+    hang while using with wget and in that case, debootstrap. Thanks to
+    Chet Murthy <chetsky at gmail.com> by the patch. (Otavio)
+  * Change default apt-proxy.conf file to use debian-non-US instead of
+    non-US. (closes: #273973, #267427) (Otavio)
+  * Disable pipelining by default (disable_pipelining=1) until the pipelining
+    logic is more sensible and does not attempt multiple connections to
+    the same backend server (Chris)
+    - Closes: #272217: extreme delays in fetching any packages
+    - Closes: #274426: Apt-proxy v2 has a long delay between files
+    - Closes: #251192: stuck connections
+    - Closes: #219427: deals badly with connection-limited ftp sources
+    - Closes: #261066: Doesn't download completely some files
+  * Document the meaning of disable_pipelining in apt-proxy.conf manpage (Chris)
+  * Debconf Translations:
+    - Dutch (nl.po) by cobaco <cobaco at linux.be>. Closes: #280487. (Otavio)
+    - Danish (da.po) by Morten Brix Pedersen <morten at wtf.dk>. 
+      Closes: #276692. (Otavio)
+  * Fix apt-proxy(8) backend name to debian instead of main. 
+    Closes: #277447. (Otavio)
+
+ -- Otavio Salvador <otavio at debian.org>  Thu, 18 Nov 2004 16:10:56 -0200
+
+apt-proxy (1.9.18) unstable; urgency=low
+
+  * Add dependencie of logrotate. (closes: #267822)
+  * Save the conversion log in /var/log/apt-proxy-v1tov2.log and stopped
+    to send mails to root. (closes: #268421, #266535)
+  * Change the umask of process to 022 so the cache will be readable by
+    others. (closes: #264638)
+  * Applied patch provided by Julien Louis <arthur51 at ifrance.com> to fix a
+    reference to the apt-proxy.conf(8) manpage and the SEE ALSO section
+    output. (closes: #265682)
+  * Applied patch provided by Sam Couter <sam at couter.dropbear.id.au> to
+    makes apt-proxy start as root and then change UID *after* binding the
+    listen port. (closes: #270650)
+  * When logrotate rotates the log file, apt-proxy should be restarted to
+    open the new log file. (closes: #270634)
+  * Applied patch provided by Paul Wagland <paul at kungfoocoder.org> to
+    improve of caching response speeds. (closes: #267915)
+
+  * Applied patch provided by Julien Louis <arthur51 at ifrance.com> to to
+    handle translated manpages with po4a.
+  * Debconf Translations:
+    - Czech (cs.po) by Jan Outrata <outrataj at upcase.inf.upol.cz>
+      (closes: #266571)
+    - Japanese (ja.po) by Hideki Yamane <henrich at samba.gr.jp>
+      (closes: #270471)
+  * Manpage Translations:
+    - French (fr.po) by Raphaël Bordet 
+      <debian-l10n-french at lists.debian.org> (closes: #266035)
+
+ -- Otavio Salvador <otavio at debian.org>  Fri, 10 Sep 2004 14:02:28 -0300
+
+apt-proxy (1.9.17) unstable; urgency=low
+
+  * Handle currupted files (Otavio). (closes: #263147)
+  * Right handle ftp backends when no username information is used
+    (Otavio). (closes: #263566)
+
+ -- Otavio Salvador <otavio at debian.org>  Thu,  5 Aug 2004 13:42:08 -0300
+
+apt-proxy (1.9.16) unstable; urgency=low
+
+  * Workaround when found a wrong server (Otavio). (closes: #260788)
+  * Applied patch from Jason Thomas <jason at debian.org> to add RPM support
+    (Otavio). (closes: #261943)
+  * Handle username and password in URI (Otavio). (closes: #263112)
+  * Debconf Translations:
+    - Portuguese (Brazil) (pt_BR.po) by Andre Luis Lopes
+    - French (fr.po) by Olivier Trichet (closes: #263040)
+ -- Otavio Salvador <otavio at debian.org>  Wed, 28 Jul 2004 20:17:44 -0300
+
+apt-proxy (1.9.15) unstable; urgency=low
+
+  * Add support for upstream proxy servers (Otavio). (closes: #258904)
+  * Fix code to not stat a file while this not exist (Otavio).
+  * Add support to specify which network interface should listen
+    (Otavio). (closes: 256609)
+  * Add support to translated debconf templates (Otavio).
+  * Fix apt-proxy-import manpage to include -i when says about importing
+    from apt-move archive (Otavio). (closes: #259959)
+  * Include backports.org as an example backend (Otavio). (closes: #259874)
+
+ -- Otavio Salvador <otavio at debian.org>  Mon, 19 Jul 2004 18:04:49 -0300
+
+apt-proxy (1.9.14) unstable; urgency=low
+
+  * Add some missing files in clean target (Otavio).
+  * Add Build-dependencie of python-apt (Otavio). (closes: #258147)
+  * Add support to import .udebs (Otavio). (closes: #174380)
+  * Update to use the new twisted way to handle internet applications
+    (Otavio). (closes: #240294)
+  * Add twisted 1.3.0rc1 in know versions (Otavio).
+  * Update packaging, now conforming to policy version 3.6.1.1 (Otavio).
+  * Major packaging cleanup to use better debhelper tools like dh_python
+    and like (Otavio).
+  * Swap maintainer and uploaders field as requested by Chris (Otavio).
+  * Change postinst to always check by user (Otavio). (closes: #258215)
+  * Restart inet.d if upgrading from some version earlier then 1.9.0
+    (Otavio). (closes: #259009)
+
+ -- Otavio Salvador <otavio at debian.org>  Tue, 13 Jul 2004 16:31:16 -0300
+
+apt-proxy (1.9.13) unstable; urgency=low
+
+  * Add support for http dynamic backends. If a file is requested for a
+    backend not listed in the configuration file, it will be used as the
+    hostname. It can be disabled by setting dynamic_backends=off (Otavio).
+  * Add me in uploaders (Otavio).
+  * Fix spelling error in apt_proxy.py comment (Otavio).
+  * Improved debug information when somebody try to use a not implemented
+    method (Otavio).
+  * Add some missing filetypes (.txt, .html and .gz) (Otavio).
+  * Fix problem with numeric ports when used in backends, thanks to
+    Philipp Weis <pweis at pweis.com> (Otavio). (closes: #257507)
+  * Upload to unstable (Otavio).
+
+ -- Otavio Salvador <otavio at debian.org>  Tue,  6 Jul 2004 17:18:49 -0300
+
+apt-proxy (1.9.12) experimental; urgency=low
+
+  * Manuel, the author of the version 2 rewrite, has been killed
+    in a car accident.  http://www.debian.org/News/2004/20040515
+
+  * Add a paragraph to the README dedicating this passage to him
+  * Change maintainer back to myself
+  * Fix method to redirect stdout when loading packages cache
+    with apt_pkg (closes: #250434)
+  * Fix max_versions to work in the same way as version 1
+    did, taking distributions into account (part of #242197)
+
+ -- Chris Halls <halls at debian.org>  Sun, 30 May 2004 07:32:18 +0200
+
+apt-proxy (1.9.11) experimental; urgency=low
+
+  * Support Release.gpg for new apt, thanks Chris Lawrence (closes: #245895)
+  * Fix FTBFS when apt-proxy is not already installed,
+    thanks Paul Brook (closes: #245675)
+
+ -- Chris Halls <halls at debian.org>  Mon,  3 May 2004 09:03:15 +0200
+
+apt-proxy (1.9.10) experimental; urgency=low
+
+  * Rework rsync backend support to stream from rsync's temporary
+    file as apt-proxy version 1 used to.  Support for rsync backends
+    is now available without compiling and installing the rsync hack
+    shared library.
+  * Update documentation
+
+ -- Chris Halls <halls at debian.org>  Mon, 19 Apr 2004 16:49:57 +0200
+
+apt-proxy (1.9.9) experimental; urgency=low
+
+  * Add support for multiple backends.  If the connection is refused
+    or times out, attempt to contact the next server in the list.
+  * Documentation updates
+
+ -- Chris Halls <halls at debian.org>  Sat, 17 Apr 2004 16:44:11 +0200
+
+apt-proxy (1.9.8) experimental; urgency=low
+
+  * Log deletion of cache files by max_version algorithm
+  * Change 'RECYCLING' message to 'Adopting new file'
+    (closes: #240296)
+  * Use passive FTP by default, and add configuration option passive_ftp
+    (closes: #190926)
+  * apt-proxy-import:
+    + Fix to work with latest apt_proxy version
+    + Send output to standard out
+    + Add a --recursive flag to import .debs from a directory tree
+    + Make log messages more informative
+    + Confirm that it works with relative paths (closes: #183709)
+  * Updated apt-proxy-import man page
+  * README: Remove outdated section about the twisted version in sarge
+  * apt-proxy.conf:
+    + Update openoffice example repositories
+    + Add passive_ftp example
+    + Document default cache directory in manpage (closes: #206676)
+  * Tested with twisted 1.2.0, warning removed
+
+  * Bugs in version 1 that have been fixed for version 2:
+    Closes: #221754: apt: doesn't url escape '~'
+    Closes: #234900: apt-proxy default config is non-functional
+    Closes: #241303: apt-proxy-import seems to fail when importing dir
+    with a lot of files
+
+  * Bugs that do not apply to version 2:
+    Closes: #187919: apt-proxy fails to report file not found to client,
+    client times out instead
+    Closes: #203868: apt-proxy fails to determine file size and remains
+    suck - Connection timed out for clients
+    Closes: #171889: files sometimes not streamed properly to clients
+    Closes: #175649: Error when update
+    Closes: #180954: apt-proxy sometimes seems to consume vast amounts
+    of CPU for hours
+    Closes: #183222: update fails with openwall kernel patch
+    Closes: #199430: Depends on wget | rsync, but by default doesn't
+    appear to work without rsync
+    Closes: #199831: apt-proxy is *way* slower than apt-rsync
+    Closes: #207067: apt-proxy doesn't work with inetutils-inetd
+    Closes: #219049: stat warning: '-l' is deprecated in logfiles
+    Closes: #126220: log to stderr
+    Closes: #157780: shouldn't depend on ash
+    Closes: #161448: ash is depreciated
+
+ -- Chris Halls <halls at debian.org>  Mon, 12 Apr 2004 21:14:05 +0200
+
+apt-proxy (1.9.7) experimental; urgency=low
+
+  * Plug the recent file descriptor leak.
+  * Automatically recreate .db files if they get corrupted.
+  * Added an optional remote python console for debugging.
+  * Call the garbage collector explicitly.
+
+ -- Manuel Estrada Sainz <ranty at debian.org>  Sat,  6 Dec 2003 18:57:10 +0100
+
+apt-proxy (1.9.6) experimental; urgency=low
+
+  * Migrate from python 2.2 to 2.3.
+  * Build-depend on python2.3-twisted - needed for invocation of
+    apt-proxy-import during documentation build (Chris).
+  * Better logs and a small fix (Chris).
+  * Make lintian happy:
+  	+ Build-Depend on python2.3
+  	+ Standards-Version: 3.6.0
+  	+ debhelper (>= 4.0.0)
+
+ -- Manuel Estrada Sainz <ranty at debian.org>  Tue, 11 Nov 2003 18:40:26 +0100
+
+apt-proxy (1.9.5.6pre2) experimental; urgency=low
+
+  * Fix FTP code and clean up.
+  * Remove usage of depreciated clientTCP.
+  * The new code requires a minimum of twisted 1.0.0 - Depends updated. (Chris)
+  * We don't actually need to build-depend on python or twisted. (Chris)
+  * Updated / added documentation for v2.
+  * Removed the '-v2' suffix.
+  * Changed default port to 9999 to match apt-proxy v1.
+  * Conflicts/Replaces: apt-proxy-v2 (<= 1.9.5)
+  * Added UPGRADING notes.
+  * Customize apt-proxy-v2.conf based on ap1's apt-proxy.conf when upgrading.
+  * Disable apt-proxy v1's inetd line on upgrade, and reenable it on downgrade.
+  * Remove .pyc and .pyo files on remove.
+
+ -- Manuel Estrada Sainz <ranty at debian.org>  Tue, 26 Nov 2002 22:44:41 +0100
+
+apt-proxy-v2 (1.9.5) experimental; urgency=low
+
+  * Cleanup some internal code (Manuel)
+  * Recognise twisted 1.0 (Manuel)
+  * Fix slowdown and memory usage for large files by streaming to a temporary
+    file (Manuel)
+  * Fix apt-proxy-import and add experimental fuzzy import of unknown versions
+    (Manuel)
+  * Add apt-proxy-v1tov2 conversion script (Manuel)
+  * Add support for 'off' in max_versions, max_age, cleanup_freq config
+    parameters (Manuel)
+  * Support .bz2 control files download (Chris)
+  * Update TODO with list of items left to be done before release
+
+ -- Chris Halls <halls at debian.org>  Tue,  5 Nov 2002 07:27:07 +0100
+
+apt-proxy-v2 (1.9.4) experimental; urgency=low
+
+  * Support for twisted 0.99.2. (Manuel)
+  * Migrate from python 2.1 to 2.2 (Manuel)
+  * Fix cache directory names in maintainer scripts to use
+    /var/cache/apt-proxy.
+  * Some general bugfixing (Manuel)
+  * Fix problem with 2 char directories (Simon Hyde)
+  * Dump memory usage on connection close to check for leaks
+  * Rename lots of class names so that the word 'client' only means apt, not
+    apt-proxy when connecting to backends (those are now 'fetchers') (Manuel)
+  * Tighten dependency on python-apt to (>= 2.1.3-4)
+  * Add Build-Depends-Indep python2.2-twisted (>= 0.99.2)
+  * Add support for Packages/Sources/Contents/Release.bz2 file extensions and
+    verification.  Add Depends: bzip2.
+
+ -- Chris Halls <chris.halls at gmx.de>  Wed, 16 Oct 2002 20:56:10 +0200
+
+apt-proxy-v2 (1.9.3) experimental; urgency=low
+
+  * Improve debugging messages (Manuel+Chris)
+  * Change default cache directory to /var/cache/apt-proxy - using
+    apt-proxy v1 and v2 is OK, as long as you don't use both at once.
+    The directory /var/cache/apt-proxy will not be deleted if this package is
+    purged.
+  * Disable logfile rotation by twisted, because it does not work in a
+    directory without write permission
+  * There are still memory leak issues; these will be fixed by twisted 0.99.1
+
+ -- Chris Halls <chris.halls at gmx.de>  Thu, 22 Aug 2002 19:02:21 +0200
+
+apt-proxy-v2 (1.9.2) experimental; urgency=low
+
+  * Fix hanging when 2 clients are connected simultaneously (Manuel)
+  * Improve some debugging messages (Manuel)
+
+ -- Chris Halls <chris.halls at gmx.de>  Thu, 22 Aug 2002 16:39:46 +0200
+
+apt-proxy-v2 (1.9.1) experimental; urgency=low
+
+  * Remove support for twisted versions < 0.19 (Manuel)
+  * Create logfile in init script if it does not already exist
+  * Depend on python-apt (Thanks Mark Titorenko)
+
+ -- Chris Halls <chris.halls at gmx.de>  Tue, 23 Jul 2002 16:27:12 +0200
+
+apt-proxy-v2 (1.9.0) experimental; urgency=low
+
+  * New development version
+
+ -- Chris Halls <chris.halls at gmx.de>  Tue, 16 Jul 2002 22:30:10 +0200
+
+apt-proxy (1.3.6) unstable; urgency=low
+
+  * Correct example proxy lines in apt-proxy.conf (closes: #169658, #177514)
+  * Remove logrotated logfiles on purge
+  * Correct location of apt-proxy.conf in apt-proxy(8) (closes: #170045)
+  * Add French translation of apt-proxy.8 manpage, thanks to Richard Bonichon
+    for the translation.
+  * Set PATH to standard system path.  You can override this in apt-proxy.conf
+    if you need PATH set to semething else. (closes: #170286)
+  * Add conversion script by Michael (Micksa) Slade.  This reads sources.list
+    and creates an example sources.list and apt-proxy.conf.  Installed in
+    /usr/share/doc/apt-proxy/examples/apt-proxy-mkconfig until it has been
+    documented.
+  * Apply patch from Ian Bruce to fix uncompressed Packages rsyncing 
+    (closes: #166305)
+
+ -- Chris Halls <halls at debian.org>  Wed, 22 Jan 2003 11:19:21 +0100
+
+apt-proxy (1.3.5) unstable; urgency=low
+
+  * New maintainer email address, yay :)
+  * Comment out create action in logrotate script, so that it works
+    by default if another user is used (closes: #165692)
+  * Apply patch from Arthur Korn to log downloads when KEEP_STATS is set
+    (closes: #169081)
+
+ -- Chris Halls <halls at debian.org>  Fri, 15 Nov 2002 08:15:17 +0100
+
+apt-proxy (1.3.4) unstable; urgency=low
+
+  * Add more items to the FAQ and improve documentation of the different
+    backends and when to use them.  Updates to the manpages and README.
+    Thanks to Heather Stern for the suggestions.
+  * Apply patch from Roger Burton West (thanks!) to handle unknown filetypes
+    for Jigdo support (closes: #156676, #156009)
+  * logrotate script creates logfile if missing (closes: #161619)
+  * Add more examples to apt-proxy.conf
+  * Correct spelling error in apt-proxy.conf (closes: #157147)
+
+ -- Chris Halls <chris.halls at gmx.de>  Fri, 20 Sep 2002 10:59:04 +0200
+
+apt-proxy (1.3.3) unstable; urgency=low
+
+  * Fix section typo in apt-proxy manpage (closes: #151208)
+  * Download compressed Packages.gz from rsync backend if no local file is
+    available.  Thanks to Roland Gerlach for the analysis.
+  * Update apt-proxy.conf with many more examples and http backends by default
+  * Fix apt-proxy-import help message, thanks Cristian Ionescu-Idbohrn
+    (closes: #152166)
+  * Fix chaining of multiple apt-proxies, thanks Brian Johnson 
+    (closes: #153893)
+  * Allow Release.gpg (closes: #153234)
+  * Mention that new developments are going into version 2 in README
+
+ -- Chris Halls <chris.halls at gmx.de>  Wed, 24 Jul 2002 16:04:59 +0200
+  
+apt-proxy (1.3.2) unstable; urgency=low
+
+  * Depend on binutils for ar (closes: #143573)
+  * Accept '~' characters in URLs
+  * Clean up URLs used internally
+  * apt-proxy-import: copy files instead of linking if using dpkg-name from
+    Potato
+  * Copy links to .debs as files, not links on rysnc backends.  This made it
+    impossible to download some potato .debs on ftp.de.debian.org.
+  * Refuse to run apt-proxy as the root user.  This is not a good idea
+    security-wise.
+  * Check for write permission in backend directories
+  * Add debug option (-D) to apt-proxy-import that leaves the contents of
+    dpkg-name.links directory.
+  * Manuel Estrada Sainz: 
+    - convert /dirname/../ into / (closes: #149166)
+    - let apt-proxy-import accept relative pathnames (closes: #149200)
+    - delete aptproxy user in postrm (closes: #149200)
+
+ -- Chris Halls <chris.halls at gmx.de>  Fri, 14 Jun 2002 17:05:35 +0200
+
+apt-proxy (1.3.1) unstable; urgency=low
+
+  * Accept requests in the form http://<hostname>/... to comply with
+    HTTP 1.1 (closes: #141740)
+  * Manuel Estrada Sainz: update apt-proxy-import manpage using
+    help2man; add help2man to build-depends
+  * Add usage example in apt-proxy-import manpage for importing apt-move cache
+  * Make apt-proxy-import output nicer when importing many directories
+  * Update README with new hints and tips
+  * Small apt-proxy.conf manpage correction
+
+ -- Chris Halls <chris.halls at gmx.de>  Fri, 12 Apr 2002 13:26:36 +0200
+
+apt-proxy (1.3.0) unstable; urgency=low
+
+  * Release new version into Debian archive.
+    - Add HTTP/FTP backend support using wget
+    - Add apt-proxy-import, a script to import .debs into the cache
+    - Improve reliability when several clients are active
+    - Add FAQ section to README
+    See the changelogs for 1.2.9.x (below) for details. 
+    (closes: #83199, #94226, #140348, #140826)
+
+ -- Chris Halls <chris.halls at gmx.de>  Thu,  4 Apr 2002 14:06:05 +0200
+
+apt-proxy (1.2.9.11) sourceforge; urgency=low
+
+  * Fix log messages when a directory is created for a http/ftp backend.
+  * Clean up some other log messages
+
+ -- Chris Halls <chris.halls at gmx.de>  Thu,  4 Apr 2002 12:42:50 +0200
+
+apt-proxy (1.2.9.10) sourceforge; urgency=low
+
+  * Update installation instructions for non-Debian systems
+  * Add check that stat supports -t option (thanks to Oliver Bornet)
+  * Suggest stat and update description
+
+ -- Chris Halls <chris.halls at gmx.de>  Thu,  4 Apr 2002 08:51:34 +0200
+
+apt-proxy (1.2.9.9) sourceforge; urgency=low
+
+  * Add --quiet option to adduser until #141016 is fixed (closes: #140826)
+  * Update README
+
+ -- Chris Halls <chris.halls at gmx.de>  Wed,  3 Apr 2002 11:19:51 +0200
+
+apt-proxy (1.2.9.8) sourceforge; urgency=low
+
+  * Add a FAQ section to README with some problems that users have
+    encountered.
+  * apt-get update && apt-get update now sends 304 HITs the second time for
+    HTTP backends like it does for rsync
+  * Change HTTP protocol version to 1.1 (it was still 1.0!)
+  * Don't copy an older version using copy_best_match when using wget
+  * Turn on KEEP_STATS when DEBUG is on
+  * In debug mode, log lockfile release
+  * Fix some error messages when file is already current version
+  * Rename some rsync* functions to download* to make it less confusing
+
+ -- Chris Halls <chris.halls at gmx.de>  Tue,  2 Apr 2002 18:14:18 +0200
+
+apt-proxy (1.2.9.7) sourceforge; urgency=low
+
+  * Fix file ownership changing bug in apt-proxy-import.  If you've used
+    earlier versions, you may find files with owner root in
+    /var/cache/apt-proxy - do "chown -R aptproxy /var/cache/apt-proxy" to
+    restore normality.  This was the cause of "touch: permission denied"
+    errors in the logfile.
+  * Remove some debugging statements in apt-proxy
+
+ -- Chris Halls <chris.halls at gmx.de>  Wed, 27 Mar 2002 18:21:42 +0100
+
+apt-proxy (1.2.9.6) sourceforge; urgency=low
+
+  * Fix race if two clients request the same file, with help from Sacha to
+    reproduce. (closes: #140348)
+  * I would like to upload to Debian unstable once 1.2.2 hits Woody in 5 days.
+    Please let me know if you are aware of any remaining issues!
+
+ -- Chris Halls <chris.halls at gmx.de>  Wed, 27 Mar 2002 16:16:52 +0100
+
+apt-proxy (1.2.9.5) sourceforge; urgency=low
+
+  * Fix directory support so apt-proxies can be chained again
+  * Add apt-proxy --version (thanks to Sacha Schlegel)
+
+ -- Chris Halls <chris.halls at gmx.de>  Mon, 25 Mar 2002 16:33:51 +0100
+
+apt-proxy (1.2.9.4) sourceforge; urgency=low
+
+  * Merge in changes from stable 1.2.2
+  * Add dpkg-name support to apt-proxy-import so it renames files too
+  * Log copy_best_match to help Sascha to fix the problem he found :)
+
+ -- Chris Halls <chris.halls at gmx.de>  Fri, 22 Mar 2002 17:07:57 +0100
+
+apt-proxy (1.2.9.3) sourceforge; urgency=low
+
+  * Always use ash instead of sh, because this makes apt-proxy much faster.
+  * Fix ftp backend permission problem
+  * If a file to be downloaded was not newer, wget would not download a file
+    and the apt client would receive a zero length file.
+  * Return an error if a file does not exist on any server
+  * Add fuzzy matching to apt-proxy-import by ranty, which enables it to guess
+    where a .deb file should go even if the Packages files do not contain the
+    exact version.  Only works for new style pool directories, and is not yet
+    documented.
+
+ -- Chris Halls <chris.halls at nikocity.de>  Mon, 11 Mar 2002 17:14:35 +0100
+
+apt-proxy (1.2.9.2) sourceforge; urgency=low
+
+  * Only download uncompressed packages files when rsyncing.  Do not attempt
+    to get uncompressed sources, release or contents files.  When downloading
+    uncompressed files with rsync, use compress switch (closes: #94226)
+  * Fix lockfile name used during clean sweep.  Thanks to Lele Gaifax for the
+    patch.
+  * Fix an error where stale lockfiles were not deleted
+
+ -- Chris Halls <chris.halls at nikocity.de>  Wed,  6 Mar 2002 15:37:09 +0100
+
+apt-proxy (1.2.9.1) sourceforge; urgency=low
+
+  * Add http/ftp support using wget. (closes: #83199)
+  * New script: apt-proxy-import, which will import .debs into the archive.
+
+ -- Chris Halls <chris.halls at nikocity.de>  Tue, 26 Feb 2002 14:46:49 +0100
+
+apt-proxy (1.2.2) unstable; urgency=low
+
+  * Fix lockfile name in sweep clean (thanks to Lele Gaifax)
+  * Change maintainer email address (closes: #139173)
+  * Add Manuel Estrada Sainz <ranty at debian.org> to Uploaders.  He has
+    been helping improve apt-proxy-import and will sponsor future uploads.
+
+ -- Chris Halls <chris.halls at gmx.de>  Thu, 21 Mar 2002 18:13:30 +0100
+
+apt-proxy (1.2.1) unstable; urgency=low
+
+  * Reset access time on version n-1 when downloading n, so the cache cleaning
+    algorithm works better (came up in the discussion for bug #131883)
+  * Add Contents-* to list of control files, so apt-proxy works with apt-file.
+    (closes: #134217)
+  * Add version to debhelper build dependency (>> 3.0.0)
+  * On purge, remove the cache directory
+  * Make it possible to install on Potato again by removing --diabled-login
+    and --shell from adduser invocation.  They are on by default for a system
+    user anyway. (Sourceforge bug #516318)
+  * Add note to README about usage on Potato
+  * Make Debian native
+
+ -- Chris Halls <chris.halls at nikocity.de>  Thu, 21 Feb 2002 18:47:08 +0100
+
+apt-proxy (1.2.0-1) unstable; urgency=low
+
+  * New upstream release
+    - New config file paramter, MAX_VERSIONS, to limit the number of package
+      versions to keep in the cache directory.  Thanks to Martin Schwenke.
+    - New parameters for apt-proxy for runtime setting of config file and log
+      file locations.  Thanks to Gerhard Muntingh. (closes: #77929)
+    - Use the package filelists logic from Martin Schwenke to send the size of
+      package files before downloading, meaning connection keep-alive logic can
+      be used.
+    - Fix the problem of files being corrupted during streaming (often seen as
+      a MD5 sum error which would go away when the file was requested from
+      apt-proxy again), by switching back to using dd instead of tail.
+    - Check for corrupted .deb and .gz files in the cache before sending
+      them to the client. (closes: #132493)
+    - Bye bye .diff: The Sourceforge project is now up to date and includes the
+      debian packaging.
+  * Really rename main archive name, not just put it in the changelog
+  * Add logrotate script
+  * Clean up debian/rules and use DH_COMPAT=3
+  * If setting up apt-proxy for the first time, do the following:
+    - Create a user, aptproxy (closes: #99259)
+    - Add an entry to inetd.conf, without disabling it (closes: #81746)
+    - Create a log file owned by the user (closes: #109308)
+    This is currently first-install only.  I plan to introduce an upgrade path
+    for existing users using debconf when I have time.
+  * Move installation instructions that are no longer necessary when using the
+    packge into a seperate file, INSTALL.
+  * Remove extra manual installation instructions that are no longer necessary
+    from README (closes: #132439)
+  * Merge remaining information from README about finding rsync servers into
+    apt-proxy.conf manpage.
+  * Add UK rsync servers to default apt-proxy.conf, thanks to Simon Huggins.
+
+ -- Chris Halls <chris.halls at nikocity.de>  Wed,  6 Feb 2002 12:20:12 +0100
+
+apt-proxy (1.1.2-2) unstable; urgency=low
+
+  * Add updated README to .deb, thanks to Thorsten Gunkel for pointing
+    this out and other suggestions.
+  * Changed main archive name from debian to main in apt-proxy.conf to make it
+    less confusing.
+  * Documented RSYNC_TIMEOUT in apt-proxy.conf manpage.
+  * Minor changes to apt-proxy manpage.  The manpages will get a proper
+    overhaul once the installation has been modified to create the user and
+    cache directories.
+  * Add a couple more rsync servers to default apt-proxy.conf
+  * Add debian/TODO
+
+ -- Chris Halls <chris.halls at nikocity.de>  Wed, 09 Jan 2002 22:53:58 +0100
+
+apt-proxy (1.1.2-1) unstable; urgency=low
+
+  * New maintainter - thanks to Andrew McMillan for sponsoring.
+    (closes: #123499)
+  * New upstream release (closes: #112029)
+     - Some bug fixes, bashism cleanups
+     - Upstream has been inactive for 6 months now.  I have not had
+       any contact since September.
+  * Add Depends: grep-dctrl
+    (closes: #76113, #78256, #114855, #99976, #121456)
+  * Remove unneeded procmail dependency (closes: #76634, #116188)
+  * No longer depend on bash.
+  * Depend on netbase for update-inetd (closes: #75993)
+  * Remove Recommends:ftp-server
+  * Merged in Stephen Rothwell's changes
+     - Use tail and stat if available, which is faster
+  * Supply a working apt-proxy.conf (part of bug #96517).  Set the top level
+    cache directory to /var/cache/apt-proxy and supply it as part of the
+    package.  To get this package running now, you only need to create the
+    user and logfile and enable the service in inetd.  I'll fix these in a
+    future release.
+  * Made improvements to the script:
+     - Fix keep-alive handling: If apt-proxy knows the file size, the
+       connection is kept open, otherwise it is closed. Also, fix hangs in
+       certain situations by improving locking and only keep the connection
+       alive if asked by the client. (closes: #96517, #80839,
+       #99927, #99948)
+     - Add rsync timeout support in config file (RSYNC_TIMEOUT parameter)
+     - Create cache second level directory if it does not exist
+     - Rework file locking
+     - Improve debug logging to help investigate remaining problems.
+  * Fix typo in apt-proxy.8, thanks to Uwe Hermann (closes: #116234)
+  * Updated Standards-Version (no changes were necessary)
+  * README: Added instructions for creating apt-proxy.conf and outline the
+    steps needed to get apt-proxy working.
+
+ -- Chris Halls <chris.halls at nikocity.de>  Tue, 18 Dec 2001 08:34:57 +0100
+
+apt-proxy (1.1.1-2) unstable; urgency=high
+
+  * Dependency problem on netkit-inetd removed (thx goes to Lindsay Allen)
+
+ -- Raphael Bossek <bossekr at debian.org>  Wed,  1 Nov 2000 10:37:04 +0100
+
+apt-proxy (1.1.1-1) unstable; urgency=low
+
+  * New upstream version (closes: #74653)
+  * Pre-Depends on debconf removed. (closes: #65662)
+
+ -- Raphael Bossek <bossekr at debian.org>  Sun, 29 Oct 2000 10:26:06 +0100
+
+apt-proxy (0.4-3) unstable; urgency=low
+
+  * Added check for the existence of /etc/apt-proxy. (closes: #58180)
+
+ -- Raphael Bossek <bossekr at debian.org>  Tue,  7 Mar 2000 22:57:28 +0100
+
+apt-proxy (0.4-2) unstable; urgency=low
+
+  * Recomends ftp-server. (closes: #58117, #58148)
+
+ -- Raphael Bossek <bossekr at debian.org>  Wed, 16 Feb 2000 20:54:48 +0100
+
+apt-proxy (0.4-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Raphael Bossek <bossekr at debian.org>  Fri,  4 Feb 2000 20:33:42 +0100
+

Added: tags/1.9.33-0.1/debian/compat
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/compat	Thu Aug  3 10:12:44 2006
@@ -0,0 +1 @@
+4

Added: tags/1.9.33-0.1/debian/control
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/control	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,33 @@
+Source: apt-proxy
+Section: admin
+Priority: extra
+Maintainer: Otavio Salvador <otavio at debian.org>
+Uploaders: Chris Halls <halls at debian.org>
+Standards-Version: 3.6.2
+Build-Depends-Indep: debhelper (>= 4.1.13), po-debconf, help2man, python-twisted (>= 1.0.0), python, python-apt, po4a (>= 0.18.1)
+
+Package: apt-proxy
+Architecture: all
+Depends: debconf (>= 0.5.00) | debconf-2.0, ${python:Depends}, python-twisted (>= 1.3.0-7) | python2.3 (<< 2.3.5-1), python-twisted (>= 1.0.0), python-twisted-web | python-twisted (<< 2.1.0), python-apt (>= 0.5.8), bzip2, logrotate, adduser
+Conflicts: apt-proxy-v2 (<= 1.9.5)
+Replaces: apt-proxy-v2 (<= 1.9.5)
+Suggests: rsync
+Description: Debian archive proxy and partial mirror builder development
+ This is version 2 of apt-proxy which will, when ready, replace apt-proxy v1.
+ .
+ apt-proxy automatically builds a Debian HTTP mirror based
+ on requests which pass through the proxy.  It's great for
+ multiple Debian machines on the same network with a slower
+ internet link.
+ .
+ The archive is automatically kept up to date using http,
+ ftp or rsync.  Cache cleaning of unused and old versions
+ is configurable.  You can also import the contents of
+ your apt cache into the archive using apt-proxy-import.
+ .
+ For more information, see the apt-proxy homepage at
+ http://apt-proxy.sourceforge.net
+ .
+ The suggested packages are needed for the following
+ features: rsync for rsyncd backends, and
+ dpkg-dev for apt-proxy-import.

Added: tags/1.9.33-0.1/debian/copyright
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/copyright	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,12 @@
+This is the Debian GNU/Linux packaged version of apt-proxy
+
+Version 2 was written by Manuel Estrada Sainz.  The original version was by
+Rusty Russel.  The package is maintained by Chris Halls
+
+The project homepage is at
+  http://sourceforge.net/projects/apt-proxy
+
+This software is released under the terms of the GNU General Public License.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL.

Added: tags/1.9.33-0.1/debian/default
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/default	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,7 @@
+# apt-proxy configuration
+
+## Filename to store pid of process
+#pidfile=/var/run/apt-proxy/apt-proxy.pid 
+
+## Log file
+#logfile=/var/log/apt-proxy.log

Added: tags/1.9.33-0.1/debian/dirs
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/dirs	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,7 @@
+etc/default
+etc/init.d
+usr/share/doc/apt-proxy
+usr/share/lintian/overrides/apt-proxy/
+usr/sbin
+var/cache/apt-proxy
+var/lib/apt-proxy

Added: tags/1.9.33-0.1/debian/docs
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/docs	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,5 @@
+doc/HISTORY
+README
+doc/UPGRADING
+doc/TODO
+doc/offline-tips

Added: tags/1.9.33-0.1/debian/init.d
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/init.d	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+rundir=/var/run/apt-proxy/ 
+pidfile=$rundir/apt-proxy.pid 
+logfile=/var/log/apt-proxy.log
+application=/usr/sbin/apt-proxy
+twistd=/usr/bin/twistd
+user=aptproxy
+group=nogroup
+
+[ -r /etc/default/apt-proxy ] && . /etc/default/apt-proxy
+
+test -x $twistd || exit 0
+test -r $application || exit 0
+
+# return true if at least one pid is alive
+alive()
+{
+    if [ -z "$*" ]; then
+	return 1
+    fi
+    for i in $*; do
+	if kill -0 $i 2> /dev/null; then
+	    return 0
+	fi
+    done
+
+    return 1
+}
+
+
+case "$1" in
+    start)
+	echo -n "Starting apt-proxy"
+	[ ! -d $rundir ] && mkdir $rundir
+	[ ! -f $logfile ] && touch $logfile
+	chown $user $rundir $logfile 
+	[ -f $pidfile ] && chown $user $pidfile
+	# Make cache files readable
+	umask 022
+	start-stop-daemon --start --quiet --exec $twistd -- \
+            --pidfile=$pidfile 	--rundir=$rundir --python=$application \
+	    --logfile=$logfile 	--no_save
+	echo "."	
+    ;;
+
+    stop)
+	echo -n "Stopping apt-proxy"
+	start-stop-daemon --stop --quiet --pidfile $pidfile
+	#
+	# Continue stopping until daemon finished or time over
+	#
+	count=0
+	pid=$(cat $pidfile 2>/dev/null)
+	while alive $pid; do
+		if [ $count -gt 20 ]; then
+			echo -n " aborted"
+			break;
+		elif [ $count = 1 ]; then
+			echo -n " [wait $count"
+		elif [ $count -gt 1 ]; then
+			echo -n " $count"
+		fi
+		count=$(expr $count + 1)
+		sleep 1
+		start-stop-daemon --stop --quiet --pidfile $pidfile
+	done
+	if [ $count -gt 1 ]; then
+		echo -n "]"
+	fi
+	echo "."	
+    ;;
+
+    restart)
+	$0 stop
+	$0 start
+    ;;
+    
+    force-reload)
+        $0 restart
+    ;;
+
+    *)
+	echo "Usage: /etc/init.d/apt-proxy {start|stop|restart|force-reload}" >&2
+	exit 1
+    ;;
+esac
+
+exit 0

Added: tags/1.9.33-0.1/debian/install
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/install	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,7 @@
+doc/apt-proxy.conf etc/apt-proxy
+bin/apt-proxy usr/sbin
+bin/apt-proxy-import usr/sbin
+bin/apt-proxy-v1tov2 usr/sbin
+apt_proxy/*.py usr/lib/python2.3/site-packages/apt_proxy
+apt_proxy/twisted_compat/*.py usr/lib/python2.3/site-packages/apt_proxy/twisted_compat
+debian/lintian-overrides usr/share/lintian/overrides/apt-proxy/
\ No newline at end of file

Added: tags/1.9.33-0.1/debian/lintian-overrides
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/lintian-overrides	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,2 @@
+apt-proxy: maintainer-script-needs-depends-on-netbase postinst
+apt-proxy: maintainer-script-needs-depends-on-netbase prerm

Added: tags/1.9.33-0.1/debian/logrotate
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/logrotate	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,11 @@
+/var/log/apt-proxy.log {
+	rotate 4
+	compress
+	weekly
+	delaycompress
+	missingok
+	postrotate
+		invoke-rc.d --quiet apt-proxy restart > /dev/null
+	endscript
+	notifempty
+}

Added: tags/1.9.33-0.1/debian/manpages
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/manpages	Thu Aug  3 10:12:44 2006
@@ -0,0 +1 @@
+doc/*.[58]

Added: tags/1.9.33-0.1/debian/po/POTFILES.in
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/POTFILES.in	Thu Aug  3 10:12:44 2006
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates

Added: tags/1.9.33-0.1/debian/po/ca.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/ca.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,92 @@
+# translation of ca.po to catalan
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+# Miguel Gea Milvaques <debian at miguelgea.com>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ca\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-10-16 13:41+0200\n"
+"Last-Translator: Miguel Gea Milvaques <debian at miguelgea.com>\n"
+"Language-Team: catalan <dl10n-catalan at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.10.2\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Actualitzant des del paquet pre-v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr "Pareix que esteu actualitzant des d'una versió de apt-proxy prèvia a v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"el apt-proxy s'ha reescrit en python i el format del nou fitxer de configuració "
+"és incompatible amb al versió anterior. Esperem que us agrade el nou i"
+"millor format :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Es construirà /etc/apt-proxy/apt-proxy-v2.conf basant-se en els paràmetres antics "
+"si no teniu encara aquest fitxer. En aquest cas, es farà una còpia de seguretat a "
+" /etc/apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr "Hi ha altres qüestions documentades a /usr/share/doc/apt-proxy/UPGRADING"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Questions d'actualització"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"El guió d'actualització ha volcat alguns avisos i s'enviaran per correu a"
+"root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr "Hauríeu de llegir aquestos avisos i /usr/share/doc/apt-proxy/UPGRADING i revisar la vostra configuració (/etc/apt-proxy/apt-proxy-v2.conf)"
+

Added: tags/1.9.33-0.1/debian/po/cs.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/cs.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,93 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-10-23 11:25+0200\n"
+"Last-Translator: Jan Outrata <outrataj at upcase.inf.upol.cz>\n"
+"Language-Team: Czech <debian-l10n-czech at debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Aktualizace z pre-v1.9 balíèkù."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr "Zdá se, ¾e aktualizujete z verze apt-proxy pøed v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"apt-proxy bylo pøepsáno do pythonu a nový formát konfiguraèního souboru je "
+"nekompatibilní s pøedchozí verzí. Doufáme, ¾e shledáte nový formát lep¹ím :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Vytvoøím /etc/apt-proxy/apt-proxy-v2.conf na základì va¹ich starých "
+"nastaveních, pokud ji¾ takový soubor nemáte. V ka¾dém pøípadì bude zapsán "
+"zálo¾ní soubor do /etc/apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"V /usr/share/doc/apt-proxy/UPGRADING jsou dokumentovány je¹tì dal¹í problémy."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Problémy aktualizace"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"Aktualizaèní skript vyprodukoval nìjaká varování, která byla zaslána mailem "
+"na root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Mìli byste si tato varování a /usr/share/doc/apt-proxy/UPGRADING pøeèíst a "
+"zkontrolovat va¹i konfiguraci (/etc/apt-proxy/apt-proxy-v2.conf)"

Added: tags/1.9.33-0.1/debian/po/da.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/da.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,97 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy 1.9.18\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-11-21 07:09+0200\n"
+"Last-Translator: Morten Brix Pedersen <morten at wtf.dk>\n"
+"Language-Team: Danish <dansk at klid.dk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Opgraderer fra præ-v1.9 pakker."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+"Du ser ud til at opgradere fra en version af apt-proxy tidligere end v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"apt-proxy er blevet omskrevet i python og det nye opsætningsfilformat er "
+"inkompatibelt med den tidligere version. Forhåbentlig vil du bedre kunne "
+"lide det nye format :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Jeg vil bygge /etc/apt-proxy/apt-proxy-v2.conf baseret på dine gamle "
+"indstillinger hvis du ikke allerede har en sådan fil. I hvert tilfælde, "
+"vil en sikkerhedskopi blive skrevet til "
+"/etc/apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"Der er også andre ting du skal være opmærksom på, se /usr/share/doc/apt-"
+"proxy/UPGRADING"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Opgraderingsproblemer"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"Opgraderingsskriptet havde nogle advarsler, og de er blevet sendt med post "
+"til root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Du bør læse disse advarsler og /usr/share/doc/apt-proxy/UPGRADING, og rette "
+"din opsætningsfil til (/etc/apt-proxy/apt-proxy-v2.conf)"

Added: tags/1.9.33-0.1/debian/po/de.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/de.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,99 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy 1.9.32\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2006-01-23 18:15+0100\n"
+"Last-Translator: Johannes Starosta <feedback-an-johannes at arcor.de>\n"
+"Language-Team: German <debian-l10n-german at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Aktualisierung eines Pakets in einer Version vor 1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+"Sie wollen eine Version von apt-proxy aktualisieren, die älter als die "
+"Version 1.9 ist."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"apt-proxy wurde in Python neugeschrieben. Daher ist das Format der "
+"Konfigurationsdatei inkompatibel mit früheren Versionen. Hoffentlich gefällt "
+"Ihnen das neue Format besser :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Die Datei /etc/apt-proxy/apt-proxy-v2.conf wird aufgrund Ihrer alten "
+"Einstellungen erstellt, falls diese Datei nicht bereits vorhanden ist. Es "
+"wird im jeden Fall eine Sicherheitskopie /etc/apt-proxy/apt-proxy-v2.conf."
+"backup erstellt."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"Ein paar andere Probleme werden in /usr/share/doc/apt-proxy/UPGRADING "
+"beschrieben."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Probleme bei der Aktualisierung"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"Die Warnungen des Aktualisierungsskripts wurden per E-Mail an "
+"\"root at localhost\" geschickt."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Sie sollten diese Fehlermeldungen und /usr/share/doc/apt-proxy/UPGRADING "
+"lesen und Ihre Konfigurationsdatei (/etc/apt-proxy/apt-proxy-v2.conf) "
+"nochmal überprüfen."

Added: tags/1.9.33-0.1/debian/po/es.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/es.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,114 @@
+# apt-proxy po-debconf translation to Spanish
+# Copyright (C) 2005 Software in the Public Interest
+# This file is distributed under the same license as the apt-proxy package.
+#
+# Changes:
+#  - Initial translation
+#         César Gómez Martín <cesar.gomez at gmail.com>
+#
+#
+#   Traductores, si no conoce el formato PO, merece la pena leer la
+#   documentación de gettext, especialmente las secciones dedicadas a este
+#   formato, por ejemplo ejecutando:
+#          info -n '(gettext)PO Files'
+#          info -n '(gettext)Header Entry'
+# Equipo de traducción al español, por favor, lean antes de traducir
+# los siguientes documentos:
+#
+#  - El proyecto de traducción de Debian al español
+#    http://www.debian.org/intl/spanish/
+#    especialmente las notas de traducción en
+#    http://www.debian.org/intl/spanish/notas
+#
+#  - La guía de traducción de po's de debconf:
+#    /usr/share/doc/po-debconf/README-trans
+#    o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-10-04 17:40+0100\n"
+"Last-Translator: César Gómez Martín <cesar.gomez at gmail.com>\n"
+"Language-Team: Debian l10n spanish <debian-l10n-spanish at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Spanish\n"
+"X-Poedit-Country: SPAIN\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Actualizando a partir de los paquetes pre-v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+"Parece que está actualizando a partir de una versión de apt-proxy anterior a "
+"la v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"Se ha reescrito apt-proxy utilizando python y el nuevo formato del fichero "
+"de configuración es incompatible con las versiones anteriores. Esperemos que "
+"le guste más el nuevo formato :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+#, fuzzy
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Si aun no lo tiene, se construirá el fichero /etc/apt-proxy/apt-proxy-v2."
+"conf en base a sus antiguas configuraciones. En cualquier caso, se guardará "
+"una copia de seguridad del fichero en /etc/apt-proxy/apt-proxy-v2.conf."
+"backup."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"También hay otros temas documentados en /usr/share/doc/apt-proxy/UPGRADING"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Cuestiones sobre la actualización"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"El guión de actualización desechó algunas advertencias que se han enviado a "
+"la dirección root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Debería leer esas advertencias y /usr/share/doc/apt-proxy/UPGRADING. También "
+"debería revisar su configuración (/etc/apt-proxy/apt-proxy-v2.conf)."

Added: tags/1.9.33-0.1/debian/po/fr.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/fr.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,98 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+# Olivier Trichet <olivier.trichet at freesurf.fr>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy_1.9.32\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-09-16 20:40+0200\n"
+"Last-Translator: Olivier Trichet <olivier.trichet at freesurf.fr>\n"
+"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.10.2\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Mise à niveau depuis une version antérieure à 1.9"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+"La mise à niveau en cours s'applique à une version d'apt-proxy antérieure à "
+"1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"Apt-proxy a été réécrit en python et le nouveau format du fichier de "
+"configuration est incompatible avec l'ancien."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Le fichier de configuration /etc/apt-proxy/apt-proxy-v2.conf va être "
+"construit à partir de votre ancien fichier de configuration, s'il existe. "
+"Dans ce cas, une copie de sauvegarde en sera faite dans /etc/apt-proxy/apt-"
+"proxy-v2.conf.backup."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"D'autres problèmes liés à cette mise à niveau sont documentés dans /usr/"
+"share/doc/apt-proxy/UPGRADING."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Problèmes lors de la mise à niveau"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"Le script de mise à niveau a émis des messages d'avertissements. Ils ont été "
+"envoyés par courriel à root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Il est recommandé de lire ces avertissements ainsi que le fichier /usr/share/"
+"doc/apt-proxy/UPGRADING et d'adapter la configuration qui se trouve dans le "
+"fichier /etc/apt-proxy/apt-proxy-v2.conf."
+

Added: tags/1.9.33-0.1/debian/po/ja.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/ja.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,95 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy 1.9.17\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2004-09-01 20:08+0900\n"
+"Last-Translator: Hideki Yamane <henrich at samba.gr.jp>\n"
+"Language-Team: Japanese <debian-japanese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-JP\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "¥Ð¡¼¥¸¥ç¥ó 1.9 °ÊÁ°¤Î¥Ñ¥Ã¥±¡¼¥¸¤«¤é¤Î¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ë¤Ä¤¤¤Æ"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+"apt-proxy ¤Î¥Ð¡¼¥¸¥ç¥ó 1.9 °ÊÁ°¤«¤é¤Î¥¢¥Ã¥×¥°¥ì¡¼¥É¤ò¹Ô¤ª¤¦¤È¤·¤Æ¤¤¤Þ¤¹¡£"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"apt-proxy ¤Ï python ¤Ç½ñ¤­Ä¾¤µ¤ì¡¢¿·¤·¤¤ÀßÄê¥Õ¥¡¥¤¥ë·Á¼°¤Ï°ÊÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤È"
+"¤Ï¸ß´¹À­¤¬¤¢¤ê¤Þ¤»¤ó¡£¿·¤·¤¤·Á¼°¤¬¤ªµ¤¤ËÆþ¤ì¤Ð¹¬¤¤¤Ç¤¹ :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+#, fuzzy
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"¤Þ¤À¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¡¢°ÊÁ°¤ÎÀßÄê¤ò¸µ¤Ë /etc/apt-proxy/apt-proxy-v2."
+"conf ¤òºîÀ®¤·¤Þ¤¹¡£¤É¤Á¤é¤Ë¤·¤Æ¤â¡¢¥Ð¥Ã¥¯¥¢¥Ã¥×¥Õ¥¡¥¤¥ë¤Ï /etc/apt-proxy/apt-"
+"proxy-v2.conf.backup ¤Ë½ñ¤­½Ð¤µ¤ì¤Þ¤¹¡£"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr "/usr/share/doc/apt-proxy/UPGRADING ¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë¾¤Î»öÊÁ¤Ë¤Ä¤¤¤Æ"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ë¤Ä¤¤¤Æ"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"¥¢¥Ã¥×¥°¥ì¡¼¥É¤Î¥¹¥¯¥ê¥×¥È¤Ï·Ù¹ð¤ò´ö¤Ä¤«½ÐÎϤ·¡¢root at localhost °¸¤ËÁ÷¿®¤·¤Þ¤·"
+"¤¿¡£"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"¤³¤ì¤é¤Î·Ù¹ð¤È /usr/share/doc/apt-proxy/UPGRADING ¤òÆɤó¤Ç¡¢ÀßÄê (/etc/apt-"
+"proxy/apt-proxy-v2.conf) ¤ò¸«Ä¾¤¹É¬Íפ¬¤¢¤ê¤Þ¤¹¡£"

Added: tags/1.9.33-0.1/debian/po/nl.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/nl.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,73 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2006-03-10 14:00+0100\n"
+"Last-Translator: Bart Cornelis <cobaco at linux.be>\n"
+"Language-Team: debian-l10n-duth <debian-l10n-dutch at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Er wordt opgewaardeerd van pre-v1.9 pakketten."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr "Zo te zien waardeert u op van een apt-proxy versie ouder dan v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "apt-proxy has been rewritten in python and the new configuration file format is incompatible with previous version. Hopefully you will like the new format better :)"
+msgstr "apt-proxy is herschreven in python en het nieuwe bestandsformaat van het configuratiebestand is incompatibel met de de vorige versie. Hopelijk vindt u het nieuwe formaat beter :-)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if you didn't already have such file. In any case, a backup file will be written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr "Wanneer /etc/apt-proxy/apt-proxy-v2.conf nog niet bestaat wordt deze opgebouwd aan de hand van uw oude instellingen. Er wordt altijd een reservekopie opgeslagen onder de naam /etc/apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr "Er zijn verdere issues gedocumenteerd in /usr/share/doc/apt-proxy/UPGRADING"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Opwaarderingsissues"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "The upgrading script dumped some warnings and they have been mailed to root at localhost."
+msgstr "Het opwaarderingsscript gaf enkele waarschuwingen; deze zijn naar root at localhost gemaild."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr "U kunt deze waarschuwingen en /usr/share/doc/apt-proxy/UPGRADING best nalezen en vervolgens uw configuratie herzien (/etc/apt-prox/apt-proxy-v2.conf)"
+

Added: tags/1.9.33-0.1/debian/po/pt.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/pt.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,89 @@
+# Portuguese translation of apt-proxy's debconf messages.
+# 2005, Rui Branco <ruipb at netcabo.pt>>
+#
+# 2005-09-25 - Rui Branco <ruipb at netcabo.pt>
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy 1.9.32\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-09-25 20:48+0100\n"
+"Last-Translator: Rui Branco <ruipb at netcabo.pt>\n"
+"Language-Team: Portuguese <traduz at debianpt.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "A actualizar a partir de pacotes pre-v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+"Pareçe estar a actualizar a partir de uma versão do apt-proxy anterior à "
+"v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"O apt-proxy foi re-escrito em python e a nova configuração de formato de "
+"ficheiro é incompatível com versões anteriores. Felizmente irá gostar mais "
+"do novo formato :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"O /etc/apt-proxy/apt-proxy-v2.conf será criado tendo como base as "
+"suasantigas configurações se ainda não tiver este ficheiro. Em todo o caso, "
+"um ficheiro de backup será escrito em /etc/apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"Existem também outras informações documentadas em /usr/share/doc/apt-proxy/"
+"UPGRADING"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Informações sobre a actualização"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"O scrip' de actualização originou alguns avisos, foram enviadospara "
+"root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Deverá ler esses avisos e/usr/share/doc/apt-proxy/UPGRADING e rever a sua "
+"configuração (/etc/apt-proxy/apt-proxy-v2.conf)"

Added: tags/1.9.33-0.1/debian/po/pt_BR.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/pt_BR.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,97 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-08-18 12:22-0300\n"
+"Last-Translator: André Luís Lopes <andrelop at debian.org>\n"
+"Language-Team: Debian-BR Project <debian-l10n-portuguese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Atualizando a partir de pacotes anteriores à versão 1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+"Você parece estar atualizando a partir de uma versão do apt-proxy anterior à "
+"versão 1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"O apt-proxy foi reescrito em python e o novo formato do arquivo de "
+"configuação é incompatível com as versões anteriores. Possivelmente você "
+"gostará mais do novo formato :-)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Eu irei constuir o arquivo /etc/apt-proxy/apt-proxy-v2.conf com base em suas "
+"configurações antigas caso você ainda não o tenha. De qualquer forma, um "
+"arquivo de backup será gravado como /etc/apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"Também existem outros problemas documentados no arquivo /usr/share/doc/apt-"
+"proxy/UPGRADING."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Problemas de atualização"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"O script de atualização gerou alguns avisos e os mesmos foram enviados à "
+"você por e-mail no endereço root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Você deverá ler tais avisos, bem como o arquivo /usr/share/doc/apt-proxy/"
+"UPGRADING, e revisar sua configuração (em /etc/apt-proxy/apt-proxy-v2.conf)"

Added: tags/1.9.33-0.1/debian/po/ru.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/ru.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,97 @@
+# translation of apt-proxy_1.9.30_ru.po to Russian
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+# Yuriy Talakan' <yt at amur.elektra.ru>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy_1.9.30_ru\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-05-23 14:41+1000\n"
+"Last-Translator: Yuriy Talakan' <yt at amur.elektra.ru>\n"
+"Language-Team: Russian <debian-l10n-russian at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.9.1\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Обновление пакета с версии пред-v1.9"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr "Похоже, что вы обновляетесь с версии apt-proxy ранее v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"apt-proxy был переписан на python и формат нового файла конфигурации "
+"несовместим с предыдущей версией. Недеемся, вам понравится новый формат :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+#, fuzzy
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Я создам /etc/apt-proxy/apt-proxy-v2.conf на основе ваши старых настроек, "
+"если у вас его еще нет. В любом случае, запасной файл будет сохранен в /etc/"
+"apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr "Остальные детали описаны в /usr/share/doc/apt-proxy/UPGRADING"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Детали обновления"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"Сценарий обновления сохранил некоторые предупреждения и отправил их "
+"наroot at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Вы должны прочитать эти предупреждения  и /usr/share/doc/apt-proxy/"
+"UPGRADING, а затем пересмотреть свои настройки (/etc/apt-proxy/apt-proxy-v2."
+"conf)"

Added: tags/1.9.33-0.1/debian/po/sv.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/sv.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,94 @@
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# Developers do not need to manually edit POT or PO files.
+# , fuzzy
+# 
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy 1.9.32\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-10-04 22:03+0200\n"
+"Last-Translator: Daniel Nylander <po at danielnylander.se>\n"
+"Language-Team: Swedish <sv at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Uppgraderar från före-v1.9-paket."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr "Du verkar uppgradera från en version av apt-proxy utgiven före v1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"apt-proxy har skrivits om i python och det nya konfigurationsformatet är "
+"inte kompatibelt med den tidigare versionen. Hoppas att du tycker om det nya "
+"formatet bättre :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Jag kommer att bygga /etc/apt-proxy/apt-proxy-v2.conf baserat på dina gamla "
+"inställningar om du inte redan har en sådan fil. I vilket fall som helst så "
+"kommer en backupfil skrivas, /etc/apt-proxy/apt-proxy-v2.conf.backup"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"Det finns också andra problem dokumenterade i /usr/share/doc/apt-proxy/"
+"UPGRADING"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Uppgraderingsproblem"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"Uppgraderingsskriptet har dumpat några varningar och de har e-postats till "
+"root at localhost."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Du bör läsa dessa varningar och /usr/share/doc/apt-proxy/UPGRADING och "
+"omarbeta din konfiguration (/etc/apt-proxy/apt-proxy-v2.conf)"

Added: tags/1.9.33-0.1/debian/po/templates.pot
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/templates.pot	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,84 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""

Added: tags/1.9.33-0.1/debian/po/vi.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/po/vi.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,87 @@
+# Vietnamese Translation for apt-proxy.
+# Copyright © 2005 Free Software Foundation, Inc.
+# Clytie Siddall <clytie at riverland.net.au>, 2005.
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy 1.9.30\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-18 12:19-0300\n"
+"PO-Revision-Date: 2005-06-12 12:04+0930\n"
+"Last-Translator: Clytie Siddall <clytie at riverland.net.au>\n"
+"Language-Team: Vietnamese <gnomevi-list at lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "Upgrading from pre-v1.9 packages."
+msgstr "Cập nhât từ các gói tin trước phiên bản 1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid "You seem to be upgrading from a version of apt-proxy previous to v1.9."
+msgstr "Hình như bạn đang cập nhật từ phiên bản apt-proxy trước 1.9."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"apt-proxy has been rewritten in python and the new configuration file format "
+"is incompatible with previous version. Hopefully you will like the new "
+"format better :)"
+msgstr ""
+"Trình apt-proxy được viết bằng Python thì dạng thức tập tin mới không tương "
+"thích với phiên ban trươc nào. Mong bạn thích dạng thức mới. :)"
+
+#. Type: note
+#. Description
+#: ../templates:3
+#, fuzzy
+msgid ""
+"I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings if "
+"you didn't already have such file. In any case, a backup file will be "
+"written to /etc/apt-proxy/apt-proxy-v2.conf.backup"
+msgstr ""
+"Sẽ xây dụng «/etc/apt-proxy/apt-proxy-v2.conf» đựa vào các thiết lập cũ của "
+"bạn nếu bạn chưa có tập tin như vậy. Trong bất cứ trường hợp nào, sẽ ghi một "
+"tập tin lưu trữ vào «/etc/apt-proxy/apt-proxy-v2.conf.backup»."
+
+#. Type: note
+#. Description
+#: ../templates:3
+msgid ""
+"There are also other issues documented in /usr/share/doc/apt-proxy/UPGRADING"
+msgstr ""
+"Cũng có một số vấn đề khác được diễn tả trong tài liệu «/usr/share/doc/apt-"
+"proxy/UPGRADING» (cập nhật)"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid "Upgrading issues"
+msgstr "Vấn đề cập nhật"
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"The upgrading script dumped some warnings and they have been mailed to "
+"root at localhost."
+msgstr ""
+"Tập lệnh cập nhật đã đổ một số cảnh báo mà được gởi cho «root at localhost»."
+
+#. Type: note
+#. Description
+#: ../templates:19
+msgid ""
+"You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and "
+"revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)"
+msgstr ""
+"Bạn hãy đọc những cảnh báo ấy và tài liệu «/usr/share/doc/apt-proxy/"
+"UPGRADING» và cũng sửa đổi cấu hình của bạn («/etc/apt-proxy/apt-proxy-v2."
+"conf»)."

Added: tags/1.9.33-0.1/debian/postinst
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/postinst	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,83 @@
+#! /bin/sh
+
+NAME=apt-proxy
+APTPROXY_USER=aptproxy
+APTPROXY_LOGFILE=/var/log/$NAME.log
+CACHEDIR=/var/cache/apt-proxy
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+set -e
+case "$1" in
+    configure)
+	# Check if the user exist and do what is needed
+	if ! id $APTPROXY_USER > /dev/null 2>&1; then
+	    # Create user
+	    echo creating $APTPROXY_USER user...
+	    adduser --quiet --system --ingroup nogroup \
+		--home $CACHEDIR --no-create-home $APTPROXY_USER
+
+	    # Make apt-proxy user own cache directory
+	    chown -R $APTPROXY_USER $CACHEDIR
+	    # Create a blank logfile owned by apt-proxy user
+	    touch $APTPROXY_LOGFILE
+	    chown $APTPROXY_USER:adm $APTPROXY_LOGFILE
+	    chmod 640 $APTPROXY_LOGFILE
+	fi
+
+	PREV="$2"
+	db_fget $NAME/upgrading-v2 had_v2_conf || true
+	had_v2_conf=$RET
+	
+	if dpkg --compare-versions "$PREV"  lt-nl 1.9; then
+	    if [ -x /usr/sbin/update-inetd ]; then
+	      echo "Disabling inetd's apt-proxy v1 line."
+	      update-inetd --comment-chars "#<apt-proxy-v2># " --disable 9999
+	      invoke-rc.d inetd restart
+	    fi
+	    db_fset $NAME/upgrading-v2 seen false || true
+	    db_input medium $NAME/upgrading-v2 || true
+	    db_go
+	fi
+	if
+	    dpkg --compare-versions "$PREV"  lt-nl 1.9 && ( ! $had_v2_conf ) \
+	    && [ -r /etc/apt-proxy/apt-proxy.conf ]
+	then
+	    echo Customising configuration file based on old settings.
+	    cp -a --backup=numbered /etc/apt-proxy/apt-proxy-v2.conf \
+			/etc/apt-proxy/apt-proxy-v2.conf.backup
+	    OUTPUT=$(/usr/sbin/apt-proxy-v1tov2 /etc/apt-proxy/apt-proxy.conf \
+					/etc/apt-proxy/apt-proxy-v2.conf.backup\
+					2>&1 \
+					> /etc/apt-proxy/apt-proxy-v2.conf )
+	    echo "$OUTPUT" > /var/log/apt-proxy-v1tov2.log
+	    chown aptproxy:adm /var/log/apt-proxy-v1tov2.log
+	    chmod 640 /var/log/apt-proxy-v1tov2.log
+	    echo "The log of conversion was save in /var/log/apt-proxy-v1tov2.log."
+	    if [ -n "$OUTPUT" ]; then
+		db_fset $NAME/upgrading-v2-result seen false
+		db_input high $NAME/upgrading-v2-result || true
+		db_go
+	    fi
+	fi
+	# Older versions got database permissions wrong #288829
+	if dpkg --compare-versions "$PREV" lt-nl 1.9.27; then
+	    if [ -d /var/cache/apt-proxy/.apt-proxy ]; then
+		echo "Fixing database owner."
+		chown -R aptproxy.nogroup /var/cache/apt-proxy/.apt-proxy
+	    fi
+	fi
+        ;;
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        ;;
+esac
+
+db_stop
+
+#DEBHELPER#
+
+exit 0

Added: tags/1.9.33-0.1/debian/postrm
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/postrm	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+NAME=apt-proxy
+CACHEDIR=/var/cache/apt-proxy
+
+if test "$1" = "purge"; then
+  rm -rf /var/log/$NAME.log
+
+  # Don't do this until ap1 is no longer used
+  #echo Purging apt-proxy cache directory
+  #rm -rf $CACHEDIR
+
+  #if id aptproxy >/dev/null; then
+  #  deluser aptproxy
+  #fi
+fi
+

Added: tags/1.9.33-0.1/debian/preinst
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/preinst	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+#DEBHELPER#
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+if [ -e /etc/apt-proxy/apt-proxy-v2.conf ]; then
+	db_fset apt-proxy/upgrading-v2 had_v2_conf true
+else
+	db_fset apt-proxy/upgrading-v2 had_v2_conf false
+fi
+
+db_stop

Added: tags/1.9.33-0.1/debian/prerm
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/prerm	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+NAME=apt-proxy
+
+dpkg --listfiles $NAME |
+        awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+        xargs rm -f >&2
+
+case "$1" in
+	upgrade)
+	if dpkg --compare-versions "$2"  lt-nl 1.9; then
+                if [ -x /usr/sbin/update-inetd ]; then
+	 	  echo "Enabling inetd's apt-proxy v1 line."
+	    	  update-inetd --comment-chars "#<apt-proxy-v2># " --enable 9999
+		fi
+	fi
+	;;
+esac

Added: tags/1.9.33-0.1/debian/rules
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/rules	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,71 @@
+#!/usr/bin/make -f
+
+PKGDIR=debian/apt-proxy
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	$(MAKE) -C doc apt-proxy-import.8
+	po4a doc/po4a.cfg
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f doc/*.??.*
+	$(MAKE) -C doc clean
+	rm -f build-stamp install-stamp AptProxy-shutdown-2.tap
+	find . -name "*.pyc" |xargs -r rm
+	find . -name "*.tmlc" |xargs -r rm
+	dh_clean
+	debconf-updatepo
+
+install: install-stamp
+install-stamp: build-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	dh_install
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installman
+	dh_installchangelogs
+	dh_installlogrotate
+	dh_python
+	dh_installinit
+
+	#install -g root -o root -m 755 \
+	#	apt-proxy debian/apt-proxy/usr/sbin/apt-proxy
+	#install -g root -o root -m 755 \
+	#	apt-proxy-import debian/apt-proxy/usr/sbin/apt-proxy-import
+	#install -g root -o root -m 644 \
+	#	apt-proxy.conf debian/apt-proxy/etc/apt-proxy/apt-proxy.conf
+	
+	# Temporary rename to apt-proxy.conf to make it easier to
+	# upgrade/downgrade between v1 and v2.
+	mv $(PKGDIR)/etc/apt-proxy/apt-proxy.conf $(PKGDIR)/etc/apt-proxy/apt-proxy-v2.conf
+
+	touch install-stamp
+
+binary-arch: build install
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install

Added: tags/1.9.33-0.1/debian/templates
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/debian/templates	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,24 @@
+Template: apt-proxy/upgrading-v2
+Type: note
+_Description: Upgrading from pre-v1.9 packages.
+ You seem to be upgrading from a version of apt-proxy previous to v1.9.
+ .
+ apt-proxy has been rewritten in python and the new configuration file
+ format is incompatible with previous version. Hopefully you will like the
+ new format better :)
+ .
+ I will build /etc/apt-proxy/apt-proxy-v2.conf based on your old settings
+ if you didn't already have such file. In any case, a backup file will be
+ written to /etc/apt-proxy/apt-proxy-v2.conf.backup
+ .
+ There are also other issues documented in
+ /usr/share/doc/apt-proxy/UPGRADING
+
+Template: apt-proxy/upgrading-v2-result
+Type: note
+_Description: Upgrading issues
+ The upgrading script dumped some warnings and they have been mailed to
+ root at localhost.
+ .
+ You should read those warnings and /usr/share/doc/apt-proxy/UPGRADING and
+ revise your configuration (/etc/apt-proxy/apt-proxy-v2.conf)

Added: tags/1.9.33-0.1/doc/.cvsignore
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/.cvsignore	Thu Aug  3 10:12:44 2006
@@ -0,0 +1 @@
+apt-proxy-import.8

Added: tags/1.9.33-0.1/doc/HISTORY
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/HISTORY	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,44 @@
+1.3.0:
+	Chris Halls:
+	  - Add HTTP/FTP backend support using wget
+	  - Add apt-proxy-import, a script to import .debs into the cache
+	  - Improve reliability when several clients are active
+	  - Add FAQ section to README
+	Manuel Estrada Sainz:
+	  - In apt-proxy-import, rename .debs and add (experimental) fuzzy
+	    logic to determine the directory where a file should be imported
+1.2.1:
+	Reset access times of old versions when copying
+	Add Contents- to control files for apt-file compatibility
+1.2.0:
+	Gerhard Muntingh:
+	  - Add logfile and configfile command line options
+	Chris Halls:
+	  - Integrate debian packaging directory into source
+	  - Revert to using dd while streaming because tail does not
+	    return an error when the file is moved away from under it.  Fixes
+	    the most common file corruption problems while streaming
+	  - Check for corrupted .deb and .gz files in the cache before sending
+	    them to the client.
+	  - Use the package filelists logic from Martin Schwenke to send the
+	    size of package files before downloading, meaning connection
+	    keep-alive logic can be used.
+1.1.4:
+	Martin Schwenke:
+	  - Add MAX_VERIONS to limit the number of versions of a particular
+	    package to keep.
+	  - Fix bug in cleanup that caused files from other packages to be deleted
+1.1.3:
+        Stephen Rothwell:
+   	  - Use stat and tail if available instead of wc -c and dd 
+	  - Honour client keep-alive header
+1.1.0:
+	Added keep-alive support: large speedup.
+	Added `+' prefix for preferred backends for control files.
+	Suppress spurious messages in logs.
+	Fix streaming.
+	Cache misses on Release files.
+	Deal with streaming out of binary-all/ (SIZE found correctly).
+	Avoid runaway apt-proxy processes.
+	Added KEEP_STATS option and copy potentially similar files.
+	

Added: tags/1.9.33-0.1/doc/Makefile
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/Makefile	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,13 @@
+apt-proxy-import.8: ../bin/apt-proxy-import apt-proxy-import.8.inc
+	PYTHONPATH="`cd ..;pwd`" \
+	  help2man \
+		-N \
+		-i apt-proxy-import.8.inc \
+		--section="8" \
+		--source="Debian GNU/Linux" \
+		--manual=" " \
+		-o $@ \
+		../bin/apt-proxy-import
+
+clean:
+	rm -f apt-proxy-import.8

Added: tags/1.9.33-0.1/doc/TODO
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/TODO	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,147 @@
+File permision's on the cache are too strict, there is nothing wrong in all
+users reading the debs and Packages files.
+
+it looks like it is leaking FileVerifiers
+
+Verification times out with big files and considers them corrupted even if
+they are OK.
+	- We could have three levels of checking.
+		1) stat results if we have
+		2) md5sum if we have and stat check fails
+		3) current checking otherwise.
+
+	 - when we find that stat doesn't match, we schedule a check and serve
+	   anyway. We don't check before serving.
+
+To get streaming from rsync without the LD_PRELOAD hack:
+	- Since we know the pid, we can read from /proc/$pid/fd/3 and get the
+	  streaming from there ala 'tail -f'
+
+---------------- "Not so urgent" mark ---------------------------
+
+Handle database corruption in a more conservative way.
+
+Support /etc/init.d/apt-proxy reload as kill -HUP
+  - auto reload apt-proxy.conf support too?
+
+Report an error at /etc/init.d/apt-proxy start if something is already
+listening on the port (current behaviour is no error and message in logfile only)
+
+Add a configuration parameter which says 'never delete the final version of
+a package, even if older than max_age'
+	Maybe it should be "never delete files which still appear in current
+	Packages.gz listings"
+
+When a file transfer is finished, move the temporary file instead of coping
+it.
+
+Mirror house-keeping:
+MAX_VERSIONS: keep track of versions per distro (potato/woody/sid)
+		python-apt should help on that
+MAX_CACHE_SIZE: new parameter to limit the maximum disk size that apt-proxy
+                uses for the cache directory
+
+Take care of python-apt memory leak:
+	deb http://ftp.uk.debian.org/debian/ sid main non-free contrib
+		1200 iterations (load, unload)
+		leak 528KB (3676-4204) in increments of 36 kB
+		0.44KB per iteration.
+	deb http://ftp.uk.debian.org/debian/ sid contrib
+		2300 iterations (load, unload)
+		leak 360KB (3676-4036) in increments of 36 kB
+		0.15KB per iteration.
+
+If we overwrite a cached file while it is being read by an static.FileTransfer
+things may go wrong.
+	Maybe we should write an AptProxyClientFile so it can be added to
+	factory.runningClients to prevent that.
+
+Cleanup orphan entries in packages.db also
+
+Implement HEAD method
+
+Parse options:
+	--conf
+	...
+
+per backend 'min_age'
+	we won't bother to update a Packages file before it is "min_age" old
+
+rsync only Packages files, for the rest only ftp and http
+	updating a corrupt .deb is probably rare enough not to be worth it.
+
+Consider "Pargma: no-cache" and "Cache-Control: no-cache" to make the client
+	do "verify_file" and tell us that the file is corrupt
+
+try to use libapt's backend clients
+
+
+Is process.Process a producer? 
+
+Mirror house-keeping:Generate Packages/Release/... for the currently available
+	stuff
+	
+auto generate a sample sources.list for clients
+
+consider acting as a real proxy instead of as a "fake" server, this way
+sources.list wouldn't need to be modified and apt could be forced to ignore
+http_proxy environment variable.
+
+Add support to make apt-proxy request to a another proxy like squid.
+
+consider doing file integrity checks after downloading instead of before
+serving to improve performance.
+
+autogenerate backend configuration using netselect-apt or similar
+generate a config file from sources.list
+
+Consider implementing rproxy
+	- for cascading apt-proxy.
+	- to access mirrors which may have it.
+	- sincronizing two caches
+
+Consider using apt-build to get "auto recompiled for your processor" packages.
+ - warning apt-build changes your system compiler.. ugh.  Chris
+
+Deal with permissions problems in the cache gracefully, not like this:
+
+22/08/2002 17:23 [AptProxy,1,192.168.60.24] [debug:9]CHECKING_CACHED
+22/08/2002 17:23 [-] [gzip:9]/var/cache/apt-proxy/security/dists/sarge/updates/non-free/binary-i386/Packages.gz:          0.0%22/08/2002 17:23 [-]
+22/08/2002 17:23 [-] [verify:9]Process Status: 0
+22/08/2002 17:23 [-] [verify:9]unknown file: not verified
+22/08/2002 17:23 [-]
+22/08/2002 17:23 [-] [debug:9]NOT_CACHED
+22/08/2002 17:23 [-] [debug:9]apt_proxy.apt_proxy.AptProxyClientHttp
+22/08/2002 17:23 [-] [client:9]Request uri: /security/dists/sarge/updates/non-free/binary-i386/Release
+22/08/2002 17:23 [-] [gzip:9]Status: 0
+22/08/2002 17:23 [-] Traceback (most recent call last):
+22/08/2002 17:23 [-]   File "/usr/lib/python2.1/site-packages/apt_proxy/twisted_compat/process.py", line 310, in maybeCallProcessEnded
+22/08/2002 17:23 [-]     self.proto.processEnded()
+22/08/2002 17:23 [-]   File "/usr/lib/python2.1/site-packages/apt_proxy/apt_proxy.py", line 789, in processEnded
+22/08/2002 17:23 [-]     self.aptDataEnd(self.transfered)
+22/08/2002 17:23 [-]   File "/usr/lib/python2.1/site-packages/apt_proxy/apt_proxy.py", line 359, in aptDataEnd
+22/08/2002 17:23 [-]     f = open(self.local_file, "w")
+22/08/2002 17:23 [-] exceptions.IOError: [Errno 13] Permission denied: '/var/cache/apt-proxy/security/dists/sarge/updates/non-free/binary-i386/Packages'
+22/08/2002 17:23 [AptProxyClientHttp,client] [http_client:9]GET:/debian-security/dists/sarge/updates/non-free/binary-i386/Rele
+
+Accept numeric ports in backend configuration
+
+---------------- Clean up of naming conventions -------------
+
+To help Chris get his head around the code :)
+
+Some suggestions that were hashed out:
+
+- Reduce imports at top of file -
+16:54 < ranty> but I don't understand how you plan to fix the namespace problem.
+16:56 < haggai> oh, not really.  My only suggestion is to avoid excessibe use of 'import', or maybe to split into smaller source files
+move 'import' to the place where it is needed if posible.
+
+---------------- OLD LIST from v1 ---------------------------
+TODO list for apt-proxy
+
+- Return a better error message if the backend servers do not exist, rather
+  than 'directory does not exist'
+
+- Add debconf questions for default user and cache directory
+

Added: tags/1.9.33-0.1/doc/UPGRADING
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/UPGRADING	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,87 @@
+
+UPGRADING FROM <= 1.9.5
+-----------------------
+
+	The following files may be left over when you upgrade from
+	apt-proxy-v2 package. And since apt-proxy-v2 was never uploaded to
+	Debian mirrors I won't bother with it.
+
+	I understand that if you were brave enough to install such an
+	experimental package you are brave enough to take care of the left
+	overs.
+
+		/etc/init.d/apt-proxy-v2
+		/etc/default/apt-proxy-v2
+		/var/log/apt-proxy-v2.log*
+ 
+UPGRADING FROM 1.3.x to 1.9.x
+-----------------------------
+
+	You should be able to upgrade/downgrade between 1.3.x and 1.9.x
+	without much trouble.
+
+	If you don't have /etc/apt-proxy/apt-proxy-v2.conf when upgrading from
+	1.3.x to 1.9.x, the postinst will provide one for you based on your
+	current /etc/apt-proxy/apt-proxy.conf using apt-proxy-v1tov2(8)
+	script. 
+
+	IMPROVEMENTS
+	------------
+	
+	- Much better performance.
+	
+	- Code much easier to maintain.
+
+	- More reliable.
+		- Well, it is still young and wider testing may reveal
+		  problems.
+
+	REGRESIONS
+	----------
+
+	- There is no statistics gathering
+		If there is interest I'll try, but there are more important
+		things.
+	
+	- multiple server backends are not implemented.
+		After releasing current code, and having it a little exercised
+		this will bump to the top of the TODO list.
+		¿Should I keep apt-proxy v2 in experimental until this is done?
+
+	- 'max_age' and 'CLEANUP_DAYS' don't quite mean the same, 'max_age'
+	  doesn't take into acount if there is a newer version of the package
+
+	- rsync is not officially supported.
+		It can work with rsync and some LD_PRELOAD hack, although it
+		has not been tested for a while, and the shared library is not
+		included in the .deb package.
+		If someone convinces me that it is still usefull in the
+		current situation I may give another chance to rsync backends.
+
+	- '+' prefix or equivalent functionality is not supported.
+		This was specially usefull for rsyncing uncompressed Packages
+		files, which are not anymore available.
+
+		'rsyncpackages' config option was supposed to fill the gap,
+		but in the current situation, someone will have to convince me
+		that it is still usefull.
+
+	CHANGES
+	-------
+
+	- 'cleanup_freq' and 'CLEAN_SWEEP' don't quite mean the same, v2 does
+	  more on cleanup than just erase old files.
+		- delete files that have not been accessed in max_age
+		- scan cache directories and update internal tables
+		- ...
+
+	- backend names can not contain '/' and directory names within the
+	  cache are automaticaly named after the backend name.
+		1.3.x allowed you to give a different name to the backend and
+		the directory to store the files on the cache. If you used
+		that "feature" apt-proxy 1.9.x will not find previously cached
+		files for the affected backend unless you rename the directory
+		on the cache.
+
+	  	NOTE: apt-proxy-v1tov2 should complain about this.
+

Added: tags/1.9.33-0.1/doc/apt-proxy-import.8.inc
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/apt-proxy-import.8.inc	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,54 @@
+.\" Man page was originaly copied from apt-proxy man page.
+[NAME]
+apt\-proxy\-import \- Import packages into the apt\-proxy cache.
+
+/apt\-proxy\-import imports /
+It uses the package lists to determine where each file should be
+placed, so you should run \fB'apt\-get update'\fP to allow apt\-proxy to 
+update the package lists before running apt\-proxy\-import.
+
+[USING TO BOOTSTRAP A NEW APT\-PROXY CACHE]
+If you have been using apt standalone, you probably have built up a
+large collection of .debs or .udebs in apt's cache directory.  You
+can import these files into apt\-proxy as follows:
+.PP
+1. Update apt\-proxy's filelists:
+.nf
+    apt\-get update
+.fi
+.PP
+2. Import files from apt's cache:
+.nf
+    apt\-proxy\-import \-i /var/cache/apt/archives
+.fi
+
+[IMPORTING APT\-MOVE CACHE]
+You can import the apt\-move generated cache into apt\-proxy using the following command:
+.PP
+.nf
+    apt\-proxy\-import \-r \-i /var/cache/apt\-move
+.fi
+.PP
+This tells apt\-proxy\-import to recuse over each directory in the apt\-move cache.
+
+[FILES]
+\ /etc/apt\-proxy/apt\-proxy\&.conf
+
+[SEE ALSO]
+.na
+.nh
+.BR apt\-proxy (8),
+.BR apt\-proxy.conf (5)
+.hy
+.ad
+
+[BUGS]
+apt\-proxy\-import does not use \fImax_age\fR or \fImax_versions\fR to clean the
+cache directory on import.
+.PP
+It does not yet import source.tar.gz or Packages files.
+.PP
+You must run it as the apt\-proxy user or as root.
+
+[AUTHORS]
+Chris Halls <halls at debian.org>, Manuel Estrada Sainz <ranty at debian.org>

Added: tags/1.9.33-0.1/doc/apt-proxy-v1tov2.8
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/apt-proxy-v1tov2.8	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,30 @@
+.TH APT-PROXY-V1TOV2 "8" "November 2002" "Debian GNU/Linux" " "
+.SH NAME
+apt\-proxy\-v1tov2 \- Updates apt\-proxy configuration to the new format.
+.SH SYNOPSIS
+.B apt\-proxy\-v1tov2
+[v1_conf [v2_sample_conf]] > v2_conf
+
+.SH DESCRIPTION
+apt\-proxy\-v1tov2 tries to update \fIv2_sample_conf\fR with the configuration
+found in \fIv1_conf\fR and writes the result to \fIstdout\fR.
+
+By default, it will use /etc/apt\-proxy/apt\-proxy.conf for \fIv1_conf\fR and
+/etc/apt\-proxy/apt\-proxy\-v2.conf for \fIv2_sample_conf\fR.
+
+.SH NOTES
+Hopefully the package maintainer scripts have already run this for you.
+
+.SH FILES
+/etc/apt\-proxy/apt\-proxy\&.conf
+.br
+/etc/apt\-proxy/apt\-proxy\-v2\&.conf
+.SH AUTHORS
+Manuel Estrada Sainz <ranty at debian.org>
+.SH "SEE ALSO"
+.na
+.nh
+.BR apt\-proxy (8),
+.BR apt\-proxy.conf (5)
+.hy
+.ad

Added: tags/1.9.33-0.1/doc/apt-proxy.8
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/apt-proxy.8	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,75 @@
+.\" Man page copied from apt.conf man page.
+.TH "apt\-proxy" "8" "15 Jul 2005" "apt\-proxy" ""
+.SH "Name"
+apt\-proxy \- A proxy for saving bandwidth to Debian servers
+.SH SYNOPSIS
+.B apt\-proxy
+.I "[options] [logfile]"
+.br
+.PP
+.SH "DESCRIPTION"
+\fBapt\-proxy\fP is a python program designed to be run as an stand alone
+server via twistd, and provides a clean, caching, intelligent proxy for
+\fBapt\-get\fP, which speaks HTTP to apt\-get clients, and http, ftp or rsync to
+the backend server(s)\&.  apt-proxy listens by default on port 9999\&.
+.PP
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Display usage information\&.
+.TP
+\fB\-c\fR, \fB\-\-config\-file=\fR
+Configuration file.  This defaults to /etc/apt\-proxy/apt\-proxy\-v2\&.conf
+.PP
+.SH "CLIENT CONFIGURATION"
+Once \fBapt\-proxy\fP is configured on a host SERVER, users then edit their
+\fBsources\&.list\fP file to point to the proxy (which uses the http
+protocol to serve clients), like so:
+
+.nf
+deb http://SERVER:9999/debian stable main contrib non\-free
+deb\-src http://SERVER:9999/debian stable main contrib non\-free
+
+deb http://aptproxy:9999/security stable/updates main contrib non\-free
+.fi
+
+What path should be specified after the server name and port number
+depends on the configuration of \fBapt\-proxy\fP (which can restrict
+paths and send different paths to different servers)\&.  See \fB
+SERVER CONFIGURATION\fP below\&.
+
+Note that you can also use the nicknames `unstable', `frozen' etc, but
+Packages/Sources files may get duplicated, so it is best to use either the
+symbolic or the code name and stick with it.
+.PP
+.SH "SERVER CONFIGURATION"
+See
+.BR apt\-proxy.conf (5)
+for details of how to set up apt\-proxy to use backends near to you.
+.PP
+.SH "CARE AND FEEDING OF MIRRORS"
+
+\fBapt\-proxy\fP reduces the bandwidth requirements of Debian mirrors
+by  restricting the frequency of Packages, Releases and Sources file updates
+from the back end and only doing a single fetch for any file, how ever many
+users request it from the proxy.
+.PP
+.SH "FILES"
+/etc/apt\-proxy/apt\-proxy\&.conf
+or
+/etc/apt\-proxy/apt\-proxy\-v2\&.conf
+.PP
+.SH "SEE ALSO"
+.na
+.nh
+.BR apt\-proxy.conf (5), apt\-proxy\-import (8)
+.hy
+.ad
+.PP
+.SH "BUGS"
+Packages are not compressed using gzip \-\-rsyncable, which gives a 30%
+reduction in bytes transferred for binary packages, and much greater for
+source and other packages.
+.PP
+.SH "AUTHORS"
+apt\-proxy v2 was written by Manuel Estrada Sainz and is maintained by Otavio
+Salvador and Chris Halls.

Added: tags/1.9.33-0.1/doc/apt-proxy.add.fr
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/apt-proxy.add.fr	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,4 @@
+PO4A-HEADER: mode=after; position=AUTEUR; beginboundary=^\.SH
+
+.SH TRADUCTION
+Raphaël 'SurcouF' Bordet <debian-l10n-french at lists.debian.org>

Added: tags/1.9.33-0.1/doc/apt-proxy.conf
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/apt-proxy.conf	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,145 @@
+[DEFAULT]
+;; All times are in seconds, but you can add a suffix
+;; for minutes(m), hours(h) or days(d)
+
+;; Server IP to listen on
+;address = 192.168.0.254
+
+;; Server port to listen on
+port = 9999
+
+;; Control files (Packages/Sources/Contents) refresh rate
+;;
+;; Minimum time between attempts to refresh a file
+min_refresh_delay = 1h
+
+;; Minimum age of a file before attempting an update (NOT YET IMPLEMENTED)
+;min_age = 23h
+
+;; Uncomment to make apt-proxy continue downloading even if all
+;; clients disconnect.  This is probably not a good idea on a
+;; dial up line.
+;; complete_clientless_downloads = 1
+
+;; Debugging settings.
+;; for all debug information use this:
+;; debug = all:9
+debug = all:4 db:0
+
+;; Debugging remote python console
+;; Do not enable in an untrusted environment
+;telnet_port = 9998
+;telnet_user = apt-proxy
+;telnet_password = secret
+
+;; Network timeout when retrieving from backend servers
+timeout = 15
+
+;; Cache directory for apt-proxy
+cache_dir = /var/cache/apt-proxy
+
+;; Use passive FTP? (default=on)
+;passive_ftp = on
+
+;; Use HTTP proxy?
+;http_proxy = host:port
+
+;; Enable HTTP pipelining within apt-proxy (for test purposes)
+;disable_pipelining=0
+
+;;--------------------------------------------------------------
+;; Cache housekeeping
+
+;; Time to perform periodic housekeeping:
+;;  - delete files that have not been accessed in max_age
+;;  - scan cache directories and update internal tables
+cleanup_freq = 1d
+
+;; Maximum age of files before deletion from the cache (seconds)
+max_age = 120d
+
+;; Maximum number of versions of a .deb to keep per distribution
+max_versions = 3
+
+;; Add HTTP backends dynamicaly if not already defined? (default=on)
+;dynamic_backends = on
+
+;;---------------------------------------------------------------
+;;---------------------------------------------------------------
+;; Backend servers
+;;
+;; Place each server in its own [section]
+
+[debian]
+;; The main Debian archive
+;; You can override the default timeout like this:
+;timeout = 30
+
+;; Rsync server used to rsync the Packages file (NOT YET IMPLEMENTED)
+;;rsyncpackages = rsync://ftp.de.debian.org/debian
+
+;; Backend servers, in order of preference
+backends = 
+	http://ftp.us.debian.org/debian
+	http://ftp.de.debian.org/debian
+	http://ftp2.de.debian.org/debian
+	ftp://ftp.uk.debian.org/debian
+
+
+[debian-non-US]
+;; Debian debian-non-US archive
+;timeout will be the global value
+backends =
+	http://ftp.uk.debian.org/debian-non-US
+	http://ftp.de.debian.org/debian-non-US
+	ftp://ftp.uk.debian.org/debian
+	
+[security]
+;; Debian security archive
+backends = 
+	http://security.debian.org/debian-security
+	http://ftp2.de.debian.org/debian-security
+
+[ubuntu]
+;; Ubuntu archive
+backends = http://archive.ubuntu.com/ubuntu
+
+[ubuntu-security]
+;; Ubuntu security updates
+backends = http://security.ubuntu.com/ubuntu
+
+;[openoffice]
+;; OpenOffice.org packages
+;backends =
+;	http://ftp.freenet.de/pub/debian-openoffice
+;	http://ftp.sh.cvut.cz/MIRRORS/OpenOffice.deb
+;	http://borft.student.utwente.nl/debian
+	
+;[apt-proxy]
+;; Apt-proxy new versions
+;backends = http://apt-proxy.sourceforge.net/apt-proxy
+
+;[backports.org]
+;; backports.org
+;backends = http://backports.org/debian
+
+;[blackdown]
+;; Blackdown Java
+;backends = http://ftp.gwdg.de/pub/languages/java/linux/debian
+
+
+;[debian-people]
+;; people.debian.org
+;backends = http://people.debian.org
+
+;[emdebian]
+;; The Emdebian project
+;backends = http://emdebian.sourceforge.net/emdebian
+
+;[rsync]
+;; An example using an rsync server.  This is not recommended
+;; unless http is not available, becuause rsync is only more
+;; efficient for transferring uncompressed files and puts much
+;; more overhead on the server.  See the rsyncpacakges parameter 
+;; for a way of rsyncing just the Packages files.
+;backends = rsync://ftp.uk.debian.org/debian

Added: tags/1.9.33-0.1/doc/apt-proxy.conf.5
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/apt-proxy.conf.5	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,203 @@
+.\" Man page copied from apt.conf man page.
+.TH "apt\-proxy\&.conf" "5" "5 Jan 2006" "apt\-proxy" ""
+.SH "NAME"
+apt\-proxy\&.conf \- configuration file for apt\-proxy
+.PP
+.SH "DESCRIPTION"
+\fBapt\-proxy\&.conf\fP is the configuration file for apt\-proxy.
+When apt\-proxy starts up, it will read \fI/etc/apt\-proxy/apt\-proxy\&.conf\fP\&.
+
+\fI/etc/apt\-proxy/apt\-proxy-v2\&.conf\fP will be read instead if it exists to
+make upgrading from v1 easier.
+
+The configuration file is divided up into several sections, where each \fI[resource]\fP
+section defines a separate resource. The \fBDEFAULT\fP section applies to all resources.
+
+The supplied \fIapt\-proxy\&.conf\fP will work out of the box, but it is best to
+change the backends you use to a mirror closer to you.  There are some in the
+default file, and it may be enough just to reorder the lines in the file\&.
+
+.PP
+.SH [DEFAULT]
+This section holds options global to the whole apt\-proxy:
+
+.TP
+.B address
+IP address on which apt\-proxy will listen for requests. Multiple
+addresses have a empty space between it.
+
+.TP
+.B port
+TCP port on which apt\-proxy will listen for requests.
+
+.TP
+.B min_refresh_delay
+If different from \fBoff\fP, means that Packages and other control
+files will not be refreshed more frequently than this number of
+seconds\&.
+
+.TP
+.B timeout
+Maximum I/O timeout in seconds for backend transfers. Default: 30 seconds.
+If no response is received from a backend server in this time, apt\-proxy will try
+the next server in the list.  Y
+
+.TP
+.B cache_dir
+Cache directory.  Default: /var/cache/apt\-proxy
+
+.TP
+.B cleanup_freq
+If different from \fBoff\fP, indicates the time between housekeeping attempts:
+delete files that have not been accessed in max_age, scan cache directories
+and update internal tables, ...
+
+.TP
+.B max_age
+If different from \fBoff\fP, indicates the maximum age of files before
+deletion from the cache.
+
+.TP
+.B max_versions
+If different from \fBoff\fP, indicates the maximum number of versions of a
+\&.deb to keep.  This is the number of versions per distribution, for example
+setting max_versions to 2 will ensure that a maximum of 6 packages would be kept:
+the last 2 stable versions, the last 2 testing versions and the last 2 unstable
+versions.
+
+.TP
+.B passive_ftp
+Specify \fBon\fP to use passive FTP, which works from behind a firewall,
+but may not be supported on all servers.  Specify \fBoff\fP to use active
+FTP instead.  Default: on
+
+.TP
+.B http_proxy
+Specify \fBhostname:port\fP to use an upstream proxy.
+
+.TP
+.B dynamic_backends
+By default apt\-proxy will add HTTP backends dynamically if not already
+defined. Specify \fBoff\fP to restrict the available backends to those
+listed in the configuration file.  Default: on
+
+.TP
+.B disable_pipelining
+apt\-proxy can use HTTP pipelining to fetch several files at once (up to 10), but
+this can generate multiple connections to each backend server.  Pipelining is
+disabled by default until this is fixed.  Set to \fB0\fP to enable experimental
+http pipelining.  Default: 1
+
+.PP
+.SH RESOURCES
+All other sections in the configuration file will be interpreted as resource
+names.  The options in the section apply to this resource only.
+
+.TP
+.B timeout
+Overrides the global timeout
+
+.TP
+.B backends = "\fI<protocol>\fP://\fI<server>\fP/\fI<directory>\fP [...]"
+A list one or more URLs referring to servers which hold debian packages\&.
+.br
+.br
+\fIprotocol\fP: internet protocol to use: http, ftp or rsync
+.br
+\fIserver\fP: hostname of the backend server to contact
+.br
+\fIdirectory\fP: directory name to prepend requests to for this server
+
+.TP
+.B passive_ftp
+Override the global setting of passive_ftp
+
+.SH CONFIGURATION EXAMPLES
+
+To access a resource that's listed under a specific section name, simply append
+the section name (without the brackets) to the end of your deb source line in
+/etc/apt/sources.list
+
+.B Debian main
+.PP
+This example shows how to give clients access to the main Debian
+archive:
+.nf
+[debian]
+backends = http://ftp.us.debian.org/debian/
+           http://ftp.de.debian.org/debian/
+.fi
+
+.PP
+Using this configuration, the client would use a \fIsources.list\fP entry
+like:
+.nf
+
+    deb http://server:9999/debian woody main
+
+.fi
+And so the file request
+`/debian/woody/main/binary\-i386/x11/foo_1\-1.deb' would turn into a
+backend request of first
+.nf
+
+    `http://ftp.us.debian.org/debian/woody/main/binary\-i386/x11/foo_1\-1.deb'
+    
+.fi
+and if that failed,
+.nf
+
+    `http://ftp.de.debian.org/debian/woody/main/binary\-i386/x11/foo_1\-1.deb'
+    
+.fi
+and apt\-proxy will place the downloaded package in
+.nf
+    `/var/cache/apt\-proxy/debian/debian/woody/main/binary\-i386/x11/foo_1\-1.deb'\&.
+
+.fi
+.B backports.org
+.PP
+The backports.org website tells you to use this \fIsources.list\fP line:
+.nf
+
+    deb http://www.backports.org/debian sarge-backports main
+
+.fi
+You can add this to apt\-proxy by creating a new section in \fIapt\-proxy\&.conf\fP\&.
+In the new section, add a backends entry for the URL:
+.nf
+
+    [backports]
+    backends = http://www.backports.org/debian
+
+.fi
+On the clients, replace the URL with one pointing to the apt-proxy resource name, in
+the form \fIhttp://hostname:port/backend\fP. If your apt-proxy hostname is \fIproxy\fP and
+it is running on port 9999, you would write: 
+.nf
+
+   deb http://proxy:9999/backports sarge-backports main
+
+.fi
+
+.PP
+For many more examples, see the supplied /etc/apt\-proxy/apt\-proxy\&.conf\&.
+
+.SH "FILES"
+/etc/apt\-proxy/apt\-proxy\&.conf
+.br
+/etc/apt\-proxy/apt\-proxy-v2\&.conf
+.SH "SEE ALSO"
+.na
+.nh
+.BR apt\-proxy(8),
+.BR /usr/share/doc/apt\-proxy/README,
+.BR apt\-proxy\-import(8)
+.hy
+.ad
+.PP
+.SH "BUGS"
+Plenty sure.  Please report.
+.PP
+.SH "AUTHOR"
+apt\-proxy v2 was written by Manuel Estrada Sainz <ranty at debian.org>\&.

Added: tags/1.9.33-0.1/doc/design.txt
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/design.txt	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,63 @@
+apt-proxy design
+================
+
+This file documents the design of apt-proxy.  Read this if you
+want to hack on apt-proxy
+
+
+Overview
+--------
+
+On startup, class apConfig loads the configuration, and creates an
+apBackendConfig for each backend specified in the config file.
+
+A single Factory instance is created, which contains references to
+the configuraiton and the packages / access times databases.
+
+The factory creates a Backend for each [backend-name] section in the
+config file, eg debian, debian-security.  The Backend holds a list
+of BackendServers.  Each BackendServer points to a different server
+on the internet, e.g. http://ftp.debian.org, ftp://uk.debian.org.
+
+Each time a new incomming connection is made, factory.buildProtocol 
+creates a Channel.  There is one Channel per client connection.
+
+Each time a client sends an HTTP request, a new Request is created.
+
+If a file is not already available, a FetcherXXX is created to retrieve
+the file from the backend.  Note: the Fetcher class structure will be
+reworked in an upcoming version.
+
+Generating documentation for individual classes
+-----------------------------------------------
+Each class is documented in the source code.  To extract documentation use
+this command:
+
+  
+
+Databases
+---------
+
+1. Databases managed by Factory
+
+each file path in the factory databases is the URL with the cache_dir
+prefix removed, for example: debian/pool/main/a/apt-proxy/apt-proxy_1.9.0_all.deb
+
+Factory.update_times
+  key: file path
+  value: time when last updated (seconds since the epoch)
+
+Factory.access_times
+  key: file path
+  value: time when last request by a client (seconds since the epoch)
+
+Factory.packages
+  key: package name (e.g. apt)
+  value: list of file paths for each package in the cache that has that package name
+
+2. Databases managed by Backends
+
+AptPackages.packages (pointed to by Backend.packages)
+  key: Packages file path, for example: debian/dists/main/binary-i386/Packages
+  value: mtime - file when last downloaded (seconds since the epoch)
+

Added: tags/1.9.33-0.1/doc/offline-tips
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/offline-tips	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,65 @@
+Apt-proxy is designed to minimize the download amount
+for .debs and sources.  Here some tricks one can
+use with an apt-proxy server on a laptop to update
+clients that have no (or a very slow) internet connection.
+
+Material here is 'works for me'.  No guaranty that it
+works for you as want or wish  ;)
+
+1) apt-get update and apt-get dist-upgrade the laptop
+   with the apt-proxy server as long as you have a
+   'fast' internet connection.
+
+   If you have a list of additional pkgs you want to
+   serve [see 5) and (*) at the end]
+   
+     apt-get --download-only install `cat my-deb.list`
+
+At home or friends place:
+
+2) set min_refresh_delay to a high value like 10000h
+   so apt-proxy does not try to update the Packages
+   and Sources file.  Restart apt-proxy
+
+   	/etc/init.d/apt-proxy restart
+
+3) Optional: Disable access internet of the host
+   running apt-proxy.
+
+4) On the client(s): modify sources.list to use the
+   your apt-proxy server and run apt-get update.
+
+5) On the client(s) start 'apt-get dist-upgrade'.
+   Depending on 3), only pkgs missing in apt-proxy
+   server are downloaded from the internet or
+   you get a download failure.
+
+6) Create a list of pkgs that failed or are downloaded
+   in 5) and the next time update them on the
+   apt-proxy server as described in 1. See also (*)
+   below.
+
+7) Reset min_refresh_delay to old value in apt-proxy.conf
+   and restart apt-proxy.
+
+
+Notes:
+
+(*) How to make sure that pkgs are in apt-proxy cache
+    and up to date:
+
+    On apt-proxy client(s) you can create a list of
+    installed pkgs with
+
+    	dpkg --get-selections | awk '/\<install\>/ {print $1}' > myX-deb.list
+
+    Merging lists of several clients:
+
+    	sort my1-deb.list my2-deb.list ... | uniq > my-deb.list
+     
+    On the apt-proxy server preload the pkgs:
+
+    	apt-get --download-only install `cat my-deb.list`
+	apt-get clean
+
+ -- Achim Bohnet <ach at mpe.mpg.de>
\ No newline at end of file

Added: tags/1.9.33-0.1/doc/po/apt-proxy.pot
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/po/apt-proxy.pot	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,946 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+# 
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2006-03-29  0:11+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING"
+
+#.  Man page copied from apt.conf man page.
+# type: TH
+#: doc/apt-proxy.8:2 doc/apt-proxy.8:2 doc/apt-proxy.conf.5:2
+#, no-wrap
+msgid "apt-proxy"
+msgstr ""
+
+#.  Man page copied from apt.conf man page.
+# type: TH
+#: doc/apt-proxy.8:2
+#, no-wrap
+msgid "15 Jul 2005"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:3
+#, no-wrap
+msgid "Name"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:5
+msgid "apt-proxy - A proxy for saving bandwidth to Debian servers"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:5 doc/apt-proxy-v1tov2.8:4 doc/apt-proxy-import.8:5
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:8
+msgid "B<apt-proxy> I<[options] [logfile]>"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:10 doc/apt-proxy-v1tov2.8:8 doc/apt-proxy-import.8:8 doc/apt-proxy.conf.5:6
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:15
+msgid ""
+"B<apt-proxy> is a python program designed to be run as an stand alone server "
+"via twistd, and provides a clean, caching, intelligent proxy for B<apt-get>, "
+"which speaks HTTP to apt-get clients, and http, ftp or rsync to the backend "
+"server(s)\\&.  apt-proxy listens by default on port 9999\\&."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.8:16 doc/apt-proxy-import.8:29
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:19
+msgid "Display usage information\\&."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.8:19 doc/apt-proxy-import.8:32
+#, no-wrap
+msgid "B<-c>, B<--config-file=>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:22
+msgid "Configuration file.  This defaults to /etc/apt-proxy/apt-proxy-v2\\&.conf"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:23
+#, no-wrap
+msgid "CLIENT CONFIGURATION"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:27
+msgid ""
+"Once B<apt-proxy> is configured on a host SERVER, users then edit their "
+"B<sources\\&.list> file to point to the proxy (which uses the http protocol "
+"to serve clients), like so:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:31
+#, no-wrap
+msgid ""
+"deb http://SERVER:9999/debian stable main contrib non-free\n"
+"deb-src http://SERVER:9999/debian stable main contrib non-free\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:33
+#, no-wrap
+msgid "deb http://aptproxy:9999/security stable/updates main contrib non-free\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:39
+msgid ""
+"What path should be specified after the server name and port number depends "
+"on the configuration of B<apt-proxy> (which can restrict paths and send "
+"different paths to different servers)\\&.  See B< SERVER CONFIGURATION> "
+"below\\&."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:43
+msgid ""
+"Note that you can also use the nicknames `unstable', `frozen' etc, but "
+"Packages/Sources files may get duplicated, so it is best to use either the "
+"symbolic or the code name and stick with it."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:44
+#, no-wrap
+msgid "SERVER CONFIGURATION"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:48
+msgid ""
+"See B<apt-proxy.conf>(5)  for details of how to set up apt-proxy to use "
+"backends near to you."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:49
+#, no-wrap
+msgid "CARE AND FEEDING OF MIRRORS"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:55
+msgid ""
+"B<apt-proxy> reduces the bandwidth requirements of Debian mirrors by "
+"restricting the frequency of Packages, Releases and Sources file updates "
+"from the back end and only doing a single fetch for any file, how ever many "
+"users request it from the proxy."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:56 doc/apt-proxy-v1tov2.8:18 doc/apt-proxy-import.8:66 doc/apt-proxy.conf.5:186
+#, no-wrap
+msgid "FILES"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:60
+msgid "/etc/apt-proxy/apt-proxy\\&.conf or /etc/apt-proxy/apt-proxy-v2\\&.conf"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:61 doc/apt-proxy-v1tov2.8:24 doc/apt-proxy-import.8:77 doc/apt-proxy.conf.5:190
+#, no-wrap
+msgid "SEE ALSO"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:65
+msgid "B<apt-proxy.conf>(5),B<apt-proxy-import>(8)"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:68 doc/apt-proxy-import.8:68 doc/apt-proxy.conf.5:199
+#, no-wrap
+msgid "BUGS"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:72
+msgid ""
+"Packages are not compressed using gzip --rsyncable, which gives a 30% "
+"reduction in bytes transferred for binary packages, and much greater for "
+"source and other packages."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.8:73 doc/apt-proxy-v1tov2.8:22 doc/apt-proxy-import.8:75
+#, no-wrap
+msgid "AUTHORS"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.8:75
+msgid ""
+"apt-proxy v2 was written by Manuel Estrada Sainz and is maintained by Otavio "
+"Salvador and Chris Halls."
+msgstr ""
+
+# type: TH
+#: doc/apt-proxy-v1tov2.8:1
+#, no-wrap
+msgid "APT-PROXY-V1TOV2"
+msgstr ""
+
+# type: TH
+#: doc/apt-proxy-v1tov2.8:1
+#, no-wrap
+msgid "November 2002"
+msgstr ""
+
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+# type: TH
+#: doc/apt-proxy-v1tov2.8:1 doc/apt-proxy-import.8:2
+#, no-wrap
+msgid "Debian GNU/Linux"
+msgstr ""
+
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+# type: TH
+#: doc/apt-proxy-v1tov2.8:1 doc/apt-proxy-import.8:2
+#, no-wrap
+msgid "  "
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy-v1tov2.8:2 doc/apt-proxy-import.8:3 doc/apt-proxy.conf.5:3
+#, no-wrap
+msgid "NAME"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:4
+msgid "apt-proxy-v1tov2 - Updates apt-proxy configuration to the new format."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:7
+msgid "B<apt-proxy-v1tov2> [v1_conf [v2_sample_conf]] E<gt> v2_conf"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:11
+msgid ""
+"apt-proxy-v1tov2 tries to update I<v2_sample_conf> with the configuration "
+"found in I<v1_conf> and writes the result to I<stdout>."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:14
+msgid ""
+"By default, it will use /etc/apt-proxy/apt-proxy.conf for I<v1_conf> and "
+"/etc/apt-proxy/apt-proxy-v2.conf for I<v2_sample_conf>."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy-v1tov2.8:15
+#, no-wrap
+msgid "NOTES"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:17
+msgid "Hopefully the package maintainer scripts have already run this for you."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:20 doc/apt-proxy.conf.5:188
+msgid "/etc/apt-proxy/apt-proxy\\&.conf"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:22 doc/apt-proxy.conf.5:190
+msgid "/etc/apt-proxy/apt-proxy-v2\\&.conf"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:24
+msgid "Manuel Estrada Sainz E<lt>ranty at debian.orgE<gt>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:29 doc/apt-proxy-import.8:82
+msgid "B<apt-proxy>(8), B<apt-proxy.conf>(5)"
+msgstr ""
+
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+# type: TH
+#: doc/apt-proxy-import.8:2
+#, no-wrap
+msgid "APT-PROXY-IMPORT"
+msgstr ""
+
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+# type: TH
+#: doc/apt-proxy-import.8:2
+#, no-wrap
+msgid "March 2006"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:5
+msgid "apt-proxy-import - Import packages into the apt-proxy cache."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:8
+msgid "B<apt-proxy-import> [I<options>] I<E<lt>filenameE<gt> >..."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:11
+msgid ""
+"WARNING: apt-proxy has not been tested under this version of twisted "
+"(2.2.0).  WARNING: although it should work without problem."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:13
+msgid "apt-proxy-import B<-r> [options] E<lt>directoryE<gt> ..."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy-import.8:13
+#, no-wrap
+msgid "OPTIONS"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy-import.8:14
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:17
+msgid "print version and quit"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy-import.8:17
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:20
+msgid "give verbose output"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy-import.8:20
+#, no-wrap
+msgid "B<-d>, B<--debug>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:23
+msgid "debug output"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy-import.8:23
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:26
+msgid "try not to write messages to stdout"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy-import.8:26
+#, no-wrap
+msgid "B<-r>, B<--recursive>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:29
+msgid "recurse into subdirectories"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:32
+msgid "Display this help and exit."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:35
+msgid "Configuration file"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:37
+msgid "apt-proxy-import imports .deb files into the apt-proxy cache."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:41
+msgid ""
+"It uses the package lists to determine where each file should be placed, so "
+"you should run B<'apt-get update'> to allow apt-proxy to update the package "
+"lists before running apt-proxy-import."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:44
+msgid "WARNING: although it should work without problem.  apt-proxy-import 1.9.x"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy-import.8:44
+#, no-wrap
+msgid "USING TO BOOTSTRAP A NEW APT-PROXY CACHE"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:48
+msgid ""
+"If you have been using apt standalone, you probably have built up a large "
+"collection of .debs or .udebs in apt's cache directory.  You can import "
+"these files into apt-proxy as follows:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:50
+msgid "1. Update apt-proxy's filelists:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:52
+#, no-wrap
+msgid "    apt-get update\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:55
+msgid "2. Import files from apt's cache:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:57
+#, no-wrap
+msgid "    apt-proxy-import -i /var/cache/apt/archives\n"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy-import.8:58
+#, no-wrap
+msgid "IMPORTING APT-MOVE CACHE"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:60
+msgid ""
+"You can import the apt-move generated cache into apt-proxy using the "
+"following command:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:63
+#, no-wrap
+msgid "    apt-proxy-import -r -i /var/cache/apt-move\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:66
+msgid ""
+"This tells apt-proxy-import to recuse over each directory in the apt-move "
+"cache."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:68
+msgid "\\ /etc/apt-proxy/apt-proxy\\&.conf"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:71
+msgid ""
+"apt-proxy-import does not use I<max_age> or I<max_versions> to clean the "
+"cache directory on import."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:73
+msgid "It does not yet import source.tar.gz or Packages files."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:75
+msgid "You must run it as the apt-proxy user or as root."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:77
+msgid ""
+"Chris Halls E<lt>halls at debian.orgE<gt>, Manuel Estrada Sainz "
+"E<lt>ranty at debian.orgE<gt>"
+msgstr ""
+
+#.  Man page copied from apt.conf man page.
+# type: TH
+#: doc/apt-proxy.conf.5:2
+#, no-wrap
+msgid "apt-proxy\\&.conf"
+msgstr ""
+
+#.  Man page copied from apt.conf man page.
+# type: TH
+#: doc/apt-proxy.conf.5:2
+#, no-wrap
+msgid "5 Jan 2006"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:5
+msgid "apt-proxy\\&.conf - configuration file for apt-proxy"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:9
+msgid ""
+"B<apt-proxy\\&.conf> is the configuration file for apt-proxy.  When "
+"apt-proxy starts up, it will read I</etc/apt-proxy/apt-proxy\\&.conf>\\&."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:12
+msgid ""
+"I</etc/apt-proxy/apt-proxy-v2\\&.conf> will be read instead if it exists to "
+"make upgrading from v1 easier."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:15
+msgid ""
+"The configuration file is divided up into several sections, where each "
+"I<[resource]> section defines a separate resource. The B<DEFAULT> section "
+"applies to all resources."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:19
+msgid ""
+"The supplied I<apt-proxy\\&.conf> will work out of the box, but it is best "
+"to change the backends you use to a mirror closer to you.  There are some in "
+"the default file, and it may be enough just to reorder the lines in the "
+"file\\&."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.conf.5:21
+#, no-wrap
+msgid "[DEFAULT]"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:23
+msgid "This section holds options global to the whole apt-proxy:"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:24
+#, no-wrap
+msgid "B<address>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:28
+msgid ""
+"IP address on which apt-proxy will listen for requests. Multiple addresses "
+"have a empty space between it."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:29
+#, no-wrap
+msgid "B<port>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:32
+msgid "TCP port on which apt-proxy will listen for requests."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:33
+#, no-wrap
+msgid "B<min_refresh_delay>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:38
+msgid ""
+"If different from B<off>, means that Packages and other control files will "
+"not be refreshed more frequently than this number of seconds\\&."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:39 doc/apt-proxy.conf.5:96
+#, no-wrap
+msgid "B<timeout>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:44
+msgid ""
+"Maximum I/O timeout in seconds for backend transfers. Default: 30 seconds.  "
+"If no response is received from a backend server in this time, apt-proxy "
+"will try the next server in the list.  Y"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:45
+#, no-wrap
+msgid "B<cache_dir>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:48
+msgid "Cache directory.  Default: /var/cache/apt-proxy"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:49
+#, no-wrap
+msgid "B<cleanup_freq>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:54
+msgid ""
+"If different from B<off>, indicates the time between housekeeping attempts: "
+"delete files that have not been accessed in max_age, scan cache directories "
+"and update internal tables, ..."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:55
+#, no-wrap
+msgid "B<max_age>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:59
+msgid ""
+"If different from B<off>, indicates the maximum age of files before deletion "
+"from the cache."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:60
+#, no-wrap
+msgid "B<max_versions>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:67
+msgid ""
+"If different from B<off>, indicates the maximum number of versions of a "
+"\\&.deb to keep.  This is the number of versions per distribution, for "
+"example setting max_versions to 2 will ensure that a maximum of 6 packages "
+"would be kept: the last 2 stable versions, the last 2 testing versions and "
+"the last 2 unstable versions."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:68 doc/apt-proxy.conf.5:111
+#, no-wrap
+msgid "B<passive_ftp>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:73
+msgid ""
+"Specify B<on> to use passive FTP, which works from behind a firewall, but "
+"may not be supported on all servers.  Specify B<off> to use active FTP "
+"instead.  Default: on"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:74
+#, no-wrap
+msgid "B<http_proxy>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:77
+msgid "Specify B<hostname:port> to use an upstream proxy."
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:78
+#, no-wrap
+msgid "B<dynamic_backends>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:83
+msgid ""
+"By default apt-proxy will add HTTP backends dynamically if not already "
+"defined. Specify B<off> to restrict the available backends to those listed "
+"in the configuration file.  Default: on"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:84
+#, no-wrap
+msgid "B<disable_pipelining>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:90
+msgid ""
+"apt-proxy can use HTTP pipelining to fetch several files at once (up to 10), "
+"but this can generate multiple connections to each backend server.  "
+"Pipelining is disabled by default until this is fixed.  Set to B<0> to "
+"enable experimental http pipelining.  Default: 1"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.conf.5:92
+#, no-wrap
+msgid "RESOURCES"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:95
+msgid ""
+"All other sections in the configuration file will be interpreted as resource "
+"names.  The options in the section apply to this resource only."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:99
+msgid "Overrides the global timeout"
+msgstr ""
+
+# type: TP
+#: doc/apt-proxy.conf.5:100
+#, no-wrap
+msgid ""
+"B<backends = "
+">I<E<lt>protocolE<gt>>B<://>I<E<lt>serverE<gt>>B</>I<E<lt>directoryE<gt>>B< "
+"[...]>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:103
+msgid "A list one or more URLs referring to servers which hold debian packages\\&."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:106
+msgid "I<protocol>: internet protocol to use: http, ftp or rsync"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:108
+msgid "I<server>: hostname of the backend server to contact"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:110
+msgid "I<directory>: directory name to prepend requests to for this server"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:114
+msgid "Override the global setting of passive_ftp"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.conf.5:115
+#, no-wrap
+msgid "CONFIGURATION EXAMPLES"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:120
+msgid ""
+"To access a resource that's listed under a specific section name, simply "
+"append the section name (without the brackets) to the end of your deb source "
+"line in /etc/apt/sources.list"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:122
+msgid "B<Debian main>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:125
+msgid "This example shows how to give clients access to the main Debian archive:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:129
+#, no-wrap
+msgid ""
+"[debian]\n"
+"backends = http://ftp.us.debian.org/debian/\n"
+"           http://ftp.de.debian.org/debian/\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:134
+msgid "Using this configuration, the client would use a I<sources.list> entry like:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:137
+#, no-wrap
+msgid "    deb http://server:9999/debian woody main\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:142
+msgid ""
+"And so the file request `/debian/woody/main/binary-i386/x11/foo_1-1.deb' "
+"would turn into a backend request of first"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:145
+#, no-wrap
+msgid ""
+"    "
+"`http://ftp.us.debian.org/debian/woody/main/binary-i386/x11/foo_1-1.deb'\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:148
+msgid "and if that failed,"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:151
+#, no-wrap
+msgid ""
+"    "
+"`http://ftp.de.debian.org/debian/woody/main/binary-i386/x11/foo_1-1.deb'\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:154
+msgid "and apt-proxy will place the downloaded package in"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:156
+#, no-wrap
+msgid ""
+"    "
+"`/var/cache/apt-proxy/debian/debian/woody/main/binary-i386/x11/foo_1-1.deb'\\&.\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:159
+msgid "B<backports.org>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:161
+msgid "The backports.org website tells you to use this I<sources.list> line:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:164
+#, no-wrap
+msgid "    deb http://www.backports.org/debian sarge-backports main\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:168
+msgid ""
+"You can add this to apt-proxy by creating a new section in "
+"I<apt-proxy\\&.conf>\\&.  In the new section, add a backends entry for the "
+"URL:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:172
+#, no-wrap
+msgid ""
+"    [backports]\n"
+"    backends = http://www.backports.org/debian\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:177
+msgid ""
+"On the clients, replace the URL with one pointing to the apt-proxy resource "
+"name, in the form I<http://hostname:port/backend>. If your apt-proxy "
+"hostname is I<proxy> and it is running on port 9999, you would write:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:180
+#, no-wrap
+msgid "   deb http://proxy:9999/backports sarge-backports main\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:185
+msgid ""
+"For many more examples, see the supplied "
+"/etc/apt-proxy/apt-proxy\\&.conf\\&."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:196
+msgid "B<apt-proxy(8),> B</usr/share/doc/apt-proxy/README,> B<apt-proxy-import(8)>"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:201
+msgid "Plenty sure.  Please report."
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy.conf.5:202
+#, no-wrap
+msgid "AUTHOR"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:203
+msgid ""
+"apt-proxy v2 was written by Manuel Estrada Sainz "
+"E<lt>ranty at debian.orgE<gt>\\&."
+msgstr ""

Added: tags/1.9.33-0.1/doc/po/fr.po
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/po/fr.po	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,1089 @@
+# translation of fr.po to French
+# Raphaël 'SurcouF' Bordet <surcouf at debianfr.net>, 2004.
+#  <surcouf at gmx.fr>, 2004.
+# Sylvain Archenault <sylvain.archenault at laposte.net>, 2005.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: apt-proxy 1.3.6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-03-29  0:11+0200\n"
+"PO-Revision-Date: 2005-10-18 19:14+0200\n"
+"Last-Translator: Sylvain Archenault <sylvain.archenault at laposte.net>\n"
+"Language-Team: French <French <debian-l10n-french at lists.debian.org>>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.10.2\n"
+
+# type: TH
+#.  Man page copied from apt.conf man page.
+#: doc/apt-proxy.8:2 doc/apt-proxy.conf.5:2
+#, no-wrap
+msgid "apt-proxy"
+msgstr "apt-proxy"
+
+# type: TH
+#.  Man page copied from apt.conf man page.
+#: doc/apt-proxy.8:2
+#, no-wrap
+msgid "15 Jul 2005"
+msgstr "15 jul 2005"
+
+# type: SH
+#: doc/apt-proxy.8:3
+#, no-wrap
+msgid "Name"
+msgstr "Nom"
+
+# type: Plain text
+#: doc/apt-proxy.8:5
+msgid "apt-proxy - A proxy for saving bandwidth to Debian servers"
+msgstr ""
+"apt-proxy - Un mandataire pour économiser de la bande passante sur les "
+"serveurs Debian"
+
+# type: SH
+#: doc/apt-proxy.8:5 doc/apt-proxy-v1tov2.8:4 doc/apt-proxy-import.8:5
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr "SYNOPSIS"
+
+# type: Plain text
+#: doc/apt-proxy.8:8
+msgid "B<apt-proxy> I<[options] [logfile]>"
+msgstr "B<apt-proxy> I<[options] [fichier de journal]>"
+
+# type: SH
+#: doc/apt-proxy.8:10 doc/apt-proxy-v1tov2.8:8 doc/apt-proxy-import.8:8
+#: doc/apt-proxy.conf.5:6
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "DESCRIPTION"
+
+# type: Plain text
+#: doc/apt-proxy.8:15
+msgid ""
+"B<apt-proxy> is a python program designed to be run as an stand alone server "
+"via twistd, and provides a clean, caching, intelligent proxy for B<apt-get>, "
+"which speaks HTTP to apt-get clients, and http, ftp or rsync to the backend "
+"server(s)\\&.  apt-proxy listens by default on port 9999\\&."
+msgstr ""
+"B<apt-proxy> est un logiciel écrit en python, conçu pour fonctionner de lui-"
+"même via twistd et qui fournit un serveur mandataire (« proxy ») propre, "
+"cachant et intelligent pour B<apt-get>. Il communique via HTTP avec les "
+"clients apt-get et via HTTP, FTP et rsync avec les serveur(s) finaux. apt-"
+"proxy écoute par défaut sur le port 9999."
+
+# type: TP
+#: doc/apt-proxy.8:16 doc/apt-proxy-import.8:29
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr "B<-h>, B<--help>"
+
+# type: Plain text
+#: doc/apt-proxy.8:19
+msgid "Display usage information\\&."
+msgstr "Affiche les informations d'utilisation"
+
+# type: TP
+#: doc/apt-proxy.8:19 doc/apt-proxy-import.8:32
+#, no-wrap
+msgid "B<-c>, B<--config-file=>"
+msgstr "B<-c>, B<--config-file=>"
+
+# type: Plain text
+#: doc/apt-proxy.8:22
+msgid ""
+"Configuration file.  This defaults to /etc/apt-proxy/apt-proxy-v2\\&.conf"
+msgstr ""
+"Fichier de configuration. Le fichier par défaut est /etc/apt-proxy/apt-proxy-"
+"v2.conf."
+
+# type: SH
+#: doc/apt-proxy.8:23
+#, no-wrap
+msgid "CLIENT CONFIGURATION"
+msgstr "CONFIGURATION DU CLIENT"
+
+# type: Plain text
+#: doc/apt-proxy.8:27
+msgid ""
+"Once B<apt-proxy> is configured on a host SERVER, users then edit their "
+"B<sources\\&.list> file to point to the proxy (which uses the http protocol "
+"to serve clients), like so:"
+msgstr ""
+"Une fois qu'B<apt-proxy> est configuré, les utilisateurs doivent éditer leur "
+"fichier B<sources.list> pour utiliser le serveur mandataire ou "
+"« proxy » (qui utilise le protocole HTTP pour servir les clients), comme "
+"suit :"
+
+# type: Plain text
+#: doc/apt-proxy.8:31
+#, no-wrap
+msgid ""
+"deb http://SERVER:9999/debian stable main contrib non-free\n"
+"deb-src http://SERVER:9999/debian stable main contrib non-free\n"
+msgstr ""
+"deb http://SERVEUR:9999/debian stable main contrib non-free\n"
+"deb-src http://SERVEUR:9999/debian stable main contrib non-free\n"
+
+# type: Plain text
+#: doc/apt-proxy.8:33
+#, no-wrap
+msgid "deb http://aptproxy:9999/security stable/updates main contrib non-free\n"
+msgstr "deb http://aptproxy:9999/security stable/updates main contrib non-free\n"
+
+# type: Plain text
+#: doc/apt-proxy.8:39
+msgid ""
+"What path should be specified after the server name and port number depends "
+"on the configuration of B<apt-proxy> (which can restrict paths and send "
+"different paths to different servers)\\&.  See B< SERVER CONFIGURATION> below"
+"\\&."
+msgstr ""
+"Le chemin devant être spécifié après le nom du serveur et le numéro de port "
+"dépend de la configuration d'B<apt-proxy> (ce qui peut restreindre les "
+"chemins et envoyer des chemins différents à différents serveurs). Voir B< "
+"CONFIGURATION DU SERVEUR>."
+
+# type: Plain text
+#: doc/apt-proxy.8:43
+msgid ""
+"Note that you can also use the nicknames `unstable', `frozen' etc, but "
+"Packages/Sources files may get duplicated, so it is best to use either the "
+"symbolic or the code name and stick with it."
+msgstr ""
+"Notez que vous pouvez aussi utiliser les saveurs « unstable », « frozen », "
+"etc., mais les fichiers Packages/Sources seraient dupliqués, aussi il est "
+"conseillé d'utiliser soit le nom symbolique soit le nom de code et de s'y "
+"tenir."
+
+# type: SH
+#: doc/apt-proxy.8:44
+#, no-wrap
+msgid "SERVER CONFIGURATION"
+msgstr "CONFIGURATION DU SERVEUR"
+
+# type: Plain text
+#: doc/apt-proxy.8:48
+msgid ""
+"See B<apt-proxy.conf>(5)  for details of how to set up apt-proxy to use "
+"backends near to you."
+msgstr ""
+"Voir B<apt-proxy.conf>(5) pour les détails sur comment configurer apt-proxy "
+"afin d'utiliser les serveurs proches de vous."
+
+# type: SH
+#: doc/apt-proxy.8:49
+#, no-wrap
+msgid "CARE AND FEEDING OF MIRRORS"
+msgstr "SOINS ET APPROVISIONNEMENTS DES MIROIRS"
+
+# type: Plain text
+#: doc/apt-proxy.8:55
+msgid ""
+"B<apt-proxy> reduces the bandwidth requirements of Debian mirrors by "
+"restricting the frequency of Packages, Releases and Sources file updates "
+"from the back end and only doing a single fetch for any file, how ever many "
+"users request it from the proxy."
+msgstr ""
+"B<apt-proxy> réduit les besoins en bande passante des miroirs Debian en "
+"restreignant la fréquence des mises à jour des fichiers Packages, Releases "
+"et Sources depuis le serveur et en téléchargeant une seule fois chaque "
+"fichier, sans tenir compte du nombre d'utilisateurs qui en font la requête "
+"au mandataire (« proxy »)."
+
+# type: SH
+#: doc/apt-proxy.8:56 doc/apt-proxy-v1tov2.8:18 doc/apt-proxy-import.8:66
+#: doc/apt-proxy.conf.5:186
+#, no-wrap
+msgid "FILES"
+msgstr "FICHIERS"
+
+# type: Plain text
+#: doc/apt-proxy.8:60
+msgid "/etc/apt-proxy/apt-proxy\\&.conf or /etc/apt-proxy/apt-proxy-v2\\&.conf"
+msgstr "/etc/apt-proxy/apt-proxy.conf ou /etc/apt-proxy/apt-proxy-v2.conf"
+
+# type: SH
+#: doc/apt-proxy.8:61 doc/apt-proxy-v1tov2.8:24 doc/apt-proxy-import.8:77
+#: doc/apt-proxy.conf.5:190
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "VOIR AUSSI"
+
+# type: Plain text
+#: doc/apt-proxy.8:65
+msgid "B<apt-proxy.conf>(5),B<apt-proxy-import>(8)"
+msgstr "B<apt-proxy.conf>(5), B<apt-proxy-import>(8)"
+
+# type: SH
+#: doc/apt-proxy.8:68 doc/apt-proxy-import.8:68 doc/apt-proxy.conf.5:199
+#, no-wrap
+msgid "BUGS"
+msgstr "ANOMALIES"
+
+# type: Plain text
+#: doc/apt-proxy.8:72
+msgid ""
+"Packages are not compressed using gzip --rsyncable, which gives a 30% "
+"reduction in bytes transferred for binary packages, and much greater for "
+"source and other packages."
+msgstr ""
+"Les paquets ne sont pas compressés en utilisant l'option --rsyncable de "
+"gzip, qui octroie une réduction de 30 % pour les paquets binaires, et "
+"beaucoup plus pour les paquets sources et autres."
+
+# type: SH
+#: doc/apt-proxy.8:73 doc/apt-proxy-v1tov2.8:22 doc/apt-proxy-import.8:75
+#, no-wrap
+msgid "AUTHORS"
+msgstr "AUTEURS"
+
+# type: Plain text
+#: doc/apt-proxy.8:75
+msgid ""
+"apt-proxy v2 was written by Manuel Estrada Sainz and is maintained by Otavio "
+"Salvador and Chris Halls."
+msgstr ""
+"apt-proxy v2 a été écrit par Manuel Estrada Sainz et est maintenu par Chris "
+"Halls."
+
+# type: TH
+#: doc/apt-proxy-v1tov2.8:1
+#, no-wrap
+msgid "APT-PROXY-V1TOV2"
+msgstr "APT-PROXY-V1TOV2"
+
+# type: TH
+#: doc/apt-proxy-v1tov2.8:1
+#, no-wrap
+msgid "November 2002"
+msgstr "novembre 2002"
+
+# type: TH
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+#: doc/apt-proxy-v1tov2.8:1 doc/apt-proxy-import.8:2
+#, no-wrap
+msgid "Debian GNU/Linux"
+msgstr "Debian GNU/Linux"
+
+# type: TH
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+#: doc/apt-proxy-v1tov2.8:1 doc/apt-proxy-import.8:2
+#, fuzzy, no-wrap
+msgid "  "
+msgstr " "
+
+# type: SH
+#: doc/apt-proxy-v1tov2.8:2 doc/apt-proxy-import.8:3 doc/apt-proxy.conf.5:3
+#, no-wrap
+msgid "NAME"
+msgstr "NOM"
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:4
+msgid "apt-proxy-v1tov2 - Updates apt-proxy configuration to the new format."
+msgstr ""
+"apt-proxy-v1tov2 - Convertit la configuration d'apt-proxy vers le nouveau "
+"format."
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:7
+msgid "B<apt-proxy-v1tov2> [v1_conf [v2_sample_conf]] E<gt> v2_conf"
+msgstr "B<apt-proxy-v1tov2> [v1_conf [v2_exemple_conf]] E<gt> v2_conf"
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:11
+msgid ""
+"apt-proxy-v1tov2 tries to update I<v2_sample_conf> with the configuration "
+"found in I<v1_conf> and writes the result to I<stdout>."
+msgstr ""
+"apt-proxy-v1tov2 tente de convertir I<v2_exemple_conf> avec la configuration "
+"trouvée dans le fichier I<v1_conf> et écrira le résultat sur I<stdout>."
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:14
+msgid ""
+"By default, it will use /etc/apt-proxy/apt-proxy.conf for I<v1_conf> and /"
+"etc/apt-proxy/apt-proxy-v2.conf for I<v2_sample_conf>."
+msgstr ""
+"Par défaut, il utilisera /etc/apt-proxy/apt-proxy.conf pour I<v1_conf> et /"
+"etc/apt-proxy/apt-proxy-v2.conf pour I<v2_example_conf>."
+
+# type: SH
+#: doc/apt-proxy-v1tov2.8:15
+#, no-wrap
+msgid "NOTES"
+msgstr "NOTES"
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:17
+msgid "Hopefully the package maintainer scripts have already run this for you."
+msgstr ""
+"Vraisemblablement, les scripts du responsable de paquet doivent déjà l'avoir "
+"fait pour vous."
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:20 doc/apt-proxy.conf.5:188
+msgid "/etc/apt-proxy/apt-proxy\\&.conf"
+msgstr "/etc/apt-proxy/apt-proxy.conf"
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:22 doc/apt-proxy.conf.5:190
+msgid "/etc/apt-proxy/apt-proxy-v2\\&.conf"
+msgstr "/etc/apt-proxy/apt-proxy-v2.conf"
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:24
+msgid "Manuel Estrada Sainz E<lt>ranty at debian.orgE<gt>"
+msgstr "Manuel Estrada Sainz E<lt>ranty at debian.orgE<gt>"
+
+# type: Plain text
+#: doc/apt-proxy-v1tov2.8:29 doc/apt-proxy-import.8:82
+msgid "B<apt-proxy>(8), B<apt-proxy.conf>(5)"
+msgstr "B<apt-proxy>(8), B<apt-proxy.conf>(5)"
+
+# type: TH
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+#: doc/apt-proxy-import.8:2
+#, no-wrap
+msgid "APT-PROXY-IMPORT"
+msgstr "APT-PROXY-IMPORT"
+
+# type: TH
+#.  DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+#: doc/apt-proxy-import.8:2
+#, no-wrap
+msgid "March 2006"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:5
+msgid "apt-proxy-import - Import packages into the apt-proxy cache."
+msgstr "apt-proxy-import - Importe les paquets dans le cache d'apt-proxy."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:8
+msgid "B<apt-proxy-import> [I<options>] I<E<lt>filenameE<gt> >..."
+msgstr "B<apt-proxy-import> [I<options>] I<E<lt>[fichier de journalL<gt> >..."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:11
+msgid ""
+"WARNING: apt-proxy has not been tested under this version of twisted "
+"(2.2.0).  WARNING: although it should work without problem."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy-import.8:13
+msgid "apt-proxy-import B<-r> [options] E<lt>directoryE<gt> ..."
+msgstr "apt-proxy-import B<-r> [options] E<lt>directoryE<gt> ..."
+
+# type: SH
+#: doc/apt-proxy-import.8:13
+#, no-wrap
+msgid "OPTIONS"
+msgstr "OPTIONS"
+
+# type: TP
+#: doc/apt-proxy-import.8:14
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr "B<-V>, B<--version>"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:17
+msgid "print version and quit"
+msgstr "Affiche la version"
+
+# type: TP
+#: doc/apt-proxy-import.8:17
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr "B<-v>, B<--verbose>"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:20
+msgid "give verbose output"
+msgstr "Sortie verbeuse"
+
+# type: TP
+#: doc/apt-proxy-import.8:20
+#, no-wrap
+msgid "B<-d>, B<--debug>"
+msgstr "B<-d>, B<--debug>"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:23
+msgid "debug output"
+msgstr "Sortie debug"
+
+# type: TP
+#: doc/apt-proxy-import.8:23
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr "B<-q>, B<--quiet>"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:26
+msgid "try not to write messages to stdout"
+msgstr "N'essaye pas d'écrire des messages dans stdout"
+
+# type: TP
+#: doc/apt-proxy-import.8:26
+#, no-wrap
+msgid "B<-r>, B<--recursive>"
+msgstr "B<-r>, B<--recursive>"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:29
+msgid "recurse into subdirectories"
+msgstr "Récursif dans les sous répertoires"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:32
+msgid "Display this help and exit."
+msgstr "Affiche cette aide."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:35
+msgid "Configuration file"
+msgstr "Fichier de configuration"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:37
+msgid "apt-proxy-import imports .deb files into the apt-proxy cache."
+msgstr " apt-proxy-import - Importe les paquets dans le cache d'apt-proxy."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:41
+msgid ""
+"It uses the package lists to determine where each file should be placed, so "
+"you should run B<'apt-get update'> to allow apt-proxy to update the package "
+"lists before running apt-proxy-import."
+msgstr ""
+"Il utilise la liste de paquets pour déterminer où sera placé chaque fichier, "
+"aussi vous devriez lancer la commande B<'apt-get update'> pour permettre à "
+"apt-proxy de mettre à jour la liste de paquets avant de lancer apt-proxy-"
+"import."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:44
+msgid ""
+"WARNING: although it should work without problem.  apt-proxy-import 1.9.x"
+msgstr ""
+
+# type: SH
+#: doc/apt-proxy-import.8:44
+#, no-wrap
+msgid "USING TO BOOTSTRAP A NEW APT-PROXY CACHE"
+msgstr "À UTILISER POUR REMPLIR UN NOUVEAU CACHE POUR APT-PROXY"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:48
+msgid ""
+"If you have been using apt standalone, you probably have built up a large "
+"collection of .debs or .udebs in apt's cache directory.  You can import "
+"these files into apt-proxy as follows:"
+msgstr ""
+"Si vous aviez déjà utilisé apt, vous avez probablement créé une importante "
+"collection de fichiers .deb ou .udeb dans le répertoire cache d'apt. Vous "
+"pouvez importer ces fichiers dans apt-proxy comme suit :"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:50
+msgid "1. Update apt-proxy's filelists:"
+msgstr "1. Mettre à jour la liste de fichiers d'apt-proxy :"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:52
+#, no-wrap
+msgid "    apt-get update\n"
+msgstr "    apt-get update\n"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:55
+msgid "2. Import files from apt's cache:"
+msgstr "2. Importer des fichiers depuis le cache d'apt :"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:57
+#, no-wrap
+msgid "    apt-proxy-import -i /var/cache/apt/archives\n"
+msgstr "    apt-proxy-import -i /var/cache/apt/archives\n"
+
+# type: SH
+#: doc/apt-proxy-import.8:58
+#, no-wrap
+msgid "IMPORTING APT-MOVE CACHE"
+msgstr "IMPORTER LE CACHE D'APT-MOVE"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:60
+msgid ""
+"You can import the apt-move generated cache into apt-proxy using the "
+"following command:"
+msgstr ""
+"Vous pouvez importer le cache généré par apt-move dans apt-proxy en "
+"utilisant la commande suivante :"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:63
+#, no-wrap
+msgid "    apt-proxy-import -r -i /var/cache/apt-move\n"
+msgstr "    apt-proxy-import -r -i /var/cache/apt-move\n"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:66
+msgid ""
+"This tells apt-proxy-import to recuse over each directory in the apt-move "
+"cache."
+msgstr ""
+"Cette commande demande à apt-proxy-import de parcourir chaque répertoire "
+"dans le cache d'apt-move."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:68
+msgid "\\ /etc/apt-proxy/apt-proxy\\&.conf"
+msgstr "\\ /etc/apt-proxy/apt-proxy.conf"
+
+# type: Plain text
+#: doc/apt-proxy-import.8:71
+msgid ""
+"apt-proxy-import does not use I<max_age> or I<max_versions> to clean the "
+"cache directory on import."
+msgstr ""
+"apt-proxy-import n'utilise pas les options I<max_age> ou I<max_versions> "
+"pour purger le répertoire cache pendant l'import."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:73
+msgid "It does not yet import source.tar.gz or Packages files."
+msgstr "Il n'importe pas encore les fichiers source.tar.gz ou Packages."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:75
+msgid "You must run it as the apt-proxy user or as root."
+msgstr "Vous devez le lancer en tant qu'utilisateur apt-proxy ou root."
+
+# type: Plain text
+#: doc/apt-proxy-import.8:77
+msgid ""
+"Chris Halls E<lt>halls at debian.orgE<gt>, Manuel Estrada Sainz "
+"E<lt>ranty at debian.orgE<gt>"
+msgstr ""
+"Chris Halls E<lt>halls at debian.orgE<gt>, Manuel Estrada Sainz "
+"E<lt>ranty at debian.orgE<gt>"
+
+# type: TH
+#.  Man page copied from apt.conf man page.
+#: doc/apt-proxy.conf.5:2
+#, no-wrap
+msgid "apt-proxy\\&.conf"
+msgstr "apt-proxy.conf"
+
+# type: TH
+#.  Man page copied from apt.conf man page.
+#: doc/apt-proxy.conf.5:2
+#, fuzzy, no-wrap
+msgid "5 Jan 2006"
+msgstr "15 jul 2005"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:5
+msgid "apt-proxy\\&.conf - configuration file for apt-proxy"
+msgstr "apt-proxy.conf - fichier de configuration pour apt-proxy"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:9
+#, fuzzy
+msgid ""
+"B<apt-proxy\\&.conf> is the configuration file for apt-proxy.  When apt-"
+"proxy starts up, it will read I</etc/apt-proxy/apt-proxy\\&.conf>\\&."
+msgstr ""
+"B<apt-proxy.conf> est le fichier de configuration pour apt-proxy. Au "
+"démarrage d'apt-proxy, il lira le fichier B</etc/apt-proxy/apt-proxy.conf>."
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:12
+#, fuzzy
+msgid ""
+"I</etc/apt-proxy/apt-proxy-v2\\&.conf> will be read instead if it exists to "
+"make upgrading from v1 easier."
+msgstr ""
+"B</etc/apt-proxy/apt-proxy-v2.conf> sera lu à la place s'il existe afin de "
+"rendre la mise à jour depuis la version 1 plus transparente."
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:15
+msgid ""
+"The configuration file is divided up into several sections, where each I<"
+"[resource]> section defines a separate resource. The B<DEFAULT> section "
+"applies to all resources."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:19
+#, fuzzy
+msgid ""
+"The supplied I<apt-proxy\\&.conf> will work out of the box, but it is best "
+"to change the backends you use to a mirror closer to you.  There are some in "
+"the default file, and it may be enough just to reorder the lines in the file"
+"\\&."
+msgstr ""
+"Le fichier apt-proxy.conf fourni devrait fonctionner tel quel, mais il est "
+"suggéré de choisir un miroir plus proche de vous. Certains sont dans le "
+"fichier apt-proxy.conf par défaut et il devrait suffire de réordonner les "
+"lignes dans ce fichier."
+
+# type: SH
+#: doc/apt-proxy.conf.5:21
+#, no-wrap
+msgid "[DEFAULT]"
+msgstr "[DÉFAUT]"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:23
+msgid "This section holds options global to the whole apt-proxy:"
+msgstr "Cette section contient les options globales d'apt-proxy :"
+
+# type: TP
+#: doc/apt-proxy.conf.5:24
+#, no-wrap
+msgid "B<address>"
+msgstr "B<address>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:28
+msgid ""
+"IP address on which apt-proxy will listen for requests. Multiple addresses "
+"have a empty space between it."
+msgstr ""
+"L'adresse IP sur laquelle apt-proxy sera à l'écoute des requêtes. S'il y a "
+"plusieurs adresses, les séparer par un espace."
+
+# type: TP
+#: doc/apt-proxy.conf.5:29
+#, no-wrap
+msgid "B<port>"
+msgstr "B<port>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:32
+msgid "TCP port on which apt-proxy will listen for requests."
+msgstr "Le port TCP sur lequel apt-proxy sera à l'écoute des requêtes."
+
+# type: TP
+#: doc/apt-proxy.conf.5:33
+#, no-wrap
+msgid "B<min_refresh_delay>"
+msgstr "B<min_refresh_delay>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:38
+msgid ""
+"If different from B<off>, means that Packages and other control files will "
+"not be refreshed more frequently than this number of seconds\\&."
+msgstr ""
+"Si différent de B<off>, cela signifie que les fichiers Packages et les "
+"autres fichiers de contrôle ne seront pas rafraîchis plus fréquemment que ce "
+"nombre de secondes."
+
+# type: TP
+#: doc/apt-proxy.conf.5:39 doc/apt-proxy.conf.5:96
+#, no-wrap
+msgid "B<timeout>"
+msgstr "B<timeout>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:44
+msgid ""
+"Maximum I/O timeout in seconds for backend transfers. Default: 30 seconds.  "
+"If no response is received from a backend server in this time, apt-proxy "
+"will try the next server in the list.  Y"
+msgstr ""
+"Délai d'I/O dépassé pour les transferts. Défaut : 30 secondes. Si aucune "
+"réponse n'est reçue du serveur dans ce laps de temps, apt-proxy essaiera le "
+"serveur suivant de la liste."
+
+# type: TP
+#: doc/apt-proxy.conf.5:45
+#, no-wrap
+msgid "B<cache_dir>"
+msgstr "B<cache_dir>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:48
+msgid "Cache directory.  Default: /var/cache/apt-proxy"
+msgstr "Répertoire de cache. Défaut : /var/cache/apt-proxy"
+
+# type: TP
+#: doc/apt-proxy.conf.5:49
+#, no-wrap
+msgid "B<cleanup_freq>"
+msgstr "B<cleanup_freq>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:54
+msgid ""
+"If different from B<off>, indicates the time between housekeeping attempts: "
+"delete files that have not been accessed in max_age, scan cache directories "
+"and update internal tables, ..."
+msgstr ""
+"Si différent de B<off>, cela indique la période entre les tentatives de "
+"nettoyage : suppression des fichiers qui n'ont pas été accédés depuis "
+"max_age, analyse des répertoires de cache, mise à jour des tables "
+"internes, ..."
+
+# type: TP
+#: doc/apt-proxy.conf.5:55
+#, no-wrap
+msgid "B<max_age>"
+msgstr "B<max_age>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:59
+msgid ""
+"If different from B<off>, indicates the maximum age of files before deletion "
+"from the cache."
+msgstr ""
+"Si différent de B<off>, cela indique l'âge maximal des fichiers avant leur "
+"effacement du cache."
+
+# type: TP
+#: doc/apt-proxy.conf.5:60
+#, no-wrap
+msgid "B<max_versions>"
+msgstr "B<max_versions>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:67
+msgid ""
+"If different from B<off>, indicates the maximum number of versions of a \\&."
+"deb to keep.  This is the number of versions per distribution, for example "
+"setting max_versions to 2 will ensure that a maximum of 6 packages would be "
+"kept: the last 2 stable versions, the last 2 testing versions and the last 2 "
+"unstable versions."
+msgstr ""
+"Si différent de B<off>, cela indique le nombre maximum de version d'un "
+"paquet Debian à conserver. Il s'agit du nombre de versions par distribution. "
+"Par exemple, mettre max_versions à 2 assurera qu'un maximum de 6 paquets "
+"sera conservé : les deux dernières versions de stable, les deux dernières "
+"versions de testing et les deux dernières versions d'unstable."
+
+# type: TP
+#: doc/apt-proxy.conf.5:68 doc/apt-proxy.conf.5:111
+#, no-wrap
+msgid "B<passive_ftp>"
+msgstr "B<passive_ftp>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:73
+msgid ""
+"Specify B<on> to use passive FTP, which works from behind a firewall, but "
+"may not be supported on all servers.  Specify B<off> to use active FTP "
+"instead.  Default: on"
+msgstr ""
+"Spécifiez B<on> pour utiliser le FTP passif, qui fonctionne à travers un "
+"pare-feu, mais n'est pas géré sur tous les serveurs. Spécifiez B<off> pour "
+"utiliser le FTP actif à la place. Défaut : on"
+
+# type: TP
+#: doc/apt-proxy.conf.5:74
+#, no-wrap
+msgid "B<http_proxy>"
+msgstr "B<http_proxy>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:77
+msgid "Specify B<hostname:port> to use an upstream proxy."
+msgstr "Indiquez B<nom d'hôte:port> pour utiliser un proxy amont."
+
+# type: TP
+#: doc/apt-proxy.conf.5:78
+#, no-wrap
+msgid "B<dynamic_backends>"
+msgstr "B<dynamic_backends>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:83
+msgid ""
+"By default apt-proxy will add HTTP backends dynamically if not already "
+"defined. Specify B<off> to restrict the available backends to those listed "
+"in the configuration file.  Default: on"
+msgstr ""
+"Par défaut, apt-proxy ajoutera les dorsaux HTTP dynamiquement s'ils ne sont "
+"pas déjà définis. Mettre à B<off> pour restreindre les dorsaux disponibles à "
+"ceux listés dans le fichier de configuration. Défaut : on"
+
+# type: TP
+#: doc/apt-proxy.conf.5:84
+#, no-wrap
+msgid "B<disable_pipelining>"
+msgstr "B<disable_pipelining>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:90
+msgid ""
+"apt-proxy can use HTTP pipelining to fetch several files at once (up to 10), "
+"but this can generate multiple connections to each backend server.  "
+"Pipelining is disabled by default until this is fixed.  Set to B<0> to "
+"enable experimental http pipelining.  Default: 1"
+msgstr ""
+"apt-proxy peut utiliser la canalisation HTTP pour récupérer plusieurs "
+"fichiers en une fois (jusqu'à 10), mais ceci génère de multiples connexions "
+"sur chaque dorsal. La canalisation est désactivée par défaut jusqu'à ce que "
+"ce problème soit corrigé. Mettre à B<0> pour activer la canalisation "
+"expérimentale HTTP. Défaut : 1"
+
+# type: SH
+#: doc/apt-proxy.conf.5:92
+#, no-wrap
+msgid "RESOURCES"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:95
+#, fuzzy
+msgid ""
+"All other sections in the configuration file will be interpreted as resource "
+"names.  The options in the section apply to this resource only."
+msgstr ""
+"Toutes les autres sections devront être interprétées comme des noms de "
+"miroir, et les options qui y seront spécifiées seront spécifiques à ce "
+"miroir."
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:99
+msgid "Overrides the global timeout"
+msgstr "Supplanter le temps global d'expiration"
+
+# type: TP
+#: doc/apt-proxy.conf.5:100
+#, fuzzy, no-wrap
+msgid "B<backends = >I<E<lt>protocolE<gt>>B<://>I<E<lt>serverE<gt>>B</>I<E<lt>directoryE<gt>>B< [...]>"
+msgstr "B<miroirs = E<lt>protocoleE<gt>://E<lt>serveurE<gt>/E<lt>répertoireE<gt>>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:103
+msgid ""
+"A list one or more URLs referring to servers which hold debian packages\\&."
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:106
+#, fuzzy
+msgid "I<protocol>: internet protocol to use: http, ftp or rsync"
+msgstr "Protocole - protocole à utiliser : http, ftp ou rsync"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:108
+#, fuzzy
+msgid "I<server>: hostname of the backend server to contact"
+msgstr "Serveur - nom d'hôte du miroir à contacter"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:110
+#, fuzzy
+msgid "I<directory>: directory name to prepend requests to for this server"
+msgstr "Répertoire - nom du répertoire où ajouter des demandes pour ce serveur"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:114
+msgid "Override the global setting of passive_ftp"
+msgstr "Supplanter la configuration globale de passive_ftp"
+
+# type: SH
+#: doc/apt-proxy.conf.5:115
+#, fuzzy, no-wrap
+msgid "CONFIGURATION EXAMPLES"
+msgstr "CONFIGURATION DU CLIENT"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:120
+msgid ""
+"To access a resource that's listed under a specific section name, simply "
+"append the section name (without the brackets) to the end of your deb source "
+"line in /etc/apt/sources.list"
+msgstr ""
+
+# type: TH
+#: doc/apt-proxy.conf.5:122
+#, fuzzy
+msgid "B<Debian main>"
+msgstr "Debian GNU/Linux"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:125
+msgid ""
+"This example shows how to give clients access to the main Debian archive:"
+msgstr ""
+"Cet exemple montre comment donner aux clients l'accès à l'archive Debian "
+"principale :"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:129
+#, no-wrap
+msgid ""
+"[debian]\n"
+"backends = http://ftp.us.debian.org/debian/\n"
+"           http://ftp.de.debian.org/debian/\n"
+msgstr ""
+"[debian]\n"
+"backends = http://ftp.us.debian.org/debian/\n"
+"            http://ftp.fr.debian.org/debian/\n"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:134
+#, fuzzy
+msgid ""
+"Using this configuration, the client would use a I<sources.list> entry like:"
+msgstr ""
+"En utilisant cette configuration, le client utilisera une entrée B<sources."
+"list> comme ceci :"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:137
+#, fuzzy, no-wrap
+msgid "    deb http://server:9999/debian woody main\n"
+msgstr "    deb http://SERVEUR:9999/debian/ woody main\n"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:142
+msgid ""
+"And so the file request `/debian/woody/main/binary-i386/x11/foo_1-1.deb' "
+"would turn into a backend request of first"
+msgstr ""
+"Ainsi, la demande du fichier « /debian/woody/main/binary-i386/x11/foo_1-1."
+"deb » sera convertie en une demande d'abord de"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:145
+#, no-wrap
+msgid "    `http://ftp.us.debian.org/debian/woody/main/binary-i386/x11/foo_1-1.deb'\n"
+msgstr "    « http://ftp.us.debian.org/debian/woody/main/binary-i386/x11/foo_1-1.deb »\n"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:148
+msgid "and if that failed,"
+msgstr "et, en cas d'échec, de"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:151
+#, no-wrap
+msgid "    `http://ftp.de.debian.org/debian/woody/main/binary-i386/x11/foo_1-1.deb'\n"
+msgstr "    « http://ftp.fr.debian.org/debian/woody/main/binary-i386/x11/foo_1-1.deb »\n"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:154
+msgid "and apt-proxy will place the downloaded package in"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:156
+#, no-wrap
+msgid "    `/var/cache/apt-proxy/debian/debian/woody/main/binary-i386/x11/foo_1-1.deb'\\&.\n"
+msgstr "     « /var/cache/apt-proxy/debian/debian/woody/main/binary-i386/x11/foo_1-1.deb ».\n"
+
+# type: TP
+#: doc/apt-proxy.conf.5:159
+#, fuzzy
+msgid "B<backports.org>"
+msgstr "B<port>"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:161
+msgid "The backports.org website tells you to use this I<sources.list> line:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:164
+#, no-wrap
+msgid "    deb http://www.backports.org/debian sarge-backports main\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:168
+msgid ""
+"You can add this to apt-proxy by creating a new section in I<apt-proxy\\&."
+"conf>\\&.  In the new section, add a backends entry for the URL:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:172
+#, no-wrap
+msgid ""
+"    [backports]\n"
+"    backends = http://www.backports.org/debian\n"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:177
+msgid ""
+"On the clients, replace the URL with one pointing to the apt-proxy resource "
+"name, in the form I<http://hostname:port/backend>. If your apt-proxy "
+"hostname is I<proxy> and it is running on port 9999, you would write:"
+msgstr ""
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:180
+#, fuzzy, no-wrap
+msgid "   deb http://proxy:9999/backports sarge-backports main\n"
+msgstr "    deb http://SERVEUR:9999/debian/ woody main\n"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:185
+#, fuzzy
+msgid ""
+"For many more examples, see the supplied /etc/apt-proxy/apt-proxy\\&.conf\\&."
+msgstr ""
+"Pour d'autres exemples, voir le fichier /etc/apt-proxy/apt-proxy.conf.\n"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:196
+msgid ""
+"B<apt-proxy(8),> B</usr/share/doc/apt-proxy/README,> B<apt-proxy-import(8)>"
+msgstr ""
+"B<apt-proxy>(8), B</usr/share/doc/apt-proxy/README,>B<apt-proxy-import>(8)"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:201
+msgid "Plenty sure.  Please report."
+msgstr "Certainement. Veuillez nous en faire part."
+
+# type: SH
+#: doc/apt-proxy.conf.5:202
+#, no-wrap
+msgid "AUTHOR"
+msgstr "AUTEUR"
+
+# type: Plain text
+#: doc/apt-proxy.conf.5:203
+msgid ""
+"apt-proxy v2 was written by Manuel Estrada Sainz E<lt>ranty at debian.orgE<gt>"
+"\\&."
+msgstr ""
+"apt-proxy v2 a été écrit par Manuel Estrada Sainz E<lt>ranty at debian.orgE<gt>."
+
+# type: TH
+#~ msgid "October 2005"
+#~ msgstr "Octobre 2005"
+
+# type: TH
+#~ msgid "21 Nov 2002"
+#~ msgstr "21 novembre 2002"
+
+# type: SH
+#~ msgid "BACKENDS"
+#~ msgstr "DORSAUX"
+
+# type: Plain text
+#~ msgid "A list of backend URLs\\&."
+#~ msgstr "Une liste de liens de dorsaux."
+
+# type: Plain text
+#~ msgid "and the file would be placed in\n"
+#~ msgstr "et le fichier devrait être placé dans\n"

Added: tags/1.9.33-0.1/doc/po4a.cfg
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/doc/po4a.cfg	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,5 @@
+[po4a_paths] doc/po/apt-proxy.pot fr:doc/po/fr.po
+[type: man] doc/apt-proxy.8 fr:doc/apt-proxy.fr.8 add_fr:doc/apt-proxy.add.fr
+[type: man] doc/apt-proxy.conf.5 fr:doc/apt-proxy.conf.fr.5 add_fr:doc/apt-proxy.add.fr
+[type: man] doc/apt-proxy-import.8 fr:doc/apt-proxy-import.fr.8 add_fr:doc/apt-proxy.add.fr
+[type: man] doc/apt-proxy-v1tov2.8 fr:doc/apt-proxy-v1tov2.fr.8 add_fr:doc/apt-proxy.add.fr

Added: tags/1.9.33-0.1/pychecker
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/pychecker	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,4 @@
+#!/bin/sh
+PYTHONPATH="`pwd`" pychecker \
+	--stdlib \
+	$(find apt_proxy -name "*.py")

Added: tags/1.9.33-0.1/runtests
==============================================================================
--- (empty file)
+++ tags/1.9.33-0.1/runtests	Thu Aug  3 10:12:44 2006
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+make_packages_dir()
+{
+  echo Creating test data
+  mkdir -p test_data/packages
+  cd test_data/packages
+  echo Creating apt package from system
+  fakeroot -u dpkg-repack apt
+  echo Creating Packages file for package
+  dpkg-scanpackages . /dev/null | tee Packages | gzip -c > Packages.gz
+}
+
+[ -f test_data/packages/Packages ] || make_packages_dir
+
+pwd
+if [ $# -eq 0 ]; then
+  set -- apt_proxy.test
+fi
+PYTHONPATH="`pwd`" trial --verbose --logfile `pwd`/unitttests.log $@



More information about the apt-proxy-devel mailing list