Created attachment 234533 [details] science/gramps: remove dependency on py-bsddb3 * Since version 5.0 gramps supports other dbs and since version 5.1 the default is sqlite, so the deprecated py-bsddb3 dependency can be removed. * remove deprecation as the reason no longer exists * While here fix portlint error about ordering of DISTVERSIONPREFIX If you have some berkeley db family trees you should do an export to gramps xml and import them as sqlite family tree. QA: * portlint: OK (no new issues) * testport: OK (poudriere: 13.1, amd64 tested) * runs fine for me (13.1 amd64) https://gramps-project.org/wiki/index.php/Gramps_5.0_Wiki_Manual_-_What%27s_new%3F#Primary_changes https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_What%27s_new%3F#Primary_changes
Thank you for the report and patch Benjamin. For users who already have existing installations using bsddb3 backends, its probably prudent to add options for database backend support, to avoid accidentally missing dependencies (pkg autoremove). Perhaps adding options for BDB and SQLITE, both enabled by default would be handy in the immediate term, along with an UPDATING message if we'd like to change the default functionality/dependency set.
Created attachment 234555 [details] science/gramps: Make py-bsddb3 dependency an OPTION You are right keeping the py-bsddb3 dependency as an OPTION until py-bsddb3 is removed from the portstree seems better. As Berkeley DB support depends on sqlite and a build without DB support doesn't seem desirable I decided not to create a SQLITE option, but I can if you think it is useful. When runtime testing with the py-bsddb3 dependency gramps wouldn't start with: ``` Traceback (most recent call last): […] File "/usr/local/lib/python3.8/site-packages/gramps/gen/utils/grampslocale.py", line 529, in __init_first_instance locale.textdomain(self.localedomain) AttributeError: module 'locale' has no attribute 'textdomain' ``` So I added a patch using `textdomain` and `bindtextdomain` from gettext instead as the locale docs[0] suggest, it seems like `locale` was used there as on linux gettext doesn't affect gtk for some reason[1]. It seems to work fine on freebsd, but I only looked at a few translations. Not sure why I didn't hit that AttributeError when py-bsddb3 wan't installed. For the UPDATING entry, maybe something like: ``` py-bsddb3 is deprecated and will be removed in the future, with that gramps will lose the ability to load family trees using Berkeley DB. So it is suggested to migrate all family trees using Berkeley DB by exporting them to gramps xml and import that gramps xml into a family tree using sqlite as database. ``` [0]: https://docs.python.org/3/library/locale.html#access-to-message-catalogs [1]: https://gramps-project.org/bugs/view.php?id=12278
Committed, Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f8c049d638e6a9b00ad054f5afaf9083fa1c6581 commit f8c049d638e6a9b00ad054f5afaf9083fa1c6581 Author: Benjamin Takacs <nimaje+fbz@bureaucracy.de> AuthorDate: 2022-06-23 06:03:51 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2022-06-23 15:39:59 +0000 science/gramps: Optional dependency on py-bsddb3 databases/py-bsddb3 is deprecated. Make science/gramps use py-bsddb3 as an option to facilitate the migration and remove the DEPRECATE note since it does not apply anymore. Add UPDATING note with instructions for the migration. While here pet linters. PR: 264529 Reported by: nimaje+fbz@bureaucracy.de UPDATING | 10 ++++++++++ science/gramps/Makefile | 14 ++++++-------- .../patch-gramps_gen_utils_grampslocale.py (new) | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 8 deletions(-)
It looks like this PR is handled and can be closed?
Committed, Thanks for the heads-up Rene! This went totally under my radar.