@m40601 Thanks for reporting the bug and thanks for confirming that offpunk
works as expected!
Search Criteria
Package Details: offpunk-git 5:2.4.r11.g6d897bf-2
Package Actions
Git Clone URL: | https://aur.archlinux.org/offpunk-git.git (read-only, click to copy) |
---|---|
Package Base: | offpunk-git |
Description: | Fork of the command-line Gemini client AV-98 with added offline capabilities (latest commit) |
Upstream URL: | https://git.sr.ht/~lioploum/offpunk |
Keywords: | av98 cli gemini |
Licenses: | AGPL-3.0-or-later |
Conflicts: | offpunk |
Provides: | offpunk |
Submitter: | kseistrup |
Maintainer: | kseistrup |
Last Packager: | kseistrup |
Votes: | 8 |
Popularity: | 0.97 |
First Submitted: | 2022-01-01 08:55 (UTC) |
Last Updated: | 2024-12-23 09:09 (UTC) |
Dependencies (24)
- file (file-gitAUR)
- less (less-gitAUR)
- python (python37AUR, python311AUR, python310AUR)
- python-beautifulsoup4
- python-chardet
- python-cryptography
- python-feedparser
- python-lxml-html-clean
- python-pillow
- python-readability-lxml (python-readability-lxml-gitAUR)
- python-requests
- python-setproctitle
- coreutils (coreutils-gitAUR, busybox-coreutilsAUR, coreutils-hybrid-gitAUR, coreutils-selinuxAUR, coreutils-uutilsAUR, coreutils-hybridAUR) (make)
- git (git-gitAUR, git-glAUR) (make)
- python-build (make)
- python-hatchling (python-hatchling-gitAUR) (make)
- python-installer (python-installer-gitAUR) (make)
- python-wheel (make)
- chafa (chafa-gitAUR) (optional) – chafa and ansiwrap are required to render images in terminal
- timgAUR (timg-gitAUR) (optional) – view images and videos in the terminal
- wl-clipboard (wl-clipboard-gitAUR, wl-clipboard-rs-gitAUR, wl-clipboard-rsAUR) (optional) – copies text to the Wayland clipboard
- xclip (wl-clipboard-x11AUR, xclip-gitAUR) (optional) – copies text to the X11 clipboard
- xdg-utils (busking-gitAUR, xdg-utils-slockAUR, mimiAUR, mimi-gitAUR, xdg-utils-handlrAUR, openerAUR, xdg-utils-mimeoAUR, mimejs-gitAUR) (optional) – xdg-open opens a URL in the preferred application
- xsel (xsel-gitAUR, wl-clipboard-x11AUR) (optional) – copies text to the X11 clipboard
Required by (0)
Sources (1)
kseistrup commented on 2022-02-01 14:21 (UTC)
m040601 commented on 2022-02-01 13:59 (UTC)
The problem with the incompatible ‘xdg’ modules should be resolved now. Please test.
Wow, that was fast, :-) ...
I tested, and can confirm it is working fine now. Offpunk seem to be creating and making use of the "correct" xdg folders:
- ~/.local/share/offpunk/, for lists, history etc
- ~/.config/offpunk/, for tofu, certificates, etc
- ~/.cache/offpunk/, for cache stuff
It doesnt create any ~/.offpunkt folder anymore.
Superb work kseistrup reporting this to ploum. Thanks for your effort and commitment.
kseistrup commented on 2022-02-01 11:51 (UTC)
The problem with the incompatible ‘xdg’ modules should be resolved now. Please test.
kseistrup commented on 2022-02-01 08:02 (UTC)
@m040601, I have filed an issue over at the source repo: https://tildegit.org/ploum/AV-98-offline/issues/6
kseistrup commented on 2022-02-01 06:41 (UTC)
@m040601 Thanks for reporting this. I missed the dependency of xdg
, sorry for that.
It is an unfortunate situation. We have two conflicting packages here:
extra/python-pyxdg 0.27-4
aur/python-xdg 5.1.1
The both install as xdg
, but their APIs are different and incompatible, and unfortunately the author of offpunk
has decided to go with the latter. It is not the first package I have encountered that depended on python-xdg
. It's a “What do you want the most” situation.
I don't think there's much I can do other that to update PKGBUILD
with the dependency on python-xdg
. We could also try to convince the author to use the python-pyxdg
module instead.
Meanwhile, I will probably install offpunk
in a virtual environment, but that's not an ideal situation.
If anyone has suggestions, please step forward.
PS: Another unfortunate thing is that the xdg
dependency is optional in offpunk
. If xdg
is not found, offpunk
will work around it. I suppose I could create a diff that edited offpunk
such that it will always use the workaround. I'll have to look into it later.
Meanwhile, you could edit /usr/lib/python3.10/sitepackages/offpunk.py
around line 87:
85 ## Config directories
86 try:
87 import xdg
88 _CACHE_PATH = os.path.join(xdg.xdg_cache_home().resolve(), "offpunk/")
such that python cannot find the module, e.g.:
87 import ZZZxdg
m040601 commented on 2022-02-01 05:12 (UTC) (edited on 2022-02-01 05:27 (UTC) by m040601)
Further investigation discovered that "offpunk-git" clashes with "python-pyxdg".
python-pyxdg is an official Arch package. It is not an AUR thingy. It is a dependency required by other important official packages like khal (calendars) etc. See them all here, https://archlinux.org/packages/extra/any/python-pyxdg/
pacman -Si python-pyxdg
Repository : extra
Name : python-pyxdg
Version : 0.27-4
Description : Python library to access freedesktop.org standards
Architecture : any
URL : http://freedesktop.org/Software/pyxdg
Licenses : LGPL
Groups : None
Provides : python-xdg
Depends On : python
Optional Deps : None
Conflicts With : python-xdg
Replaces : python-xdg<0.26-5
Download Size : 78.76 KiB
Installed Size : 390.22 KiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Wed 01 Dec 2021 09:49:26 PM WET
Validated By : MD5 Sum SHA-256 Sum Signature
pacman -Ql python-pyxdg
python-pyxdg /usr/
python-pyxdg /usr/lib/
python-pyxdg /usr/lib/python3.10/
python-pyxdg /usr/lib/python3.10/site-packages/
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/PKG-INFO
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/SOURCES.txt
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/dependency_links.txt
python-pyxdg /usr/lib/python3.10/site-packages/pyxdg-0.27-py3.10.egg-info/top_level.txt
python-pyxdg /usr/lib/python3.10/site-packages/xdg/
python-pyxdg /usr/lib/python3.10/site-packages/xdg/BaseDirectory.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Config.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/DesktopEntry.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Exceptions.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/IconTheme.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/IniFile.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Locale.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Menu.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/MenuEditor.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/Mime.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/RecentFiles.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__init__.py
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__pycache__/
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__pycache__/BaseDirectory.cpython-310.opt-1.pyc
.... lotz of stuff ...
python-pyxdg /usr/lib/python3.10/site-packages/xdg/__pycache__/util.cpython-310.pyc
python-pyxdg /usr/lib/python3.10/site-packages/xdg/util.py
If one experiments removing "python-pyxdg" (and packages that need it) from the system, then offpunk starts.
Still, I'm not sure if this should be counted as a bug in offpunk itself. Or some change that should be made to the PKGBUILD. Please advise.
m040601 commented on 2022-02-01 04:17 (UTC)
For a couple of days now (4? 5?), I can't start offpunk. Getting this error message:
Traceback (most recent call last):
File "/usr/bin/offpunk", line 33, in <module>
sys.exit(load_entry_point('offpunk==0.2', 'console_scripts', 'offpunk')())
File "/usr/bin/offpunk", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/offpunk.py", line 88, in <module>
_CACHE_PATH = os.path.join(xdg.xdg_cache_home().resolve(), "offpunk/")
AttributeError: module 'xdg' has no attribute 'xdg_cache_home'
Already tried to make sure to restart by completely deleting any folders or files containing "offpunk" or "av-98" in:
-
rm -rf ~/.cache/offpunk
-
rm -rf ~/.cache/av-98
-
rm -rf ~/.local/share/offpunk
-
rm -rf ~/.local/share/av-98
-
rm -rf ~/.config/offpunk
-
rm -rf ~/.config/av-98
Still the same error message. As I am not a programmer and dont understand python, I'm not sure if this is a problem with this PKGBUILD or with the upstream git development.
Do you have any advice before I report it upstream to the developer ?
kseistrup commented on 2022-01-05 06:07 (UTC)
@m040601, thanks for reporting this.
I believe your problem is caused because the offpunk stuff was installed through the av-98-offline
package while that package was still broken — i.e., after upstream had renamed everything.
The av-98-offline
package is in the process of being merged into offpunk-git
. When it will happen is beyond my control, but I suggest you remove the av-98-offline
package and install offpunk-git
instead. Meanwhile, I can upload a new PKGBUILD
that makes offline-git
conflict with av-09-offline
.
Cheers.
m040601 commented on 2022-01-04 22:37 (UTC) (edited on 2022-01-04 22:38 (UTC) by m040601)
Thanks for making these PKGBUILDS. Really interesting stuff for gemini and offline.
Probably needs some cleanup and a "conflicts" tag (with av-98/offline) in the PKGBUILD. Or just remove the "av-98-offline" from the AUR. Not 100% sure what the plans of the upstream github author are.
I got this trying to install "offpunk-git"
error: failed to commit transaction (conflicting files)
offpunk-git: /usr/bin/offpunk exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/__pycache__/offpunk.cpython-310.opt-1.pyc exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/__pycache__/offpunk.cpython-310.pyc exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/offpunk-0.1-py3.10.egg-info/PKG-INFO exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/offpunk-0.1-py3.10.egg-info/SOURCES.txt exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/offpunk-0.1-py3.10.egg-info/dependency_links.txt exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/offpunk-0.1-py3.10.egg-info/entry_points.txt exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/offpunk-0.1-py3.10.egg-info/top_level.txt exists in filesystem (owned by av-98-offline)
offpunk-git: /usr/lib/python3.10/site-packages/offpunk.py exists in filesystem (owned by av-98-offline)
Errors occurred, no packages were upgraded.
-> exit status 1
Then I "pacman -Rns av-98-offline" and everything went clean.
kseistrup commented on 2022-01-01 09:00 (UTC)
Please notice that upstream has changed its name to offpunk
. The active repo for this package is now offpunk-git
.
Pinned Comments