Lines 889-895
Link Here
|
889 |
match_depend[x+"/"+dep] = match.groups() |
889 |
match_depend[x+"/"+dep] = match.groups() |
890 |
|
890 |
|
891 |
if match_depend.has_key(x+"/"+dep): |
891 |
if match_depend.has_key(x+"/"+dep): |
892 |
print turquoise("*"), white(x+"/"+dep) |
892 |
|
|
|
893 |
package = x+"/"+portage.pkgsplit(dep)[0] |
894 |
state = [] |
895 |
color = green |
896 |
unstable = 0 |
897 |
overlay = "" |
898 |
tag = "-" |
899 |
|
900 |
# check if masked |
901 |
if not portage.portdb.visible([x+"/"+dep]): |
902 |
state.append(red("M")) |
903 |
color = red |
904 |
tag = "M" |
905 |
else: |
906 |
state.append(" ") |
907 |
|
908 |
# check if in unstable |
909 |
try: |
910 |
ver_keywords = portage.db["/"]["porttree"].dbapi.aux_get(x+"/"+dep,["KEYWORDS"]) |
911 |
except KeyError: |
912 |
ver_keywords = [""] |
913 |
keywords_list = ver_keywords[0].split() |
914 |
|
915 |
if "~" + portage.settings["ARCH"] in keywords_list: |
916 |
state.append(yellow("~")) |
917 |
if color != red: |
918 |
color = yellow |
919 |
tag = "~" |
920 |
unstable = 1 |
921 |
else: |
922 |
state.append(" ") |
923 |
|
924 |
# check if installed |
925 |
if portage.dblink(x,dep,"/").exists(): |
926 |
state.append(turquoise("I")) |
927 |
color = turquoise |
928 |
tag = "*" |
929 |
else: |
930 |
state.append(" ") |
931 |
# check if another version is installed |
932 |
latest_package = portage.db["/"]["vartree"].dep_bestmatch(package) |
933 |
if len(latest_package) > 0: |
934 |
# compare versions |
935 |
if pkgcmp(x+"/"+dep, latest_package) < 0: |
936 |
tag = "<" |
937 |
else: |
938 |
tag = ">" |
939 |
|
940 |
# check if this is an OVERLAY ebuild |
941 |
try: |
942 |
if portage.portdb.oroot: |
943 |
if os.path.exists(portage.portdb.oroot + "/" + package + "/" + dep + ".ebuild"): |
944 |
overlay = " OVERLAY" |
945 |
except AttributeError: |
946 |
pass |
947 |
|
948 |
# print |
949 |
try: |
950 |
slot = portage.db["/"]["porttree"].dbapi.aux_get(x+"/"+dep,["SLOT"]) |
951 |
if not slot: |
952 |
slot = ["0"] |
953 |
except KeyError: |
954 |
slot = ["?"] |
955 |
|
956 |
print color(tag) + " " + "[" + string.join(state,"") + "] " + color(x+"/"+dep) + " (" + color(slot[0]) + ")" + overlay |
893 |
for line in match_depend[x+"/"+dep]: |
957 |
for line in match_depend[x+"/"+dep]: |
894 |
print " " + line |
958 |
print " " + line |
895 |
|
959 |
|