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
qemu: fix build when desktop file does not exist #110721
Conversation
@@ -143,7 +143,7 @@ stdenv.mkDerivation rec { | |||
|
|||
postFixup = '' | |||
# the .desktop is both invalid and pointless | |||
rm $out/share/applications/qemu.desktop | |||
rm $out/share/applications/qemu.desktop || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm -f
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm -f
means we won't notice when it is removed. Same with || true
. If the file is really removed there is no need for this.
rm $out/share/applications/qemu.desktop || true | |
rm $out/share/applications/qemu.desktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will have to either use || true
, -f
or make the nix code emit different code here. That is that I understand the reasoning right. Some of our builds are not producing .desktop
files and thus we must choose one of those options. The suggestion from @SuperSandro2000 would make this diff a no-op.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of our builds are not producing .desktop files
Did not know that. Maybe add a comment about this.
Result of 11 packages marked as broken and skipped:
8 packages failed to build:
|
The qemu-user variants as used by binfmt emulation through `(lib.systems.elaborate lib.systems.examples.aarch64-multiplatform).emulator pkgs` does not install a .desktop file since qemu 5.2.0. This change allows the build to continue if deletion of the desktop file fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It builds and runs :)
When will this percolate out to nixos-unstable? This is preventing me from upgrading my systems. |
Soon. To be more accurate, when the first column has all checkmarks: https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents |
maybe try nixos-unstable-small in the mean time. |
The qemu-user variants as used by binfmt emulation through `(lib.systems.elaborate lib.systems.examples.aarch64-multiplatform).emulator pkgs` does not install a .desktop file since qemu 5.2.0. This change allows the build to continue if deletion of the desktop file fails. (cherry picked from commit b7871c3)
The qemu-user variants as used by binfmt emulation through
(lib.systems.elaborate lib.systems.examples.aarch64-multiplatform).emulator pkgs
does not install a .desktop file since qemu 5.2.0. This change allows the build to continue if deletion of the desktop file fails.Motivation for this change
My systems that use the binfmt module could not be built:
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)