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

PAUSE author being ignored when to look for specific version on MetaCPAN #405

Closed
miyagawa opened this issue Sep 9, 2014 · 0 comments
Closed

Comments

@miyagawa
Copy link
Owner

miyagawa commented Sep 9, 2014

➜  cpanminus git:(devel) ✗ perl -Ilib script/cpanm.PL --info App::cpanminus@1.7006 

---
filtered:
  query:
    nested:
      path: module
      query:
        custom_score:
          metacpan_script: score_version_numified
          query:
            constant_score:
              filter:
                and:
                  - term:
                      module.authorized: &1 !!perl/scalar:JSON::PP::Boolean 1
                  - term:
                      module.indexed: *1
                  - term:
                      module.name: App::cpanminus
                  - term:
                      module.version: 1.7006
      score_mode: max
...
  at /Users/miyagawa/dev/cpanminus/script/../lib/App/cpanminus/script.pm line 635
GMARLER/App-cpanminus-1.7006.tar.gz

http://api.metacpan.org/v0/release/_search?source=%7B%22filter%22%3A%7B%22term%22%3A%7B%22release.name%22%3A%22App-cpanminus-1.7006%22%7D%7D%2C%22fields%22%3A%5B%22download_url%22%2C%22stat%22%2C%22status%22%5D%7D

When to search for a module on MetaCPAN API, cpanm uses module.authorized = true, however when to lookup the matching release it uses the release key, such as App-cpanminus-1.706, which doesn't take into PAUSE author ID into account. If two authors upload a distribution with the same name, it is undefined which will be returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant