mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-16 17:35:42 +02:00
Beter uninstalation
This commit is contained in:
parent
e195685c4b
commit
8eac20aa2e
@ -6,7 +6,7 @@ Usage:
|
|||||||
qp_install_module.py download -n <name> [<path_folder>...]
|
qp_install_module.py download -n <name> [<path_folder>...]
|
||||||
qp_install_module.py install <name>...
|
qp_install_module.py install <name>...
|
||||||
qp_install_module.py list (--installed | --available-local)
|
qp_install_module.py list (--installed | --available-local)
|
||||||
qp_install_module.py uninstall <name>... [--and_ancestor]
|
qp_install_module.py uninstall <name>...
|
||||||
|
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
@ -163,6 +163,7 @@ if __name__ == '__main__':
|
|||||||
subprocess.check_call(["qp_create_ninja.py", "update"])
|
subprocess.check_call(["qp_create_ninja.py", "update"])
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
print "Done"
|
print "Done"
|
||||||
print "You can now compile as usual"
|
print "You can now compile as usual"
|
||||||
|
|
||||||
@ -182,22 +183,21 @@ if __name__ == '__main__':
|
|||||||
print "* %s" % name
|
print "* %s" % name
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if arguments["--and_ancestor"]:
|
|
||||||
|
|
||||||
l_name_to_remove = l_name + [module for module in m_instance.l_module for name in l_name if name in d_descendant[module]]
|
l_name_to_remove = l_name + [module for module in m_instance.l_module for name in l_name if name in d_descendant[module]]
|
||||||
|
|
||||||
print "You will remove all of:"
|
print "You will remove all of:"
|
||||||
print l_name_to_remove
|
print l_name_to_remove
|
||||||
else:
|
|
||||||
l_name_to_remove = l_name
|
|
||||||
|
|
||||||
for module in l_name_to_remove:
|
for module in set(l_name_to_remove):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(["module_handler.py", "clean", module])
|
subprocess.check_call(["module_handler.py", "clean", module])
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
for module in set(l_name_to_remove):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.unlink(os.path.join(QP_SRC, module))
|
os.unlink(os.path.join(QP_SRC, module))
|
||||||
except OSError:
|
except OSError:
|
||||||
print "%s is a core module which can not be renmoved" % x
|
print "%s is a core module which can not be renmoved" % module
|
||||||
|
Loading…
Reference in New Issue
Block a user