summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Debian.py7
-rw-r--r--src/lib/Client/Toolset.py3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py
index 2bff62716..f0bc9b46c 100644
--- a/src/lib/Client/Debian.py
+++ b/src/lib/Client/Debian.py
@@ -120,14 +120,15 @@ class Debian(Toolset):
if len(self.pkgwork) > 0:
if self.setup['remove'] in ['all', 'packages']:
self.CondPrint('verbose', "Removing packages: %s" % self.pkgwork['remove'])
- system("apt-get remove %s" % " ".join(self.pkgwork['remove']))
+ if not system("apt-get remove %s" % " ".join(self.pkgwork['remove'])):
+ self.pkgwork['remove'] = []
else:
self.CondPrint('verbose', "Need to remove packages: %s" % self.pkgwork['remove'])
if len(self.extra_services) > 0:
if self.setup['remove'] in ['all', 'services']:
self.CondPrint('verbose', "Removing services: %s" % self.extra_services)
- for service in self.extra_services:
- system("rm -f /etc/rc*.d/S??%s" % service)
+ [self.extra_services.remove(serv) for serv in self.extra_services if
+ not system("rm -f /etc/rc*.d/S??%s" % serv)]
else:
self.CondPrint('verbose', "Need to remove services: %s" % self.extra_services)
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index 9f759d733..114cc5b88 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -167,6 +167,9 @@ class Toolset(object):
mod = SubElement(stats, "Modified")
for elm in self.modified:
SubElement(mod, elm.tag, name=elm.get('name'))
+ extra = SubElement(stats, "Extra")
+ [SubElement(extra, "Service", name=svc) for svc in self.extra_services]
+ [SubElement(extra, "Package", name=pkg) for pkg in self.pkgwork['remove']]
return stats
# the next two are dispatch functions