self._remote_has_index = False
self._remote_base_uri = None
self._remotepkgs = None # remote metadata indexed by cpv
- self.remotepkgs = {} # indexed by tbz2 name (deprecated)
+ self.__remotepkgs = {} # indexed by tbz2 name (deprecated)
self.invalids = []
self.settings = settings
self._pkg_paths = {}
chain(*self._pkgindex_translated_keys)
))
+ def _get_remotepkgs(self):
+ warnings.warn("Use binarytree._remotepkgs insead of binarytree.remotepkgs",
+ DeprecationWarning)
+ return self.__remotepkgs
+
+ def _set_remotepkgs(self, remotepkgs):
+ warnings.warn("Use binarytree._remotepkgs insead of binarytree.remotepkgs",
+ DeprecationWarning)
+ self.__remotepkgs = remotepkgs
+
+ def _del_remotepkgs(self):
+ warnings.warn("Use binarytree._remotepkgs insead of binarytree.remotepkgs",
+ DeprecationWarning)
+ del self.__remotepkgs
+
+ remotepkgs = property(_get_remotepkgs, _set_remotepkgs, _del_remotepkgs,
+ "Deprecated self.remotepkgs, only for backward compatibility")
+
def move_ent(self, mylist):
if not self.populated:
self.populate()
self._remotepkgs[d["CPV"]] = d
self._remote_has_index = True
self._remote_base_uri = pkgindex.header.get("URI", base_url)
- self.remotepkgs = {}
+ self.__remotepkgs = {}
for cpv in self._remotepkgs:
self.dbapi.cpv_inject(cpv)
self.populated = 1
writemsg_stdout(
colorize("GOOD", _("Fetching bininfo from ")) + \
re.sub(r'//(.+):.+@(.+)/', r'//\1:*password*@\2/', base_url) + "\n")
- self.remotepkgs = portage.getbinpkg.dir_get_metadata(
+ self.__remotepkgs = portage.getbinpkg.dir_get_metadata(
self.settings["PORTAGE_BINHOST"], chunk_size=chunk_size)
#writemsg(green(" -- DONE!\n\n"))
- for mypkg in list(self.remotepkgs):
- if "CATEGORY" not in self.remotepkgs[mypkg]:
+ for mypkg in list(self.__remotepkgs):
+ if "CATEGORY" not in self.__remotepkgs[mypkg]:
#old-style or corrupt package
writemsg(_("!!! Invalid remote binary package: %s\n") % mypkg,
noiselevel=-1)
- del self.remotepkgs[mypkg]
+ del self.__remotepkgs[mypkg]
continue
- mycat = self.remotepkgs[mypkg]["CATEGORY"].strip()
+ mycat = self.__remotepkgs[mypkg]["CATEGORY"].strip()
fullpkg = mycat+"/"+mypkg[:-5]
if fullpkg in metadata:
# invalid tbz2's can hurt things.
#print "cpv_inject("+str(fullpkg)+")"
self.dbapi.cpv_inject(fullpkg)
- remote_metadata = self.remotepkgs[mypkg]
+ remote_metadata = self.__remotepkgs[mypkg]
for k, v in remote_metadata.items():
remote_metadata[k] = v.strip()
except:
writemsg(_("!!! Failed to inject remote binary package: %s\n") % fullpkg,
noiselevel=-1)
- del self.remotepkgs[mypkg]
+ del self.__remotepkgs[mypkg]
continue
self.populated=1