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

Option to prefer .portable packages #371

Open
alexchandel opened this issue Jul 30, 2015 · 5 comments
Open

Option to prefer .portable packages #371

alexchandel opened this issue Jul 30, 2015 · 5 comments
Labels
0 - Backlog Has related issue This issue has a related issue that would need to be addressed before this issue could be closed. Improvement
Milestone

Comments

@alexchandel
Copy link

There are myriad foo.portable/foo.install package couplets, and it isn't always consistent which package the root package foo points to. Having a global setting, possibly in choco feature, would greatly simplify the task of preferably/exclusively installing "portable" or "install" packages. Such an option would also mean that such Chocolatey users wouldn't have to avoid packages that depend on root packages that require the "install"/"portable" version.

This is similar to #258, but can be implemented much sooner, as it doesn't require having additonal knowledge of how each .install package works.

It likely requires the addition of a [packages.metadata.type] entry to the nuspec of the root package, marking it as "virtual" or "meta". Once this is present, the .portable version could be inferred by appending .portable to value of [packages.metadata.id]. The has the advantage that variants don't need to be explicitly characterized. It doesn't work for old .commandline packages though, which should be deprecated by creating and depending on a .portable package anyway.

Another design is to have a [packages.metadata.variants] tag containing the ids of package variants, with entries like <portable>foo.portable</portable>, <install>foo.install</install>, and even <portable>foo.commandline</portable>. This isn't necessarily incompatible with inferring ids, since the absence of a portable variant could simply default to foo.portable, should such a package exist.

(edited due to horrible keyboard)

@ferventcoder
Copy link
Member

Not really similar to #352 ;)

But it's definitely something I've wanted for a long time - a preference to prefer and then just run the install for the meta/virtual package and it just does the right thing if it is available, and does some magic if it is not.

Depends on virtuals being implemented first.

@ferventcoder
Copy link
Member

Note that the first step for virtuals is already in - chocolatey/nuget-chocolatey@dba9a83 (it's called provides)

@alexchandel
Copy link
Author

Sweet, I'm definitely adding this. It's just <provides>foo</provides> right?

Is there currently a means to distinguish between install and portable packages, other than by name?

@ferventcoder
Copy link
Member

@alexchandel The first step is in. Haha. Nothing but the metadata exists currently. The next steps are to get choco to know about it and package indexes.

@ferventcoder ferventcoder added this to the 0.9.10.x milestone Aug 10, 2015
@TheCakeIsNaOH
Copy link
Member

This is the issue for getting virtual packages: #858

Then the a package.portable and package.install could both <provides>package</provides>, and then when you choco install package, it could see that both .install and .portable are available, and pick the one you have selected via config/features.

@TheCakeIsNaOH TheCakeIsNaOH added the Has related issue This issue has a related issue that would need to be addressed before this issue could be closed. label Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog Has related issue This issue has a related issue that would need to be addressed before this issue could be closed. Improvement
Projects
None yet
Development

No branches or pull requests

3 participants