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

Feature request: ability to install older versions of a module #216

Open
kablamo opened this issue Sep 24, 2015 · 5 comments
Open

Feature request: ability to install older versions of a module #216

kablamo opened this issue Sep 24, 2015 · 5 comments

Comments

@kablamo
Copy link

kablamo commented Sep 24, 2015

Lets say I add Foo-Bar-v0.01.tar.gz to Pinto and then Foo-Bar-v0.02.tar.gz to Pinto. It would be nice if I could get an older version from Pinto with a command like:

cpanm --mirror <url> --mirror-only Foo::[email protected]

Obviously CPAN supports this, but it doesn't seem like Pinto does. The tricky part is if multiple authors do releases. Not sure if there are some existing CPAN modules which might make it easy to add this feature.

@kablamo
Copy link
Author

kablamo commented Sep 24, 2015

Some info on how cpanm does this here: http://cpanmetadb.plackperl.org/
which makes it sound like this would be hard and involved cuz we need to provide a rest api and a patch to cpanm.

Not sure if this module would be useful: https://metacpan.org/pod/CPAN::Common::Index

@kablamo kablamo changed the title Add ability to install older versions of the module which are available in Pinto Feature request: ability to install older versions of the module Sep 24, 2015
@kablamo kablamo changed the title Feature request: ability to install older versions of the module Feature request: ability to install older versions of a module Sep 24, 2015
@kablamo
Copy link
Author

kablamo commented Sep 24, 2015

Figured out I can do this which is pretty close to good enough:

cpanm --mirror <url> --mirror-only AUTHOR/Foo-Bar-0.01.tar.gz

I guess my only problem is AUTHOR is sometimes different because different people do releases. Which makes it hard to get the previous version.

@thaljef
Copy link
Owner

thaljef commented Sep 24, 2015

The primary goal of Pinto is to provide a CPAN index that always yields the same modules (unless you change it). So if you want to provide multiple versions of a module at the same time, then you would create multiple stacks.

But it sounds like you're just looking for a local CPAN mirror that you can install arbitrary modules from. If that's the case, then perhaps CPAN::Mini is the right solution for you.

@melezhik
Copy link

Hi Eric! pinto provides a conception of stacks which are cpan
index snapshots, so module downgrade is achievable by adjusting index in
a stack, I could not recall a certain pinto commands for this but this
easily might be found at documentation.

So doing things in a pinto way you do not need point a cpan client with a
explicit version of module like you did, but instead you setup a pinto
stack with a right module version and then say

cpanm --mirror <url> --mirror-only Foo::Bar

Where an url should relate a proper pinto stack of course .

@thaljef
Copy link
Owner

thaljef commented Sep 24, 2015

There is also the install command, which is just a convenient wrapper around cpanm:

pinto -r <REPOSITORY> install --stack <STACK_NAME> Foo::Bar

But again, this assumes the Pinto model is right for you.

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

3 participants