fix cave-stat

update ebuild deps
This commit is contained in:
Martinez 2016-06-11 22:35:03 +02:00
parent 763313adad
commit b728dde98d
2 changed files with 18 additions and 7 deletions

View file

@ -9,11 +9,17 @@ def cave_stat():
cmdline = proc.cmdline() cmdline = proc.cmdline()
if "--x-of-y" in cmdline: if "--x-of-y" in cmdline:
position = cmdline[-1] position = [c for c in cmdline if " of " in c][0]
dest_idx = cmdline.index("--destination")
atom = cmdline[dest_idx - 1]
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__": if __name__ == "__main__":
for state in cave_stat(): for state in cave_stat():

View file

@ -15,7 +15,10 @@ EGIT_REPO_URI="https://git.covalent.cz/overwatch/over-prompt.git"
LICENSE="AOJSL" LICENSE="AOJSL"
SLOT="0" SLOT="0"
KEYWORDS="x86 amd64" KEYWORDS="x86 amd64"
IUSE="+dotfiles" IUSE="+dotfiles +tools"
RDEPEND="
tools? ( dev-python/psutil )"
src_compile() { src_compile() {
ewarn "This is a prototype written in Python. Expect lower performance." ewarn "This is a prototype written in Python. Expect lower performance."
@ -23,8 +26,10 @@ src_compile() {
} }
src_install() { src_install() {
dobin bin/cave-rdep if use tools; then
dobin bin/cave-stat dobin bin/cave-rdep
dobin bin/cave-stat
fi
insopts -m755 insopts -m755