From 922813b7646964cd31fe79b476ee0f88be6349e2 Mon Sep 17 00:00:00 2001 From: Martin Sekera Date: Wed, 1 Apr 2020 22:09:43 +0200 Subject: [PATCH] remove Paludis-related scripts --- bin/cave-stat | 44 ------------------------------------------ bin/sc-0-sync | 4 ---- bin/sc-01-sync-resolve | 3 --- bin/sc-1-resolve | 3 --- bin/sc-2-cleanup | 15 -------------- bin/sc-3-regen | 5 ----- 6 files changed, 74 deletions(-) delete mode 100755 bin/cave-stat delete mode 100755 bin/sc-0-sync delete mode 100755 bin/sc-01-sync-resolve delete mode 100755 bin/sc-1-resolve delete mode 100755 bin/sc-2-cleanup delete mode 100755 bin/sc-3-regen diff --git a/bin/cave-stat b/bin/cave-stat deleted file mode 100755 index e3d2e58..0000000 --- a/bin/cave-stat +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env python3 -# encoding: utf-8 - -import over -import psutil -import re - -def safe_int(s): - try: - return int(s) - except: - return 0 - -def cave_stat(): - for proc in psutil.process_iter(): - if proc.name() == "cave": - cmdline = proc.cmdline() - - if "--x-of-y" in cmdline: - position = [c for c in cmdline if " of " in c][0] - pos, total, failed = [safe_int(a) for a in re.findall("(\d+) of (\d+)(?:, (\d+) failed)?", position)[0]] - done = pos - 1 - - if "--destination" in cmdline: - action = "Installing" - atom_idx = cmdline.index("--destination") - 1 - atom = cmdline[atom_idx] - else: - action = "Downloading" - atom = [c for c in cmdline if "::" in c and c[0] == "="][0] - - lines = [ - "**<.> %s %s<.>" %(action, atom), - " - %s of %s done<.> (%.01f %% remaining)" %(done, total, 100 - 100 * int(done) / int(total)) - ] - - if failed: - lines.append(" - %d failed<.> (%.01f %% failure rate)" %(failed, 100 * failed / total)) - - yield over.text.render("\n".join(lines)) - -if __name__ == "__main__": - for state in cave_stat(): - print(state) diff --git a/bin/sc-0-sync b/bin/sc-0-sync deleted file mode 100755 index 0f51091..0000000 --- a/bin/sc-0-sync +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/zsh - -cave sync -time cave manage-search-index -c /var/db/paludis/search.idx diff --git a/bin/sc-01-sync-resolve b/bin/sc-01-sync-resolve deleted file mode 100755 index 2a5cee2..0000000 --- a/bin/sc-01-sync-resolve +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/zsh - -sc-0-sync && sc-1-resolve diff --git a/bin/sc-1-resolve b/bin/sc-1-resolve deleted file mode 100755 index f323acb..0000000 --- a/bin/sc-1-resolve +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/zsh - -cave resolve --complete --slots installed-or-best --recommendations display world $@ diff --git a/bin/sc-2-cleanup b/bin/sc-2-cleanup deleted file mode 100755 index 3e2fe67..0000000 --- a/bin/sc-2-cleanup +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/zsh - -setopt EXTENDED_GLOB - -cave purge --complete - -echo -n '>>> Type "yes" to do the above. ' -read Q - -if [[ $Q == "yes" ]]; then - echo ">>> Aight." - cave purge --complete -x -fi - -cave fix-linkage ${1} diff --git a/bin/sc-3-regen b/bin/sc-3-regen deleted file mode 100755 index f147dae..0000000 --- a/bin/sc-3-regen +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/zsh - -cave fix-cache -#prelink -amR # this makes Paludis leave old binaries and libraries around because it thinks they've been modified -updatedb