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

Support validation for multiple aliases in a single portable executable #2884

Open
sitiom opened this issue Jan 26, 2023 · 6 comments
Open
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Portable Issue related to portable package

Comments

@sitiom
Copy link

sitiom commented Jan 26, 2023

Brief description of your issue

winget validate fails locally for nested portable executables with multiple aliases. Some applications expect multiple aliases from one command, which is why this is important.

Related to #2523 (comment):

  • This might be acceptable as long as they have different command aliases?

Perhaps this was overlooked.

Steps to reproduce

  1. Checkout New package: Fly-io.flyctl version 0.0.450 winget-pkgs#94699
  2. Validate the Fly-io.flyctl manifest locally with winget validate
  3. Validation fails with this error:
Manifest validation failed.
Manifest Error: Duplicate relative file path found. [RelativeFilePath]
Manifest Error: Duplicate relative file path found. [RelativeFilePath]

Installation works as intended however, creating fly and flyctl aliases for flyctl.exe.

Expected behavior

Validation should succeed

Actual behavior

Validation is failing.

Environment

Windows: Windows.Desktop v10.0.22621.1105
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0
@ghost ghost added the Needs-Triage Issue need to be triaged label Jan 26, 2023
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Jan 27, 2023
@ryfu-msft
Copy link
Contributor

@sitiom,

This scenario seems a bit strange to me. Why are multiple aliases needed for a single executable when one alias could do the job? Could you give me more context on your scenario or your specific package? Is this a "special" case or is this a more common scenario that we had overlooked when implementing the validation. We don't want to open up floodgates and allow a bunch of symlinks/aliases to be generated for only a single executable if it is not absolutely necessary.

@sitiom
Copy link
Author

sitiom commented Jan 27, 2023

Why are multiple aliases needed for a single executable when one alias could do the job?

Some CLI apps have a shorter alias that users can use for convenience. flyctl is an example (i.e., flyctl and fly as stated in the docs). Users expect both aliases to be available like in other package managers; thus, this case should be supported.

We don't want to open up floodgates and allow a bunch of symlinks/aliases to be generated for only a single executable if it is not absolutely necessary.

Of course, you shouldn't when it's not necessary 🙂

@sitiom sitiom changed the title Validation should succeed when RelativeFilePath is same but different PortableCommandAlias Support validation for multiple aliases in a single portable executable Jan 27, 2023
@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. labels Jan 27, 2023
@denelon
Copy link
Contributor

denelon commented Jan 27, 2023

It sounds more like a new feature then. Are there any other examples like this?

A few more "real world" examples will help justify the work. It's hard to justify for one package given all the other open Issues.

I'd also want a few more 👍on the issue 😊

@sitiom
Copy link
Author

sitiom commented Jan 27, 2023

Workaround: Prefix .\ to the other RelativeFilePath (i.e., flyctl.exe and .\flyctl.exe). Validation now succeeds:
image

However, you cannot apply this workaround for non-zip binaries (Example: Genivia.ugrep).

@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

[Policy] Portable

@microsoft-github-policy-service microsoft-github-policy-service bot added the Portable Issue related to portable package label Jun 16, 2023
@soredake
Copy link

Another package that uses multiple aliases microsoft/winget-pkgs#131849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Portable Issue related to portable package
Projects
None yet
Development

No branches or pull requests

5 participants