__author__ = "Michael Pagano"
__email__ = "mpagano@gentoo.org"
-__version__ = "2.1.13"
+__version__ = "2.1.14"
__productname__ = "portpeek"
__description__ = "Displays user unmasked ebuilds and installable options from the portage tree"
diffs_found = False
package_installed = False
fields = line.replace("\t", " ").split(" ")
+ less_than = False
+ less_than_or_equal = False
if len(fields) > 0:
check_pkg = fields[0] # this could be one of <>=
if check_pkg[0] not in atom_check:
has_atom = False
else:
+ if check_pkg[0] == '<':
+ less_than = True;
+ if check_pkg[1] == '=':
+ less_than_or_equal = True
+
check_pkg = check_pkg[1:]
if check_pkg[0] in atom_check:
check_pkg = check_pkg[1:]
if current_package.is_installed():
check_useflags(current_package,line)
return False
+
+ if ((orig_pkg_name.find("<=") >=0) or (orig_pkg_name.find("<")>=0) or (orig_pkg_name.find(">=") >=0) or (orig_pkg_name.find(">") >=0)):
+ query = Query(check_pkg)
+ pkgs = []
+ try:
+ pkgs = query.smart_find(True,True,True,True,False,True)
+ except errors.GentoolkitException as err:
+ print_output(debug,portage.output.blue("parse_package_use: Package " + check_pkg + " not found."))
+ return False
+
+ if (pkgs != None):
+ pkg_length = len(pkgs)
+ for current_package in pkgs:
+ # on wildcard scenario, return False if one package is installed
+ if (orig_pkg_name.find("<=") >=0):
+ if (pkgcmp(pkgsplit(check_pkg),pkgsplit(str(current_package.cpv))) <= 0):
+ if current_package.is_installed():
+ check_useflags(current_package,line)
+ return False
+ else:
+ if (orig_pkg_name.find("<") >=0):
+ if (pkgcmp(pkgsplit(check_pkg),pkgsplit(str(current_package.cpv))) < 0):
+ if current_package.is_installed():
+ check_useflags(current_package,line)
+ return False
+ if (orig_pkg_name.find(">=") >=0):
+ if (pkgcmp(pkgsplit(check_pkg),pkgsplit(str(current_package.cpv))) == 0) or (pkgcmp(pkgsplit(check_pkg),pkgsplit(str(current_package.cpv))) == 2):
+ if current_package.is_installed():
+ check_useflags(current_package,line)
+ return False
+ else:
+ if (orig_pkg_name.find(">") >=0):
+ if (pkgcmp(pkgsplit(check_pkg),pkgsplit(str(current_package.cpv))) == 2):
+ if current_package.is_installed():
+ check_useflags(current_package,line)
+ return False
else:
# look for any version of check_pkg installed as there is
# no version specified in package.use
if (package_installed == False):
# package does not exists
- print_output(info,portage.output.yellow("\n" + check_pkg + ": ") + portage.output.red("Not Installed"),current_package)
+ print_output(info,portage.output.yellow("\n" + orig_pkg_name + ": ") + portage.output.red(" Not Installed"),current_package)
if "package.keywords" in filename:
stable_list.append(check_pkg)
if "package.accept_keywords" in filename: