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

Incorrect derivation file sometimes #24

Closed
ryantm opened this issue Mar 20, 2018 · 12 comments
Closed

Incorrect derivation file sometimes #24

ryantm opened this issue Mar 20, 2018 · 12 comments
Labels

Comments

@ryantm
Copy link
Collaborator

ryantm commented Mar 20, 2018

Our new way of figuring out the derivation file is sometimes wrong. For example,

libgit2 picked the specific version instead of the non-specific one: "libgit2_0_25: 0.25.1 -> 0.26.3"
NixOS/nixpkgs#37474

Same for isl "isl_0_15: 0.15 -> 0.19"
NixOS/nixpkgs#37453

cc @matthewbauer

@ryantm ryantm changed the title Issues with picking the wrong derivation/version Incorrect derivation file sometimes Mar 20, 2018
@ryantm
Copy link
Collaborator Author

ryantm commented Mar 20, 2018

Maybe we can filter the list coming from nix-env -qa to remove things containing the _\d+ regex.

@dotlambda
Copy link

dotlambda commented Mar 20, 2018

How about just taking the shortest matching name?
EDIT: the shortest attribute name of course

@matthewbauer
Copy link
Member

matthewbauer commented Mar 20, 2018

The libgit2 issue should be fixable without hacks. We have two versions of libgit2 in Nixpkgs but we only want to update the newest one. Repology correctly disagnoses it on the website:

https://repology.org/metapackages/?search=libgit&maintainer=&category=&inrepo=nix_unstable&notinrepo=&repos=&families=&repos_newest=&families_newest=&outdated=on

(notice the "legacy" and "outdated" labels)

Maybe there is a way to only query the "outdated" ones from Repology API? Not too familiar with it.

On the other hand, isl isn't as easy to fix given how the file is structured. The best solution right now might just be to blacklist them. We don't have too many 'multiple versions, single name' anyway.

@matthewbauer
Copy link
Member

matthewbauer commented Mar 20, 2018

Maybe we can filter the list coming from nix-env -qa to remove things containing the _\d+ regex.

That won't work because the name of the attribute is still 'isl' and 'libgit2'. We query isl-0.15 and libgit2-0.25.1. The issue is that the "OLD_VERSION" is wrong that we're getting from Repology.

@ryantm
Copy link
Collaborator Author

ryantm commented Mar 20, 2018

Maybe there is a way to only query the "outdated" ones from Repology API?

Yes, I'm already doing that. Is there some bit of information we need that we don't get from this line?

libgit2 0.25.1 0.26.3

@matthewbauer
Copy link
Member

It should be:

libgit2 0.26.0 0.26.3
isl 0.17.1 0.19

@ryantm
Copy link
Collaborator Author

ryantm commented Mar 20, 2018

Oh sorry, I see now that there are multiple entries for nixpkgs unstable. Yes, I think I can fix my repology api code to handle that better.

@matthewbauer
Copy link
Member

Yeah looking at the API, the "status" code returned should be "outdated" (as opposed to "legacy").

@ryantm
Copy link
Collaborator Author

ryantm commented Mar 21, 2018

Fixed repology-api and checked the output matches what @matthewbauer said above.

ryantm added a commit that referenced this issue Mar 22, 2018
protects against problems caused by #24
@ryantm
Copy link
Collaborator Author

ryantm commented Mar 22, 2018

I added a check for version compatibility. It should give up trying to update an attrpath that contains an incompatible version string now.

@ryantm ryantm added the bug label Apr 8, 2018
@ryantm
Copy link
Collaborator Author

ryantm commented May 21, 2018

This is probably the correct file, but it got to it the wrong way, so it has the wrong attrpath: NixOS/nixpkgs#40830

@ryantm
Copy link
Collaborator Author

ryantm commented Nov 29, 2018

I'm closing this in favor of having specific issues about each problem related to this.

@ryantm ryantm closed this as completed Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants