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

Parsing makes cuckooed packages inherit first packages version #170

Open
kentfredric opened this issue May 4, 2015 · 3 comments
Open

Parsing makes cuckooed packages inherit first packages version #170

kentfredric opened this issue May 4, 2015 · 3 comments
Labels
indexer How we index uploads metadata version and metadata extraction and handling

Comments

@kentfredric
Copy link

As discovered by @neilbowers, this file: https://metacpan.org/source/NEILB/Text-Autoformat-1.69/lib/Text/Autoformat.pm

Entered the index such that the single file mapped to:

{ "Text::Autoformat" : 0.69,
  "Text::Autoformat::Hang" : 0.69,
  "Text::Autoformat::NullHang": 0.69 }

Whereas expected indexing was:

{ "Text::Autoformat" : 0.69,
  "Text::Autoformat::Hang" : null,
  "Text::Autoformat::NullHang": null }

He recently shipped his distribution with Module::Build, which automatically did meta.provides for him:

https://metacpan.org/diff/file?target=NEILB/Text-Autoformat-1.70/&source=NEILB/Text-Autoformat-1.69/

It mimicked the expected pattern above

{ "Text::Autoformat" : 0.70,
  "Text::Autoformat::Hang" : null,
  "Text::Autoformat::NullHang": null }

And caused a "Backwards versioning" issue.

It is believed that the original behaviour of indexing the latter packages under the same version as the former is an error.

@karenetheridge
Copy link
Contributor

This feels like a recent regression to me -- surely if this behaviour had always been there we would have noticed it sooner.

@rjbs
Copy link
Collaborator

rjbs commented May 7, 2015

Maybe, but I'm not sure what change might have introduced this kind of thing recently. Anyway, easy to test and probably easy to fix! :)

@charsbar
Copy link
Collaborator

No. It's been there for quite a long time, at least since 2003 (I stopped tracking when I found the following example, but it should be older).

} else { # not simile

If we do need to make PAUSE work like Module::Build, just replacing $version in the following line with "undef" (and reindex every non-simile packages) should do the trick, but I'm not so sure which should be fixed actually.

https://github.com/andk/pause/blob/master/lib/PAUSE/pmfile.pm#L312

@rjbs rjbs added the indexer How we index uploads label Apr 27, 2019
@rjbs rjbs added the metadata version and metadata extraction and handling label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indexer How we index uploads metadata version and metadata extraction and handling
Projects
None yet
Development

No branches or pull requests

4 participants