NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.77k stars 13.18k forks source link

wine: WINEPREFIX doesn't auto upgrade due to failing timestamp check #321334

Open ius opened 1 month ago

ius commented 1 month ago

Describe the bug

Wine uses a timestamp file to determine whether its WINEPREFIX needs to be upgraded:

.update-timestamp: contains the last modified date of file /usr/share/wine/wine.inf. It is used by WINE to determine if a prefix is out of date, and automatically update it if needed.

(source: FreeBSD manual)

This doesn't work for nixpkgs, because the mtime for wine.inf is set to 1.

$ stat /nix/store/4b856zxvn3vbkvwpj2q6jyq4g9qjkdzc-wine-wow-9.0/share/wine/wine.inf 
...
Modify: 1970-01-01 01:00:01.000000000 +0100

As a result, wine may run with an un-upgraded WINEPREFIX which leads to issues such as #321332

Additional context

Maybe-related: https://github.com/NixOS/nixpkgs/pull/256270

Maintainers

@avnik @bendlas @jmc-figueira @reckenrode @7c6f434c

ius commented 1 month ago

Just making sure notifications are sent: @avnik @bendlas @jmc-figueira @reckenrode @7c6f434c

eclairevoyant commented 1 month ago

All files in the store have the mtime set as such. So you'd have to use systemd-tmpfiles or something.

Also wouldn't a time in the past lead to always upgrading?

reckenrode commented 1 month ago

Also wouldn't a time in the past lead to always upgrading?

The time never changes, so it won’t ever upgrade automatically.