Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 584242 - net-misc/electrum-2.6.4: "KeyError: '$XDG_DATA_HOME'" while building
Summary: net-misc/electrum-2.6.4: "KeyError: '$XDG_DATA_HOME'" while building
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on: 499288
Blocks:
  Show dependency tree
 
Reported: 2016-05-26 18:14 UTC by Sergey 'L29Ah' Alirzaev
Modified: 2018-06-24 13:49 UTC (History)
5 users (show)

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


Attachments
ebuild test run (file_584242.txt,38.47 KB, text/plain)
2016-06-03 08:08 UTC, Michael 'veremitz' Everitt
Details
emerge --info (file_584242.txt,5.41 KB, text/plain)
2016-06-08 09:17 UTC, Sergey 'L29Ah' Alirzaev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 'L29Ah' Alirzaev 2016-05-26 18:14:24 UTC
>>> Starting src_compile
 * python2_7: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python2.7 setup.py build
Traceback (most recent call last):
  File "setup.py", line 27, in <module>
    usr_share = os.environ['$XDG_DATA_HOME']
  File "/usr/lib64/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: '$XDG_DATA_HOME'
Comment 1 Michael 'veremitz' Everitt 2016-06-03 08:08:16 UTC
Created attachment 436256 [details]
ebuild test run

Please post the output of 'emerge --info', preferably as an attachment. This doesn't seem to occur when I do a test run (see attached).
Comment 2 Sergey 'L29Ah' Alirzaev 2016-06-08 09:17:15 UTC
Created attachment 436854 [details]
emerge --info
Comment 3 Sergey 'L29Ah' Alirzaev 2016-06-12 21:33:04 UTC
worky if `unset XDG_DATA_HOME` first
Comment 4 Maks Verver 2016-06-18 15:49:10 UTC
Seems like an obvious typo in the setup script. I suggested a fix upstream: https://github.com/spesmilo/electrum/pull/1838/files

In the meantime, we can either patch this locally, or better yet, unset XDG_DATA_HOME in the ebuild (because the build shouldn't depend on the user's data directory in the first place).
Comment 5 Francesco Turco 2016-08-24 13:15:47 UTC
If I apply the github upstream fix then electrum's .desktop file will be installed in /var/tmp/portage/net-misc/electrum-2.6.4/homedir/.local/share/applications/electrum.desktop, which is wrong.
Comment 6 zlg (RETIRED) gentoo-dev 2016-08-25 09:40:19 UTC
I ran with this src_compile and it seems to work now:

src_compile() {
    unset XDG_DATA_HOME
    default
}
Comment 7 Ad-min 2016-09-21 18:02:47 UTC
This bug still exists on ~amd64.
Comment 8 bugs 2016-12-27 17:51:39 UTC
the workaround of modifying the ebuild worked for me. thanks.  Needed ~x86 since current "stable" gentoo is too out of date to actually perform transactions.
Comment 9 Pacho Ramos gentoo-dev 2018-06-24 09:48:50 UTC
master 92ed6f4d8a72] net-misc/electrum: Run xdg_environment_reset (#584242)
 1 file changed, 1 insertion(+)