Created attachment 460450 [details] package.use directory files qt5.use causing the failure .. annotated My qt5.use flag package.use directory file scan by portpeek fails unless the line with leading <= are commented out.. i also tried using just < but that also fails .. qt5.use file is attached command used to determine problem portpeek -d -s -r package.use: parse_package_use: Line: dev-python/PyQt5 printsupport webkit network widgets gui ENTERED check_useflags_all_versions: dev-python/PyQt5 check_useflags_all_versions: package: dev-python/PyQt5-5.7.1 use found doc use found sql use found widgets use found opengl use found dbus use found designer use found positioning use found python_targets_python3_4 use found sensors use found location use found serialport use found examples use found python_targets_python2_7 use found testlib use found python_targets_python3_5 use found gui use found declarative use found help use found xmlpatterns use found multimedia use found debug use found bluetooth use found x11extras use found webengine use found gles2 use found webkit use found network use found websockets use found printsupport use found svg use found webchannel iuse_item is abi_x86_64 iuse_item is amd64 iuse_item is bluetooth iuse_item is dbus iuse_item is elibc_glibc iuse_item is gui iuse_item is kernel_linux iuse_item is network iuse_item is opengl iuse_item is printsupport iuse_item is python_targets_python2_7 iuse_item is python_targets_python3_5 iuse_item is svg iuse_item is userland_GNU iuse_item is webkit iuse_item is widgets iuse_item is doc iuse_item is sql iuse_item is widgets iuse_item is opengl iuse_item is dbus iuse_item is designer iuse_item is positioning iuse_item is python_targets_python3_4 iuse_item is sensors iuse_item is location iuse_item is serialport iuse_item is examples iuse_item is python_targets_python2_7 iuse_item is testlib iuse_item is python_targets_python3_5 iuse_item is gui iuse_item is declarative iuse_item is help iuse_item is xmlpatterns iuse_item is multimedia iuse_item is debug iuse_item is bluetooth iuse_item is x11extras iuse_item is webengine iuse_item is gles2 iuse_item is webkit iuse_item is network iuse_item is websockets iuse_item is printsupport iuse_item is svg iuse_item is webchannel package_string is dev-python/PyQt5 found valid flag: printsupport found valid flag: webkit found valid flag: network found valid flag: widgets found valid flag: gui parse_package_use: Line: >=dev-qt/qtwebkit-5.3.2-r1 printsupport parse_package_use: Line: >=dev-libs/libpcre-8.36 pcre16 parse_package_use: Line: >=dev-qt/qtcore-5.3.2 icu check_useflags: package: dev-qt/qtcore-5.7.1 package_string is >=dev-qt/qtcore-5.3.2 parse_package_use: Line: <=dev-qt/qtopengl-4.9.99 qt3support Traceback (most recent call last): File "/usr/lib/python-exec/python3.5/portpeek", line 1524, in <module> get_recursive_info(USER_CONFIG_PATH + "/package.use") File "/usr/lib/python-exec/python3.5/portpeek", line 431, in get_recursive_info get_recursive_info(filename+os.path.sep+file_name) File "/usr/lib/python-exec/python3.5/portpeek", line 433, in get_recursive_info get_info(filename) File "/usr/lib/python-exec/python3.5/portpeek", line 459, in get_info diffs_found = parse_package_use(line,filename) File "/usr/lib/python-exec/python3.5/portpeek", line 555, in parse_package_use if (pkgcmp(pkgsplit(check_pkg),pkgsplit(str(current_package.cpv))) == 1) or \ File "/usr/lib64/python3.5/site-packages/portage/versions.py", line 293, in pkgcmp if pkg1[0] != pkg2[0]: TypeError: 'NoneType' object is not subscriptable .. commenting out the offending entries allows normal processing..
Comment on attachment 460450 [details] package.use directory files qt5.use causing the failure .. annotated the reason the following lines were added was the previous entries caused portpeek to complain that qtcore:5 etc did not support the qt3support flag so I switched the original logic to exclude qt5 versions .. this then failed to process .. <=dev-qt/qtopengl-4.9.99 qt3support <=dev-qt/qtsql-4.9.99 qt3support <=dev-qt/qtgui-4.9.99 qt3support <=dev-qt/qtdeclarative-4.9.99 qt3support <=dev-qt/qtcore-4.9.99 qt3support it also failed on the final entry
Did some digging and it looks like the breakage is a result of a change in /usr/lib/python-exec/python2.7/portpeek, specifically the following lines (504-512) being commented out when compared to app-portage/portpeek-2.1.18: #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:] After uncommenting these lines app-portage/portpeek-2.1.21 is once again able to check package.use files with <, >, etc.
Created attachment 460840 [details, diff] restore commented 2.1.18 code
Thanks for reporting. I will take a look and try to first figure out if there was a reason I commented those lines out.
Please test the fix when it shows up in your local portage tree onces the mirrors sync. commit bfb2977fac173e845f32a048b3b982504f598489 Author: Mike Pagano <mpagano@gentoo.org> Date: Wed Jan 25 18:22:58 2017 -0500 app-portage/portpeek: Fix for bug #606092, thanks to Derk for reporting and BobbyK for the analysis. Package-Manager: portage-2.3.3
app-portage/portpeek-2.1.22 installed and works for me. On the fix, it may be that: # if check_pkg[0] == '<': # less_than = True; # if check_pkg[1] == '=': # less_than_or_equal = True could remain commented out, the 'less_than" and 'less_than_or_equal' variables don't seem to be used. The magic appears to be: check_pkg = check_pkg[1:] if check_pkg[0] in atom_check: check_pkg = check_pkg[1:] removing leading modifier characters, so that check_pkg is left as an atom when used in comparisons later on. Thanks for the quick turnaround Mike. And thanks grknight for your assistance in #gentoo.
Thanks for checking I will check that and remove it for the next release.