summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/main.py9
-rw-r--r--pym/portage/__init__.py1
-rw-r--r--pym/portage/dbapi/vartree.py6
3 files changed, 7 insertions, 9 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 57277ecfb..6307904b7 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -314,9 +314,7 @@ def post_emerge(root_config, myopts, mtimedb, retval):
_flush_elog_mod_echo()
- counter_hash = settings.get("PORTAGE_COUNTER_HASH")
- if "--pretend" in myopts or (counter_hash is not None and \
- counter_hash == vardbapi._counter_hash()):
+ if not vardbapi._pkgs_changed:
display_news_notification(root_config, myopts)
# If vdb state has not changed then there's nothing else to do.
sys.exit(retval)
@@ -1075,11 +1073,6 @@ def emerge_main():
mysettings = trees[myroot]["vartree"].settings
mysettings.unlock()
adjust_config(myopts, mysettings)
- if '--pretend' not in myopts and myaction in \
- (None, 'clean', 'depclean', 'prune', 'unmerge'):
- mysettings["PORTAGE_COUNTER_HASH"] = \
- trees[myroot]["vartree"].dbapi._counter_hash()
- mysettings.backup_changes("PORTAGE_COUNTER_HASH")
mysettings.lock()
del myroot, mysettings
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index f6cf25f53..255b005bf 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1438,7 +1438,6 @@ class config(object):
"GENTOO_MIRRORS", "NOCONFMEM", "O",
"PORTAGE_BACKGROUND",
"PORTAGE_BINHOST_CHUNKSIZE", "PORTAGE_CALLER",
- "PORTAGE_COUNTER_HASH",
"PORTAGE_ELOG_CLASSES",
"PORTAGE_ELOG_MAILFROM", "PORTAGE_ELOG_MAILSUBJECT",
"PORTAGE_ELOG_MAILURI", "PORTAGE_ELOG_SYSTEM",
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 15ec5b798..b60316ee5 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -790,6 +790,10 @@ class vardbapi(dbapi):
self.root = _unicode_decode(root,
encoding=_encodings['content'], errors='strict')
+ # Used by emerge to check whether any packages
+ # have been added or removed.
+ self._pkgs_changed = False
+
#cache for category directory mtimes
self.mtdircache = {}
@@ -1041,9 +1045,11 @@ class vardbapi(dbapi):
self._aux_cache_obj = None
def _add(self, pkg_dblink):
+ self._pkgs_changed = True
self._clear_pkg_cache(pkg_dblink)
def _remove(self, pkg_dblink):
+ self._pkgs_changed = True
self._clear_pkg_cache(pkg_dblink)
def _clear_pkg_cache(self, pkg_dblink):