diff --git a/bin/cave-stat b/bin/cave-stat index 3cfeaab..717099e 100755 --- a/bin/cave-stat +++ b/bin/cave-stat @@ -9,11 +9,17 @@ def cave_stat(): cmdline = proc.cmdline() if "--x-of-y" in cmdline: - position = cmdline[-1] - dest_idx = cmdline.index("--destination") - atom = cmdline[dest_idx - 1] + position = [c for c in cmdline if " of " in c][0] - yield "Installing %s (%s)" %(atom, position) + 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] + + yield "%s %s (%s)" %(action, atom, position) if __name__ == "__main__": for state in cave_stat(): diff --git a/ebuild/over-prompt-9999.ebuild b/ebuild/over-prompt-9999.ebuild index ca878ee..8945424 100644 --- a/ebuild/over-prompt-9999.ebuild +++ b/ebuild/over-prompt-9999.ebuild @@ -15,7 +15,10 @@ EGIT_REPO_URI="https://git.covalent.cz/overwatch/over-prompt.git" LICENSE="AOJSL" SLOT="0" KEYWORDS="x86 amd64" -IUSE="+dotfiles" +IUSE="+dotfiles +tools" + +RDEPEND=" + tools? ( dev-python/psutil )" src_compile() { ewarn "This is a prototype written in Python. Expect lower performance." @@ -23,8 +26,10 @@ src_compile() { } src_install() { - dobin bin/cave-rdep - dobin bin/cave-stat + if use tools; then + dobin bin/cave-rdep + dobin bin/cave-stat + fi insopts -m755