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

Installers should be able to inherit and merge dependencies from package #4023

Open
marco-eckstein opened this issue Jan 3, 2024 · 0 comments
Labels
Area-Manifest This may require a change to the manifest Dependencies Related to package level dependencies Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@marco-eckstein
Copy link

Description of the new feature / enhancement

This is an excerpt from a package I am about to submit - as you can see, 2 out of 3 dependencies are the same for both installers:

PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Installers:
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
    Architecture: x64
    InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
    Dependencies:
      PackageDependencies:
        - PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
        - PackageIdentifier: Microsoft.EdgeWebView2Runtime
        - PackageIdentifier: Microsoft.VCRedist.2015+.x64
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
    Architecture: x86
    InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
    Dependencies:
      PackageDependencies:
        - PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
        - PackageIdentifier: Microsoft.EdgeWebView2Runtime
        - PackageIdentifier: Microsoft.VCRedist.2015+.x86
ManifestType: installer
ManifestVersion: 1.5.0

It seems sensible to refactor to:

PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Dependencies:
  PackageDependencies:
    - PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
    - PackageIdentifier: Microsoft.EdgeWebView2Runtime
Installers:
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
    Architecture: x64
    InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
    Dependencies:
      PackageDependencies:
        - PackageIdentifier: Microsoft.VCRedist.2015+.x64
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
    Architecture: x86
    InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
    Dependencies:
      PackageDependencies:
        - PackageIdentifier: Microsoft.VCRedist.2015+.x86
ManifestType: installer
ManifestVersion: 1.5.0

Surprisingly, this doesn't work, as the installers' dependencies (or at least the package dependencies) will be overridden. I would have found it more intuitive if they would have been inherited and merged by default, but for the sake of backwards compatibility, I'd suggest a boolean option inherit:

PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Dependencies:
  PackageDependencies:
    - PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
    - PackageIdentifier: Microsoft.EdgeWebView2Runtime
Installers:
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
    Architecture: x64
    InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
    Dependencies:
      Inherit: true
      PackageDependencies:
        - PackageIdentifier: Microsoft.VCRedist.2015+.x64
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
    Architecture: x86
    InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
    Dependencies:
      Inherit: true
      PackageDependencies:
        - PackageIdentifier: Microsoft.VCRedist.2015+.x86
ManifestType: installer
ManifestVersion: 1.5.0

Since most of the time that this feature would be handy is probably within the context of architecture-specific packages, it may become obsolete if #1665 got implemented. I imagine then we could write someting like this:

PackageIdentifier: OpenBoxLab.RaiDrive
PackageVersion: 2023.9.32
# ...
Dependencies:
  PackageDependencies:
    - PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
    - PackageIdentifier: Microsoft.EdgeWebView2Runtime
    - PackageIdentifier: Microsoft.VCRedist.2015+.{$architecture}
Installers:
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x64.msi
    Architecture: x64
    InstallerSha256: B486683E0C223A1FF7D0251A050DF80A649D09F47F7026A5197D79F1E11281A5
  - InstallerUrl: https://app.raidrive.com/d86ea6fa40f74010914976063f94774b/release/stable/RaiDrive_2023.9.32_x86.msi
    Architecture: x86
    InstallerSha256: 32D174DDF313150E125BB020DC9CC79CDF5EF5C7D4842E831A7F65B970004F95
ManifestType: installer
ManifestVersion: 1.5.0

Proposed technical implementation details

No response

@marco-eckstein marco-eckstein added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jan 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jan 3, 2024
@denelon denelon added Dependencies Related to package level dependencies Area-Manifest This may require a change to the manifest and removed Needs-Triage Issue need to be triaged labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Manifest This may require a change to the manifest Dependencies Related to package level dependencies Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

2 participants