package_class.add_version(version, emerge_time, start_time)
+def search_log_for_all_packages():
+ """Goes through the emerge.log and lists all packages in there"""
+
+ log = open_log()
+
+ all_packages = []
+
+ for line in log:
+ if ((">>>" in line) and ("emerge" in line)):
+ pack = line.partition(')')[2].strip().partition(' ')[0]
+ start_time = float(line.partition(':')[0])
+
+ all_packages.append((pack, start_time))
+
+ elif ((":::" in line) and ("completed emerge" in line)):
+ for p in all_packages:
+ if p[0] in line:
+ stop_time = float(line.partition(':')[0])
+
+ print("\t" + give_date(p[1]) + " >>> " + green_start + p[0] + color_stop)
+
+ all_packages.pop(all_packages.index(p))
def get_package(name):
Options:
\t-c, --current \t Show time until currently compiling package finishes
\t-p, --pretended Calculate compile time from piped 'emerge -p' output
+\t-l, --list \t List all emerged packages
\t-h, --help \t Show this helpscreen
\t-q, --quiet \t Be less verbose
\t--no-color \t Use colorless output
if arg == "-h" or arg == "--help":
usage()
+ if arg == "-l" or arg == "--list":
+ search_log_for_all_packages()
+ sys.exit(1)
+
if arg == "-q" or arg == "--quiet":
QUIET = True