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

Implement rfc0035: default name from pname #49398

Merged
merged 6 commits into from Nov 3, 2018

Conversation

Synthetica9
Copy link
Member

@Synthetica9 Synthetica9 commented Oct 29, 2018

Motivation for this change

Implements NixOS/rfcs#35

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Mic92 Mic92 changed the title Implement rfc0035 Implement rfc0035: default name from pname Oct 29, 2018
@Mic92 Mic92 merged commit 3fc7d5e into NixOS:master Nov 3, 2018
@dtzWill
Copy link
Member

dtzWill commented Nov 3, 2018

Is someone working on the fallout this causes re:pname/name violations? Surprised that wasn't done as part of the PR or explicitly discussed at least....

Anyway happily it seems to be just one package blocking my eval so no big deal :).
(modemmanager)

EDIT: just kidding that's not the only one.

dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Nov 3, 2018
@danieldk
Copy link
Contributor

danieldk commented Nov 4, 2018

So far, I have bumped into modemmanager and NetworkManager-l2tp blocking eval on one of my machines:

trace: mkDerivation: `name` ("NetworkManager-l2tp-gnome-1.2.10") must be consistent with `pname-version` "NetworkManager-l2tp-1.2.10"

danieldk added a commit to danieldk/nixpkgs that referenced this pull request Nov 4, 2018
Since NixOS#49398 was merged, name should have pname as a suffix, however
this derivation adds '-gnome' as a suffix when it is built with GNOME
support. This change makes the derivation more similar to some other
Network Manager plugins, where pname is not an attribute.
@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 4, 2018

Just trying to nox-review libmtp I get all this......
https://gist.github.com/c0bw3b/64ce22facbb41144761a3e7f29d02fc1

Also if certain use of pname and name become illegal then it should be documented before being enforced.

@FRidh
Copy link
Member

FRidh commented Nov 4, 2018

This is causing evaluation errors.

Before enforcing something like this, make sure you fix all occasions.

@FRidh
Copy link
Member

FRidh commented Nov 4, 2018

Reverted in abea6f4.

FRidh added a commit to FRidh/nixpkgs that referenced this pull request Nov 4, 2018
…0035" to fix eval

This reverts commit 3fc7d5e, reversing
changes made to 1fddf2b.

The idea is good, however, before enforcing, make sure all occurences
are fixed.
dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Nov 4, 2018
…ment-rfc0035" to fix eval"

Let's see..

This reverts commit abea6f4.
@Synthetica9
Copy link
Member Author

Synthetica9 commented Nov 4, 2018

