[Piuparts-commits] [piuparts] 03/17: lib/db: remember the loaded URLs
Holger Levsen
holger at alioth.debian.org
Wed Nov 6 09:45:52 UTC 2013
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit be9dc2fcf01e2fe4b58c4ccd50b45a4660c30801
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue Nov 5 18:38:08 2013 +0100
lib/db: remember the loaded URLs
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
piupartslib/packagesdb.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 218d521..63546d7 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -133,6 +133,7 @@ class PackagesFile(UserDict.UserDict):
def __init__(self):
UserDict.UserDict.__init__(self)
+ self._urllist = []
def load_packages_urls(self, urls):
for url in urls:
@@ -141,6 +142,7 @@ class PackagesFile(UserDict.UserDict):
logging.debug("Fetching %s" % url)
self._read_file(stream)
stream.close()
+ self._urllist.append(url)
def _read_file(self, input):
"""Parse a Packages file and add its packages to us-the-dict"""
@@ -156,6 +158,9 @@ class PackagesFile(UserDict.UserDict):
continue
self[p["Package"]] = p
+ def get_urls(self):
+ return self._urllist
+
class LogDB:
@@ -355,6 +360,12 @@ class PackagesDB:
self._packages_files.append(pf)
self._packages = None
+ def get_urls(self):
+ urls = []
+ for pf in self._packages_files:
+ urls.extend(pf.get_urls())
+ return urls
+
def set_dependency_databases(self, dependency_databases=[]):
self._dependency_databases = list(dependency_databases)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list