summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-20 07:02:32 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-20 07:02:32 -0700
commit8a6b2d71acf5da86537b95e323973ad156afddb1 (patch)
tree1f9efe20cd407889df05c5cab9eaa9bd06065201
parent567700e7cc0aa2ddb73128c9b02ffbeeefcf74e6 (diff)
downloadportage-8a6b2d71acf5da86537b95e323973ad156afddb1.tar.gz
portage-8a6b2d71acf5da86537b95e323973ad156afddb1.tar.bz2
portage-8a6b2d71acf5da86537b95e323973ad156afddb1.zip
Don't pass the myroot parameter to *counter_tick* methods since it's
ignored anyway.
-rw-r--r--pym/portage/dbapi/vartree.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 593811ba0..fac1d4925 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -919,7 +919,7 @@ class vardbapi(dbapi):
def cpv_inject(self, mycpv):
"injects a real package into our on-disk database; assumes mycpv is valid and doesn't already exist"
os.makedirs(self.getpath(mycpv))
- counter = self.counter_tick(self.root, mycpv=mycpv)
+ counter = self.counter_tick(mycpv=mycpv)
# write local package counter so that emerge clean does the right thing
write_atomic(self.getpath(mycpv, filename="COUNTER"), str(counter))
@@ -1374,10 +1374,10 @@ class vardbapi(dbapi):
pass
self._bump_mtime(cpv)
- def counter_tick(self, myroot, mycpv=None):
- return self.counter_tick_core(myroot, incrementing=1, mycpv=mycpv)
+ def counter_tick(self, myroot=None, mycpv=None):
+ return self.counter_tick_core(incrementing=1, mycpv=mycpv)
- def get_counter_tick_core(self, myroot, mycpv=None):
+ def get_counter_tick_core(self, myroot=None, mycpv=None):
"""
Use this method to retrieve the counter instead
of having to trust the value of a global counter
@@ -1451,9 +1451,9 @@ class vardbapi(dbapi):
return max_counter + 1
- def counter_tick_core(self, myroot, incrementing=1, mycpv=None):
+ def counter_tick_core(self, myroot=None, incrementing=1, mycpv=None):
"This method will grab the next COUNTER value and record it back to the global file. Returns new counter value."
- counter = self.get_counter_tick_core(myroot, mycpv=mycpv) - 1
+ counter = self.get_counter_tick_core(mycpv=mycpv) - 1
if incrementing:
#increment counter
counter += 1
@@ -3826,7 +3826,7 @@ class dblink(object):
self.copyfile(inforoot+"/"+x)
# write local package counter for recording
- counter = self.vartree.dbapi.counter_tick(self.myroot, mycpv=self.mycpv)
+ counter = self.vartree.dbapi.counter_tick(mycpv=self.mycpv)
codecs.open(_unicode_encode(os.path.join(self.dbtmpdir, 'COUNTER'),
encoding=_encodings['fs'], errors='strict'),
'w', encoding=_encodings['repo.content'], errors='backslashreplace'