I have implemented a different check, that doesn't seem to have any false positive:

      1 trace: pname Metaphone does not appear in name python2.7-metaphone-0.6
      1 trace: pname sat-0.6.1 does not appear in name salut-a-toi-0.6.1
      1 trace: version 0.0.0 does not appear in name python2.7-waitress-django
      1 trace: version 0.0.0 does not appear in name python3.7-waitress-django
      1 trace: version 0.0.17 does not appear in name typeshed
      1 trace: version 0.11.1 does not appear in name mist
      1 trace: version 0.1 does not appear in name python2.7-Snapper-GUI
      1 trace: version 0.1 does not appear in name python3.7-Snapper-GUI
      1 trace: version 0.25.2 does not appear in name brave
      1 trace: version 0.5.0 does not appear in name icr
      1 trace: version 0.5.5 does not appear in name python3.7-pathspec-0.5.9
      1 trace: version 0.6.1 does not appear in name kubectx
      1 trace: version 0.7.1.20180919 does not appear in name scry
      1 trace: version 0.7.2 does not appear in name python2.7-rbtools
      1 trace: version 0.7.3 does not appear in name vimiv
      1 trace: version 0.9.0 does not appear in name cadence
      1 trace: version 1.01 does not appear in name hid-listen
      1 trace: version 1.0b10 does not appear in name python2.7-html5lib-1.0.1
      1 trace: version 1.0 does not appear in name arm-trusted-firmware-sun50iw1p1-1.5
      1 trace: version 1.0 does not appear in name python3.7-urwidtrees
      1 trace: version 1.13.0 does not appear in name mupdf-1.10a
      1 trace: version 1.1 does not appear in name yojimbo
      1 trace: version 1.2.32 does not appear in name remmina-19.03pre-git
      1 trace: version 1.2.sakura.5 does not appear in name oneko-1.2.5
      1 trace: version 1.5 does not appear in name chicken-aes-export
      1 trace: version 1.7.9 does not appear in name python2.7-sphinx-1.2.3
      1 trace: version 2015-08-05 does not appear in name python2.7-repocheck
      1 trace: version 2015-08-05 does not appear in name python3.7-repocheck
      1 trace: version 2016-10-18 does not appear in name python3.7-pyinputevent
      1 trace: version 2017-06-04 does not appear in name beetle-pce-fast
      1 trace: version 2017-06-04 does not appear in name beetle-psx
      1 trace: version 2017-06-04 does not appear in name beetle-saturn
      1 trace: version 20180606 does not appear in name http-getter
      1 trace: version 2018 does not appear in name quickserve
      1 trace: version 2.2.0 does not appear in name python2.7-qutip
      1 trace: version 2.2.0 does not appear in name python3.7-qutip
      1 trace: version 2.27 does not appear in name elf-header
      1 trace: version 3.0.0 does not appear in name fileshelter
      1 trace: version 3639a2e90447e4640a03a44972560afe8f61aa48 does not appear in name libsignon-glib-2018-10-24
      1 trace: version 37 does not appear in name setup.patch
      1 trace: version 39022c86ddb5062a10fb0503ad9d81a8e532d527 does not appear in name gsignond-2018-10-04
      1 trace: version 4.1.5.2 does not appear in name omegat
      1 trace: version 4f7b118281667d22f1b3205edf0b775341fa49cb does not appear in name bookworm-2018-10-21
      1 trace: version 5.176.4 does not appear in name mx
      1 trace: version B.02.18 does not appear in name lshw-02.18b
      1 trace: version dnh3.3.2 does not appear in name enhanced-ctorrent
      2 trace: version 1.0.0 does not appear in name python2.7-svg2tikz
      2 trace: version 2016-10-18 does not appear in name python2.7-pyinputevent
      2 trace: version 2.3.2 does not appear in name libsignal-protocol-c

I think I can have all those fixed in a few hours, I'll open a new PR then.

@dtzWill
Copy link
Member

dtzWill commented Nov 4, 2018

Awesome!! I'm excited for this-- looking forward to taking advantage of it. The checks were unexpected from the title, but huge +1 for working to clean up all out expressions and helping them stay that way.
Thanks for tackling this!! Look forward to the next PR, hopefully the fixes are straightforward and not too tedious.

FWIW I only had one or two additional packages to fix, and I think they've been mentioned or addressed already. (which wasn't expected when I grumpily wrote my earlier comment)

In conclusion thank you and +1. :)

@Synthetica9
Copy link
Member Author

@dtzWill It mostly seems to be a case of people mistaking name for what pname does after this PR

@symphorien symphorien mentioned this pull request Nov 22, 2018
9 tasks
@jtojnar jtojnar mentioned this pull request Jan 17, 2019
6 tasks
@samueldr
Copy link
Member

@Synthetica9, or others involved with the change: can we have documentation in the Nixpkgs manual for pname? It would be great to have documentation available for this change to point at in PR reviews, regarding the usage of pname.

I'm thinking mainly of details like (if there are any cases) when not to use pname, and other important details to know.

@marsam marsam mentioned this pull request Apr 19, 2019
3 tasks
@jtojnar jtojnar mentioned this pull request Jun 16, 2019
10 tasks
@Pamplemousse Pamplemousse mentioned this pull request Aug 20, 2020
10 tasks
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.

None yet

10 participants