aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/update.py')
-rw-r--r--pym/portage/update.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/update.py b/pym/portage/update.py
index a5cb92eda..a66c60b9a 100644
--- a/pym/portage/update.py
+++ b/pym/portage/update.py
@@ -58,7 +58,7 @@ def update_dbentry(update_cmd, mycontent, eapi=None):
mycontent = re.sub(old_value+"($|\\s)", new_value+"\\1", mycontent)
return mycontent
-def update_dbentries(update_iter, mydata):
+def update_dbentries(update_iter, mydata, eapi=None):
"""Performs update commands and returns a
dict containing only the updated items."""
updated_items = {}
@@ -72,7 +72,7 @@ def update_dbentries(update_iter, mydata):
is_encoded = mycontent is not orig_content
orig_content = mycontent
for update_cmd in update_iter:
- mycontent = update_dbentry(update_cmd, mycontent)
+ mycontent = update_dbentry(update_cmd, mycontent, eapi=eapi)
if mycontent != orig_content:
if is_encoded:
mycontent = _unicode_encode(mycontent,
@@ -81,7 +81,7 @@ def update_dbentries(update_iter, mydata):
updated_items[k] = mycontent
return updated_items
-def fixdbentries(update_iter, dbdir):
+def fixdbentries(update_iter, dbdir, eapi=None):
"""Performs update commands which result in search and replace operations
for each of the files in dbdir (excluding CONTENTS and environment.bz2).
Returns True when actual modifications are necessary and False otherwise."""
@@ -93,7 +93,7 @@ def fixdbentries(update_iter, dbdir):
mode='r', encoding=_encodings['repo.content'],
errors='replace') as f:
mydata[myfile] = f.read()
- updated_items = update_dbentries(update_iter, mydata)
+ updated_items = update_dbentries(update_iter, mydata, eapi=eapi)
for myfile, mycontent in updated_items.items():
file_path = os.path.join(dbdir, myfile)
write_atomic(file_path, mycontent, encoding=_encodings['repo.content'])