summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
diff options
context:
space:
mode:
authorsajolida <sajolida@pimienta.org>2018-09-06 10:02:49 +0000
committersajolida <sajolida@pimienta.org>2018-09-06 10:02:49 +0000
commit7d452d39998b5543bacc53696a0897dd2906da4f (patch)
treea51c412b3dbd9b5f3a2100619d8b61d4eebcc78a /config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
parentbda974fa5d21c9cb2ba54611687d78a1eb11a23f (diff)
parent3629361577a8af12247ec95a151ad3922cc2ecc5 (diff)
Merge remote-tracking branch 'origin/devel' into feature/15291-remove-softwarewip/feature/15291-remove-software-sajolida-experiment
Diffstat (limited to 'config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove')
-rwxr-xr-xconfig/chroot_local-includes/usr/local/sbin/tails-additional-software-remove18
1 files changed, 18 insertions, 0 deletions
diff --git a/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove b/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
new file mode 100755
index 0000000..a97bf1b
--- /dev/null
+++ b/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
@@ -0,0 +1,18 @@
+#!/usr/bin/python3
+
+import sys
+
+from tailslib.additionalsoftware.config import (
+ remove_additional_packages,
+ get_additional_packages)
+
+if len(sys.argv) != 2:
+ sys.exit(2)
+
+old_package = str(sys.argv[1])
+
+additional_packages = get_additional_packages(search_new_persistence=True)
+if old_package in additional_packages:
+ remove_additional_packages({old_package}, search_new_persistence=True)
+else:
+ sys.exit(1)