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

Limit exclusion of info/dir in builder.pl, fixes #242394 #242532

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

league
Copy link
Contributor

@league league commented Jul 9, 2023

Description of changes

While trying to exclude a generated /share/info/dir in a package from symlinking into a profile, we also ended up excluding the Emacs info manual for dired-x. This change excludes only the dir file.

This entails rebuild-the-world, but I've verified with the following small flake that it can rebuild up to emacs and exhibits the desired fix. Just set inputs.nixpkgs.url to this commit vs base commit.

{
  outputs = { nixpkgs, ... }: {
    packages.x86_64-linux.builder-bug =
      let pkgs = nixpkgs.legacyPackages.x86_64-linux; in
      pkgs.buildEnv {
        name = "build-emacs";
        # Need emacs and one other package that puts something in /share/info.
        paths = [ pkgs.emacs29 pkgs.time ];
      };
  };
}
% ls result-before/share/info/dir*
zsh: no matches found: result-before/share/info/dir*

% ls result-after/share/info/dir*
result-after/share/info/dired-x.info.gz@
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@Artturin
Copy link
Member

Should target staging, check CONTRIBUTING.md for how to rebase without mass pinging

commit title should be buildenv: Limit exclusion of info/dir

@@ -126,7 +126,7 @@ sub findFiles {
return if
$relName eq "/propagated-build-inputs" ||
$relName eq "/nix-support" ||
$relName =~ /info\/dir/ ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used to include $ a6fcf45#diff-1967dcc359700a88592924a2e08cc397d4c8ccedec0717a5f96bafc33ece5e53L61

but it was removed in 2010 a6fcf45#diff-1967dcc359700a88592924a2e08cc397d4c8ccedec0717a5f96bafc33ece5e53R53

guessing he accidentally removed it when he changed the others to eq, while this was intentionally not changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Now I'm wondering why it shouldn't be $relName eq "/share/info/dir" unless there may be a package with info files under some other prefix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked with nix-index and there's some that aren't under toplevel share

@league league marked this pull request as draft July 10, 2023 01:59
While trying to exclude a generated `/share/info/dir` in a package
from symlinking into a profile, we also ended up excluding the Emacs
info manual for `dired-x`.  This change excludes only the dir file.
@league league changed the base branch from master to staging July 10, 2023 02:12
@Artturin Artturin marked this pull request as ready for review July 10, 2023 17:46
@Artturin Artturin merged commit de5a74e into NixOS:staging Jul 10, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants