Updated so kill old should not trash the root download dir.
This commit is contained in:
parent
a02fa9d3fc
commit
d2d7ff7dd2
@ -285,6 +285,7 @@ class PkgUninstallComponent(ComponentBase):
|
||||
def __init__(self, component_name, *args, **kargs):
|
||||
ComponentBase.__init__(self, component_name, *args, **kargs)
|
||||
self.tracereader = tr.TraceReader(self.tracedir, tr.IN_TRACE)
|
||||
self.kill_old = kargs.get("kill_old", False)
|
||||
|
||||
def unconfigure(self):
|
||||
self._unconfigure_files()
|
||||
@ -342,7 +343,10 @@ class PkgUninstallComponent(ComponentBase):
|
||||
if dirsmade:
|
||||
LOG.info("Removing %s created directories (%s)" % (len(dirsmade), ", ".join(dirsmade)))
|
||||
for dirname in dirsmade:
|
||||
sh.deldir(dirname, run_as_root=True)
|
||||
if self.kill_old and dirname == self.appdir:
|
||||
pass
|
||||
else:
|
||||
sh.deldir(dirname, run_as_root=True)
|
||||
|
||||
|
||||
class PythonUninstallComponent(PkgUninstallComponent):
|
||||
|
@ -172,7 +172,7 @@ class HorizonInstaller(comp.PythonInstallComponent):
|
||||
if sh.isdir(path):
|
||||
(user, group) = self._get_apache_user_group()
|
||||
LOG.debug("Changing ownership (recursively) of %s so that it can be used by %s - %s",
|
||||
path, user, group)
|
||||
path, user, group)
|
||||
uid = sh.getuid(user)
|
||||
gid = sh.getgid(group)
|
||||
sh.chown_r(path, uid, gid)
|
||||
|
@ -185,7 +185,9 @@ class ActionRunner(object):
|
||||
packager=self.pkg_manager,
|
||||
config=self.cfg,
|
||||
root=self.directory,
|
||||
opts=components.get(component, list()))
|
||||
opts=components.get(component, list()),
|
||||
kill_old=self.kargs.get("kill_old")
|
||||
)
|
||||
all_instances[component] = instance
|
||||
return all_instances
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user