ref: refs/heads/master
commit 5761138dc66bb410c3eefc4ef231b5dba2bbafe9
Author: Ján Kupec
Date: Thu Sep 3 19:54:30 2009 +0200
Show processes using deleted files also after downgrades.
---
src/Summary.cc | 12 ++++++++++++
src/Summary.h | 1 +
src/solve-commit.cc | 6 ++++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/Summary.cc b/src/Summary.cc
index e727249..ddb8bd2 100644
--- a/src/Summary.cc
+++ b/src/Summary.cc
@@ -249,6 +249,18 @@ unsigned Summary::packagesToUpgrade() const
// --------------------------------------------------------------------------
+unsigned Summary::packagesToDowngrade() const
+{
+ // total packages to remove (packages only - patches, patterns, and products
+ // are virtual; srcpackages do not get removed by zypper)
+ KindToResPairSet::const_iterator it = todowngrade.find(ResKind::package);
+ if (it != todowngrade.end())
+ return it->second.size();
+ return 0;
+}
+
+// --------------------------------------------------------------------------
+
void Summary::writeResolvableList(ostream & out, const ResPairSet & resolvables)
{
// find multi-version packages
diff --git a/src/Summary.h b/src/Summary.h
index 40f8367..0dcffc6 100644
--- a/src/Summary.h
+++ b/src/Summary.h
@@ -83,6 +83,7 @@ public:
{ return _inst_pkg_total; }
unsigned packagesToRemove() const;
unsigned packagesToUpgrade() const;
+ unsigned packagesToDowngrade() const;
const zypp::ByteCount & toDownload() const
{ return _todownload; }
const zypp::ByteCount & installedSizeChange() const
diff --git a/src/solve-commit.cc b/src/solve-commit.cc
index db39a9d..978fad2 100755
--- a/src/solve-commit.cc
+++ b/src/solve-commit.cc
@@ -798,8 +798,10 @@ void solve_and_commit (Zypper & zypper)
Out::QUIET, Out::TYPE_NORMAL); // don't show this to machines
}
- // check for running services
- if (summary.packagesToRemove() && summary.packagesToUpgrade())
+ // check for running services (fate #300763)
+ if (summary.packagesToRemove() ||
+ summary.packagesToUpgrade() ||
+ summary.packagesToDowngrade())
suggest_restart_services(zypper);
}
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org