-
Notifications
You must be signed in to change notification settings - Fork 904
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
Virtual packages #858
Comments
Migrated from chocolatey-archive/chocolatey#7 |
Looks like this has also been requested in NuGet/Home#2391 |
Requires package indexes first. #820 |
Side effect of hiding/removing the original issues list is that you can not see those issues anymore - 404. |
@ferventcoder that would be where the archiving feature would come into play I think. |
I was thinking about how to implement this by policy (rather than waiting for NuGet or custom extensions) and it occurred to me that maintainers could introduce another metapackage. For example if you had a cool app you might do the following:
Let's say theres another package called However, a different structure may be thus:
or
This will prevent accidental uninstallation using the existing dependency resolution. The nuspec for the virtual package <?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>example.virtual</id>
<version>0.0.0.0</version>
<authors>Chocolatey Virtual Package</authors>
<description>Chocolatey Virtual Package</description>
<dependencies>
<dependency id="example" />
</dependencies>
</metadata>
<files/>
</package> In the event that multiple packages provide the same virtual package some additional cleverness may be needed to make a cleaner uninstall (such as if you want to switch which provider you have). Right now I accomplish this locally with a stub package that matches the |
I've further refined this technique using package sources. I use it to allow In the directory <?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>jre8</id>
<version>8.99999</version>
<title>jre8 - Virtual package provided by zulu8</title>
<authors>Virtual</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Virtual package provided by zulu8</description>
<releaseNotes />
<dependencies>
<dependency id="zulu8"/>
</dependencies>
</metadata>
<files />
</package> I then add the source for my chocolatey packages: Now, if I install a package that depends on |
in case of virtual packages a smarter way of handling switches (e.g. passing trough by default) would come in very handy. see proudcanadianeh/ChocoPackages#32 for a very simple case which i encountered... |
Could Chocolatey add aliases, so that packages like gnuwin32-grep.install can have an easier name: grep.
The text was updated successfully, but these errors were encountered: