Balló György pushed to branch main at Arch Linux / Packaging / Packages / 
paperwork


Commits:
f6717124 by Balló György at 2025-02-02T18:56:55+01:00
upgpkg: 2.2.5-3: Check path if exist

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + paperwork-check-path.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = paperwork
        pkgdesc = Personal document manager to manage scanned documents and PDFs
        pkgver = 2.2.5
-       pkgrel = 2
+       pkgrel = 3
        url = https://openpaper.work/
        arch = any
        license = GPL-3.0-or-later
@@ -39,7 +39,9 @@ pkgbase = paperwork
        depends = python-whoosh
        source = 
git+https://gitlab.gnome.org/World/OpenPaperwork/paperwork.git#tag=2.2.5
        source = paperwork-l10n-compile.patch
+       source = paperwork-check-path.patch
        b2sums = 
f2a01e06382aee7d9dd4f1b2d53e4b5ad0ec5e29d074078c84a7fdbcccf8c33d8b4e51caea2cfea8b222fd93bb709b77ed495307c51c182c59bea73f94974e90
        b2sums = 
2489e31ea97f971dd89218f0b2496d3ea1ea9ac6114532e30022cbdcc194fad2091047731538352f53f4a81680e561e91b74953381ad2e0904434dcb071e9c5d
+       b2sums = 
91256d006e850cb4405d3a6934177242f708c491200bcec69fa91387deb581a4913ed84e1bdb5545a9ccba915a185ec6a8c25bbfe068bfc6e144e2f0bffd54ad
 
 pkgname = paperwork


=====================================
PKGBUILD
=====================================
@@ -2,7 +2,7 @@
 
 pkgname=paperwork
 pkgver=2.2.5
-pkgrel=2
+pkgrel=3
 pkgdesc='Personal document manager to manage scanned documents and PDFs'
 arch=(any)
 url='https://openpaper.work/'
@@ -46,10 +46,12 @@ makedepends=(
 source=(
   "git+https://gitlab.gnome.org/World/OpenPaperwork/paperwork.git#tag=$pkgver";
   paperwork-l10n-compile.patch
+  paperwork-check-path.patch
 )
 b2sums=(
   
f2a01e06382aee7d9dd4f1b2d53e4b5ad0ec5e29d074078c84a7fdbcccf8c33d8b4e51caea2cfea8b222fd93bb709b77ed495307c51c182c59bea73f94974e90
   
2489e31ea97f971dd89218f0b2496d3ea1ea9ac6114532e30022cbdcc194fad2091047731538352f53f4a81680e561e91b74953381ad2e0904434dcb071e9c5d
+  
91256d006e850cb4405d3a6934177242f708c491200bcec69fa91387deb581a4913ed84e1bdb5545a9ccba915a185ec6a8c25bbfe068bfc6e144e2f0bffd54ad
 )
 
 prepare() {
@@ -58,6 +60,9 @@ prepare() {
 
   # https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/merge_requests/862
   git apply -3 ../paperwork-l10n-compile.patch
+
+  # https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/merge_requests/867
+  git apply -3 ../paperwork-check-path.patch
 }
 
 build() {


=====================================
paperwork-check-path.patch
=====================================
@@ -0,0 +1,40 @@
+From eff17cb90e74149b1536ba5e2acfa6b5c2c6619e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <[email protected]>
+Date: Sun, 2 Feb 2025 17:51:46 +0000
+Subject: [PATCH] Check path if exist
+
+This fixes the problem that no fallback happens to the English help files when 
localized variants are missing.
+
+Fixes 7df337f5bf980f004dd9d10fb91e5052f35d9e46
+---
+ .../src/openpaperwork_core/resources/setuptools.py       | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/openpaperwork-core/src/openpaperwork_core/resources/setuptools.py 
b/openpaperwork-core/src/openpaperwork_core/resources/setuptools.py
+index 18585a1df..efc8a0a98 100644
+--- a/openpaperwork-core/src/openpaperwork_core/resources/setuptools.py
++++ b/openpaperwork-core/src/openpaperwork_core/resources/setuptools.py
+@@ -1,4 +1,5 @@
+ import logging
++import os
+ try:
+     import importlib.resources
+     IMPORTLIB_RESOURCES_AVAILABLE = True
+@@ -29,6 +30,14 @@ class Plugin(PluginBase):
+             return
+ 
+         path = importlib.resources.files(pkg).joinpath(filename)
++
++        if not os.access(path, os.R_OK):
++            LOGGER.warning(
++                "Failed to find resource file %s/%s,"
++                " tried at path %s.", pkg, filename, path
++            )
++            return None
++
+         LOGGER.debug("%s:%s --> %s", pkg, filename, path)
+         return importlib.resources.as_file(path)
+ 
+-- 
+GitLab
+



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/paperwork/-/commit/f67171240636e38b81a212afb1e0bd3a6874f8bc

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/paperwork/-/commit/f67171240636e38b81a212afb1e0bd3a6874f8bc
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to