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()
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():