Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lensfun can't update lens database #99009

Closed
expipiplus1 opened this issue Sep 28, 2020 · 4 comments · Fixed by #108991
Closed

lensfun can't update lens database #99009

expipiplus1 opened this issue Sep 28, 2020 · 4 comments · Fixed by #108991

Comments

@expipiplus1
Copy link
Contributor

Describe the bug

lensfun-update-data fails requiring python3 installed, and even then fails to load a necessary python module

$ lensfun-update-data
/usr/bin/env: ‘python3’: No such file or directory
$ nix-shell -p python3 --run lensfun-update-data
Traceback (most recent call last):
  File "/nix/store/cgcad5zjda9zpn0vlb30rbzpvd6cpcfr-lensfun-2020-09-25/bin/lensfun-update-data", line 46, in <module>
    import lensfun
ModuleNotFoundError: No module named 'lensfun'

To Reproduce

  • Enter a shell with lensfun installed
  • run lensfun-update-data
  • Observe the above error

Expected behavior

The database in .local/share/lensfun is updated

Additional context

The lensfun derivation needs to install the generated python modules, and wrap the lensfun-update-data executable with a wrapper which provides python3 and an appropriate PYTHONPATH

Notify maintainers

@Enzime

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.62, NixOS, 20.09.git.4a755116d57 (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.7`
 - nixpkgs: `/home/j/src/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
  - lensfun
# a list of nixos modules affected by the problem
module:
@flokli
Copy link
Contributor

flokli commented Dec 30, 2020

I took a quick look at the script - it apparently expects stuff to be in /usr/{local/}share/lensfun - which won't work on NixOS.

Also, both "update servers" (http://lensfun.sourceforge.net/db/ and http://wilson.bronger.org/lensfun-db/) seem to be offline, and https://lensfun.github.io/ has a blog post from early 2019 searching for new maintainers.

There seem to be some updates in their git repo - instead of trying to hack the updater into some working state, we should probably just not ship the lensfun updater scripts at all, and replace $out/share/lensfun/version_2 should contain a more recent snapshot of the database - either by doing this in nixpkgs, from a snapshot, or by helping out upstream with a new release ;-)

@flokli
Copy link
Contributor

flokli commented Dec 31, 2020

Highlighting darktable nixpkgs maintainers and editors: @cillianderoiste @flosse @mrVanDalo @danieldk @adisbladis

@flokli
Copy link
Contributor

flokli commented Jan 11, 2021

I opened #108991 which should ship a more recent lensfun database.

@expipiplus1
Copy link
Contributor Author

expipiplus1 commented Jan 11, 2021 via email

flokli added a commit to flokli/nixpkgs that referenced this issue Jan 12, 2021
lensfun hasn't had a new release since quite some time, and the database
updater doesn't work in NixOS
(NixOS#99009).

This replaces the database with a more recent snapshot during build,
thus adding support for more recent camera models/lenses (as reported in
NixOS#107304)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants