@franz
You could probably somehow solve this (in a clean way) by using a python virtual environment with the right package version of psutil, but I don't know how to do that.
But here's a (somewhat dirty) work around. Downgrade the python-psutil package to the required version:
- Download the package file from the A.L.A. (https://wiki.archlinux.org/title/Arch_Linux_Archive#/packages):
sudo pacman -U https://archive.archlinux.org/packages/p/python-psutil/python-psutil-5.8.0-4-x86_64.pkg.tar.zst
- Downgrade to the required version:
sudo downgrade python-psutil
-
Choose right version
-
Set whether to ingore updates for this package (both options have pros/cons so choose what suits you better)
-
I installed some other packages to satisfy 'pip check', but this is dependant upon your installed packages and might not even be relevant to the Librewolf build
pacman -S python-brotli
pacman -S python-pybcj
pacman -S python-cmd2
- As far as I understood there are many cases in which 'pip check' will complain about python packages that are irrelevant for the build of Firefox/Librewolf, so if the check fails, it's totally unnecessary for the build to stop then. See here : https://bugs.gentoo.org/828604#c5 ... so there was some patch and apparently some code was removed to resolve this ... the code isn't there anymore in the current BUT STILL the pip check runs and complains about some packages ... so I grep'ed through the source for "pip check" and found src/firefox-102.0/python/mach/mach/site.py ... I made a patch to comment the code that raises the failed pip check to an exception ... you can insert the text below in a file called librewolf_mach_site.py_disable_pip-check.patch in your build dir (on my system it is /var/tmp/pamac-build-user/librewolf). The content of the file:
--- a/python/mach/mach/site.py
+++ a/python/mach/mach/site.py
@@ -1118,10 +1118,10 @@
if check_result.returncode:
subprocess.check_call(pip + ["list", "-v"], stdout=sys.stderr)
print(check_result.stdout, file=sys.stderr)
- raise Exception(
- 'According to "pip check", the current Python '
- "environment has package-compatibility issues."
- )
+ #raise Exception(
+ # 'According to "pip check", the current Python '
+ # "environment has package-compatibility issues."
+ #)
os.environ[
f"MACH_SYSTEM_ASSERTED_COMPATIBLE_WITH_{virtualenv_name.upper()}_SITE"
- Then you need to edit the PKGBUILD (in my case in /var/tmp/pamac-build-user/librewolf) so that it finds and applies the patch before build ...
- Add the name of the patch file from the previous step at the end of the sources list
source=(""
...
"librewolf_mach_site.py_disable_pip-check.patch")
- Add another 'SKIP' accordingly in the sha256sums=('' ... 'SKIP')
- Add the following two lines right before the lines which reference this url https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
# apply patch to disable pip check
patch -Np1 -i ../librewolf_mach_site.py_disable_pip-check.patch
- Start new build ... there may still be a warning about pip check, but instead of stopping the build should then continue
Pinned Comments
lsf commented on 2025-01-01 21:28 (UTC)
Please refrain from abusing the flagging of a package as out of date for build issues. This is not what it is supposed to be used for.
I automatically get notified of comments to this package. I do not need to be notified of whatever build problems occur (whether they are an individual's problems or the actual package's problems) twice, and not via flagging it out of date.
Issues with this package can also be reported at https://codeberg.org/librewolf/issues/issues (as it is also maintained there, at https://codeberg.org/librewolf/arch, too).