Gentoo Archives: gentoo-commits

From: Thomas Sachau <tommy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
Date: Sun, 06 Feb 2011 13:14:36
Message-Id: 0bf4d79c8ad483c3c8a65210eb2af27e41f52714.tommy@gentoo
1 commit: 0bf4d79c8ad483c3c8a65210eb2af27e41f52714
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 3 05:51:19 2011 +0000
4 Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 3 05:51:19 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0bf4d79c
7
8 bintree: remove unused __remotepkgs
9
10 ---
11 pym/portage/dbapi/bintree.py | 15 +++++----------
12 1 files changed, 5 insertions(+), 10 deletions(-)
13
14 diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
15 index 254ed02..a9c614d 100644
16 --- a/pym/portage/dbapi/bintree.py
17 +++ b/pym/portage/dbapi/bintree.py
18 @@ -225,7 +225,6 @@ class binarytree(object):
19 self.tree = {}
20 self._remote_has_index = False
21 self._remotepkgs = None # remote metadata indexed by cpv
22 - self.__remotepkgs = {} # indexed by tbz2 name (deprecated)
23 self.invalids = []
24 self.settings = settings
25 self._pkg_paths = {}
26 @@ -731,7 +730,6 @@ class binarytree(object):
27 self.populated=1
28 return
29 self._remotepkgs = {}
30 - self.__remotepkgs = {}
31 for base_url in self.settings["PORTAGE_BINHOST"].split():
32 parsed_url = urlparse(base_url)
33 host = parsed_url.netloc
34 @@ -912,17 +910,15 @@ class binarytree(object):
35 re.sub(r'//(.+):.+@(.+)/', r'//\1:*password*@\2/', base_url) + "\n")
36 remotepkgs = portage.getbinpkg.dir_get_metadata(
37 base_url, chunk_size=chunk_size)
38 - self.__remotepkgs.update(remotepkgs)
39 - #writemsg(green(" -- DONE!\n\n"))
40
41 - for mypkg in list(remotepkgs):
42 - if "CATEGORY" not in self.__remotepkgs[mypkg]:
43 + for mypkg, remote_metadata in list(remotepkgs.items()):
44 + if "CATEGORY" not in remote_metadata:
45 #old-style or corrupt package
46 writemsg(_("!!! Invalid remote binary package: %s\n") % mypkg,
47 noiselevel=-1)
48 - del self.__remotepkgs[mypkg]
49 + del remotepkgs[mypkg]
50 continue
51 - mycat = self.__remotepkgs[mypkg]["CATEGORY"].strip()
52 + mycat = remotepkgs[mypkg]["CATEGORY"].strip()
53 fullpkg = mycat+"/"+mypkg[:-5]
54
55 if fullpkg in metadata:
56 @@ -944,7 +940,6 @@ class binarytree(object):
57 try:
58 # invalid tbz2's can hurt things.
59 self.dbapi.cpv_inject(fullpkg)
60 - remote_metadata = self.__remotepkgs[mypkg]
61 for k, v in remote_metadata.items():
62 remote_metadata[k] = v.strip()
63 remote_metadata["BASE_URI"] = base_url
64 @@ -965,7 +960,7 @@ class binarytree(object):
65 except:
66 writemsg(_("!!! Failed to inject remote binary package: %s\n") % fullpkg,
67 noiselevel=-1)
68 - del self.__remotepkgs[mypkg]
69 + remotepkgs[mypkg]
70 continue
71 self.populated=1