summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-02-19 09:09:38 +0000
committerZac Medico <zmedico@gentoo.org>2010-02-19 09:09:38 +0000
commit0a81fdb5435e55c22e78fa73cac6292fc9607b7d (patch)
tree107e5a0ca83bc252ab4ca9bbeee3194779a95e9e
parent8749911e2bf0f0fd45bcd36f638b0958e828f6a8 (diff)
downloadportage-0a81fdb5435e55c22e78fa73cac6292fc9607b7d.tar.gz
portage-0a81fdb5435e55c22e78fa73cac6292fc9607b7d.tar.bz2
portage-0a81fdb5435e55c22e78fa73cac6292fc9607b7d.zip
Deprecate the unused getbinpkgsonly parameter to binarytree.populate().
svn path=/main/trunk/; revision=15374
-rw-r--r--pym/portage/dbapi/bintree.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index abd375a2d..3062e4bfe 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -32,6 +32,7 @@ import errno
import re
import stat
import sys
+import warnings
from itertools import chain
if sys.hexversion >= 0x3000000:
@@ -443,8 +444,15 @@ class binarytree(object):
_movefile(src_path, dest_path, mysettings=self.settings)
self._pkg_paths[cpv] = mypath
- def populate(self, getbinpkgs=0, getbinpkgsonly=0):
+ def populate(self, getbinpkgs=0, getbinpkgsonly=None):
"populates the binarytree"
+
+ if getbinpkgsonly is not None:
+ warnings.warn(
+ "portage.dbapi.bintree.binarytree.populate(): " + \
+ "getbinpkgsonly parameter is deprecated",
+ DeprecationWarning)
+
if self._populating:
return
from portage.locks import lockfile, unlockfile
@@ -454,13 +462,13 @@ class binarytree(object):
pkgindex_lock = lockfile(self._pkgindex_file,
wantnewlockfile=1)
self._populating = True
- self._populate(getbinpkgs, getbinpkgsonly)
+ self._populate(getbinpkgs)
finally:
if pkgindex_lock:
unlockfile(pkgindex_lock)
self._populating = False
- def _populate(self, getbinpkgs=0, getbinpkgsonly=0):
+ def _populate(self, getbinpkgs=0):
if (not os.path.isdir(self.pkgdir) and not getbinpkgs):
return 0