Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#64173 - [python-xdg] Incorrect package name

Attached to Project: Arch Linux
Opened by Anton Leontiev (bunder) - Saturday, 19 October 2019, 08:10 GMT
Last edited by freswa (frederik) - Sunday, 13 September 2020, 11:32 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


As official package name is PyXDG [1, 2] is should be named python-pyxdg. Current name conflicts with xdg package [3], which is used by HotDoc [4-6], for example.

This task depends upon

Closed by  freswa (frederik)
Sunday, 13 September 2020, 11:32 GMT
Reason for closing:  Fixed
Comment by XenGi (xengi) - Sunday, 05 April 2020, 15:35 GMT
I'm also hit by this issue. My package virtualfish needs xdg from PyPI, but pyxdg stole the correct package name. Can I help with the fix or is there a time frame when there will be a solution?
Comment by Eli Schwartz (eschwartz) - Sunday, 05 April 2020, 16:24 GMT
I'm not sure what your optimal solution is here.

Keep in mind that since both provide 'import xdg', renaming the package wouldn't let you install both of them.

Also when renaming a repository package, we must add provides/conflicts/replaces which means a new python-xdg package would never be found from the AUR, and if manually installed, would prompt to replace it with the repo package on every singe pacman -Syu.

Fragmentation is fun.
Comment by XenGi (xengi) - Sunday, 05 April 2020, 18:11 GMT
For me the first step would be to rename the package. That way it has at least the correct name.

But your right. There will never be a proper python-xdg package with the xdg module from PyPI. The only thing I can think of is that one could create a python-xdg4 package. My current solution is to put this one-file python module next to the module in virtualfish that tries to import it. It's ugly but it works and the upstream docs for the xdg package even suggests it.
Comment by Eli Schwartz (eschwartz) - Sunday, 05 April 2020, 18:29 GMT
Or people could use the official Freedesktop package, which sort of makes sense since XDG is a bunch of standards, not one, and properly exposes that whereas (developed half a decade later) is just asking for trouble merely by existing.

Once again I say... fragmentation is fun.
Comment by XenGi (xengi) - Sunday, 05 April 2020, 18:51 GMT
Totally agree. Still the package name is definitely wrong because the official xdg package that you mention is called pyxdg on PyPI and not xdg. So the archlinux package should also be called python-pyxdg to minimize confusion.
Comment by Lukas Fleischer (lfleischer) - Sunday, 05 April 2020, 19:14 GMT
I will rename the package later today.
Comment by Eli Schwartz (eschwartz) - Sunday, 05 April 2020, 19:59 GMT
The replaces at least could be versioned, I guess, to only replace python-xdg<0.26-5
Comment by Eli Schwartz (eschwartz) - Sunday, 05 April 2020, 20:02 GMT
Also the new version is live. An AUR package could depend on python-xdg>=4.0 to ensure the "correct" version is installed.