Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679966 - app-portage/porthole - USE flags disappear when you choose USE flag
Summary: app-portage/porthole - USE flags disappear when you choose USE flag
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2020-03-18
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2019-03-10 18:46 UTC by ehrich.weiss
Modified: 2020-03-19 07:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Porthole package before adding use flag (Screenshot_20190310_150823.png,58.49 KB, image/png)
2019-03-10 19:11 UTC, ehrich.weiss
Details
Porthole package after adding use flag (Screenshot_20190310_150906.png,57.14 KB, image/png)
2019-03-10 19:11 UTC, ehrich.weiss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ehrich.weiss 2019-03-10 18:46:27 UTC
This happened on 2 machines after an emerge @world a couple months ago. 

If I use porthole, and select a package, if it has any use flags set in package.use, there will be a blank panel for the use flags in the Advanced Emerge dialog. That said, something else is happening beyond that because I have no use flags set for alsa-plugins but its panel shows blank as well. I'm sure there are others but that's the latest one I have an example of.

I've checked package.use for invalid characters and haven't found anything. I will note again that this happened after an emerge @world, and I did an emerge -ea @world just in case a package failed in compiling but nothing changed in this regard.

Here's my emerge --info
https://pastebin.com/xaDgmL3V
Comment 1 ehrich.weiss 2019-03-10 19:11:03 UTC
Created attachment 568484 [details]
Porthole package before adding use flag
Comment 2 ehrich.weiss 2019-03-10 19:11:34 UTC
Created attachment 568486 [details]
Porthole package after adding use flag
Comment 3 ehrich.weiss 2019-11-10 19:09:57 UTC
This is still happening and it's happening on 2 systems now. I'm having a harder and harder time working with porthole at all(and kuroo crashes far too often for me to use with any regularity). Any hints as to what I could use to debug this would be greatly appreciated.
Comment 4 ehrich.weiss 2019-12-15 19:00:55 UTC
I think I have solved the problem. 

Several years ago I was trying to cross-compile for the AVR and other things and in order to do so portage, at the time, required you to put your package.use, package.mask, etc. into folders of the same name. So my package.use folder was actually in /etc/portage/package.use/package.use, and so on for the others. Today I renamed the package.use folder and copied the package.use file into /etc/portage and I seem to have my use flags back.  I don't remember reading to change everything back, and actually thought the folder system was the path forward regardless of whether you were cross-compiling but apparently all that changed and I didn't pay attention somewhere. 

I'm going to continue testing but for the moment you can consider this bug closed.
Comment 5 ehrich.weiss 2019-12-17 22:58:39 UTC
Unfortunately after more testing, the problem still exists.
Comment 6 ehrich.weiss 2019-12-18 20:02:50 UTC
When I run porthole from commandline and add USE flags via Advanced Emerge, I get the following error. Hopefully this helps someone.


 File "/usr/lib64/python2.7/site-packages/porthole/advancedemerge/advemerge.py", line 228, in version_changed
    self.build_use_flag_widget(verInfo["use_flags"], verInfo["name"])
  File "/usr/lib64/python2.7/site-packages/porthole/advancedemerge/advemerge.py", line 621, in build_use_flag_widget
    ebuild_use_flags = get_reduced_flags(ebuild)
  File "/usr/lib64/python2.7/site-packages/porthole/backends/utilities.py", line 166, in get_reduced_flags
    package_use_flags = USERCONFIGS.get_user_config('USE', ebuild=ebuild)
  File "/usr/lib64/python2.7/site-packages/porthole/db/user_configs.py", line 268, in get_user_config
    match = portage_lib.xmatch('match-list', acpv, mylist=[ebuild])
  File "/usr/lib64/python2.7/site-packages/porthole/backends/portagelib.py", line 328, in xmatch
    results  =  settings.portdb.xmatch(*args, **kwargs)[:] # make a copy.  needed for <portage-svn-r5382
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/porttree.py", line 1093, in xmatch
    self.async_xmatch(level, origdep, loop=loop))
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 833, in run_until_complete
    return future.result()
  File "/usr/lib64/python2.7/site-packages/portage/util/futures/futures.py", line 131, in result
    raise self._exception
AssertionError: Invalid level argument: 'match-list'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/porthole/advancedemerge/advemerge.py", line 271, in on_package_use_commit
    remove=removelist, callback=self.reload, parent_window = self.window )
  File "/usr/lib64/python2.7/site-packages/porthole/db/user_configs.py", line 369, in set_user_config
    self.set_config_callback()
  File "/usr/lib64/python2.7/site-packages/porthole/db/user_configs.py", line 413, in set_config_callback
    self.set_callback()
  File "/usr/lib64/python2.7/site-packages/porthole/advancedemerge/advemerge.py", line 361, in reload
    self.display_emerge_command()
  File "/usr/lib64/python2.7/site-packages/porthole/advancedemerge/advemerge.py", line 566, in display_emerge_command
    command = self.get_command()
  File "/usr/lib64/python2.7/site-packages/porthole/advancedemerge/advemerge.py", line 526, in get_command
    use_flags = self.get_use_flags(verInfo["name"])
  File "/usr/lib64/python2.7/site-packages/porthole/advancedemerge/advemerge.py", line 457, in get_use_flags
    ebuild_use_flags = get_reduced_flags(ebuild)
  File "/usr/lib64/python2.7/site-packages/porthole/backends/utilities.py", line 166, in get_reduced_flags
    package_use_flags = USERCONFIGS.get_user_config('USE', ebuild=ebuild)
  File "/usr/lib64/python2.7/site-packages/porthole/db/user_configs.py", line 268, in get_user_config
    match = portage_lib.xmatch('match-list', acpv, mylist=[ebuild])
  File "/usr/lib64/python2.7/site-packages/porthole/backends/portagelib.py", line 328, in xmatch
    results  =  settings.portdb.xmatch(*args, **kwargs)[:] # make a copy.  needed for <portage-svn-r5382
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/porttree.py", line 1093, in xmatch
    self.async_xmatch(level, origdep, loop=loop))
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 833, in run_until_complete
    return future.result()
  File "/usr/lib64/python2.7/site-packages/portage/util/futures/futures.py", line 131, in result
    raise self._exception
AssertionError: Invalid level argument: 'match-list'
Comment 7 ehrich.weiss 2019-12-18 20:04:58 UTC
BTW, bug confirmed and discussed here..

https://sourceforge.net/p/porthole/bugs/153/
Comment 8 ehrich.weiss 2019-12-18 20:15:00 UTC
I'm going to confirm that the solution mentioned on the sourceforge link does indeed fix my problem. Please someone merge this.
Comment 9 Zac Medico gentoo-dev 2019-12-18 21:15:29 UTC
(In reply to ehrich.weiss from comment #8)
> I'm going to confirm that the solution mentioned on the sourceforge link
> does indeed fix my problem. Please someone merge this.

Unfortunately, https://github.com/schiffsratte/Porthole does not contain any of the history from the https://sourceforge.net/p/porthole/code/ci/master/tree/ git repository, so it's not easy to see what the differences should be.
Comment 10 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2020-03-19 07:43:14 UTC
Removed.