Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDraft of List, Upgrade and Uninstall. #397
Conversation
| Apps that are free, will be downloaded directly when requested. | ||
|
|
||
| ***Pay apps [NOT SUPPORTED]*** | ||
| Apps that are for purchase, will not be allowed to be submitted. If an app from the store requires commerce, to run, we will not allow them in the Windows Package Manager repository. |
megamorf
Jun 4, 2020
What about paid apps that have been purchased already?
What about paid apps that have been purchased already?
yao-msft
Jun 4, 2020
Contributor
If the entitlement is already granted, I think we can continue with installation.
If the entitlement is already granted, I think we can continue with installation.
|
@KevinLaMS Some general feedback. Based on the contents on these drafts you haven't worked with Markdown that much so here are some potential issues that can be solved fairly quickly:
See: https://www.markdownguide.org/basic-syntax/ I like where this is going and will add more feedback later. |
|
Just a few typos. |
|
Some comments from the discussion in #120 |
|
|
||
| ## Abstract | ||
|
|
||
| For our preview of the Windows Package Manager, the goal was to enable install of apps. In order to be a package manager, the Windows Package Manager must be able to list all installed packages, communicate if there is an update ane uninstall apps. |
martinmine
Jun 4, 2020
Small typo:
Suggested change
For our preview of the Windows Package Manager, the goal was to enable install of apps. In order to be a package manager, the Windows Package Manager must be able to list all installed packages, communicate if there is an update ane uninstall apps.
For our preview of the Windows Package Manager, the goal was to enable install of apps. In order to be a package manager, the Windows Package Manager must be able to list all installed packages, communicate if there is an update and uninstall apps.
Small typo:
| For our preview of the Windows Package Manager, the goal was to enable install of apps. In order to be a package manager, the Windows Package Manager must be able to list all installed packages, communicate if there is an update ane uninstall apps. | |
| For our preview of the Windows Package Manager, the goal was to enable install of apps. In order to be a package manager, the Windows Package Manager must be able to list all installed packages, communicate if there is an update and uninstall apps. |
| | **-e,--exact** | Find the application using exact match. | | ||
| *Upgrade app when no update is available* |
martinmine
Jun 4, 2020
Another aspect to consider: What would happen if the user updates an app that is not installed? Should it then display an error or install said app?
Another aspect to consider: What would happen if the user updates an app that is not installed? Should it then display an error or install said app?
| *Upgrade app when no update is available* | ||
| If the user attempts to update an app that there is no known update for, the package manager will issue an error. |
martinmine
Jun 4, 2020
Should winget exit with a non-successful status code if this is the case?
Should winget exit with a non-successful status code if this is the case?
JohnMcPMS
Jun 4, 2020
Member
Yes, I believe so. If the command requested cannot be executed, the process should return a failure exit code.
Yes, I believe so. If the command requested cannot be executed, the process should return a failure exit code.
rmarquis
Jun 5, 2020
This seems counter intuitive to me, and it's also not what Linux package managers do as far as I know (using pacman here). If the purpose of the upgrade command is to check if newer version of package(s) are available and get them, then it didn't fail if the last available package(s) are installed already. The output should be different (f.e. "there is nothing to do") but the command would be considered a success anyway.
This seems counter intuitive to me, and it's also not what Linux package managers do as far as I know (using pacman here). If the purpose of the upgrade command is to check if newer version of package(s) are available and get them, then it didn't fail if the last available package(s) are installed already. The output should be different (f.e. "there is nothing to do") but the command would be considered a success anyway.
JohnMcPMS
Jun 5, 2020
Member
I guess it comes down to what the purpose is deemed to be semantically. I am not opposed to the purpose being "Make sure I have the latest version of this", which then I agree with you that no error is correct. I was reading it more as "Get a newer version of this", which while I agree is a subtle difference, it is still the difference between a command that cannot be executed, versus one that can.
I suppose there is the question of what is done in the --all case. In that case, should there be an error if no updates are available for anything? That feels wrong to me, as I don't think anyone would ever say "Get a newer version of everything". So for consistency, I believe that the semantics should be Ensure, not Get.
So I agree that there should not be an error exit code, and the verbage here should be "issue a warning" not an error.
I guess it comes down to what the purpose is deemed to be semantically. I am not opposed to the purpose being "Make sure I have the latest version of this", which then I agree with you that no error is correct. I was reading it more as "Get a newer version of this", which while I agree is a subtle difference, it is still the difference between a command that cannot be executed, versus one that can.
I suppose there is the question of what is done in the --all case. In that case, should there be an error if no updates are available for anything? That feels wrong to me, as I don't think anyone would ever say "Get a newer version of everything". So for consistency, I believe that the semantics should be Ensure, not Get.
So I agree that there should not be an error exit code, and the verbage here should be "issue a warning" not an error.
| [comment]: # Outline the design of the solution. Feel free to include ASCII-art diagrams, etc. | ||
| ## UI/UX Design |
martinmine
Jun 4, 2020
A suggestion for what could be discussed here: The impact on users that have not used a package manager, will they naturally use update instead of upgrade (or sometimes have issues with distinguishing these two)? And on the other hand, if update was an alias for upgrade, how can similar functionality of upgrade be used with the alias and vice versa? (For example: #120 (comment)) It would be really nice to see what is the plan for dealing with this kind of complexity (update vs. upgrade) from a user standpoint.
A suggestion for what could be discussed here: The impact on users that have not used a package manager, will they naturally use update instead of upgrade (or sometimes have issues with distinguishing these two)? And on the other hand, if update was an alias for upgrade, how can similar functionality of upgrade be used with the alias and vice versa? (For example: #120 (comment)) It would be really nice to see what is the plan for dealing with this kind of complexity (update vs. upgrade) from a user standpoint.
JohnMcPMS
Jun 4, 2020
Member
I prefer "update'. Upgrade has other semantics (at least to me), and update fits more cleanly into what is happening.
I prefer "update'. Upgrade has other semantics (at least to me), and update fits more cleanly into what is happening.
martinmine
Jun 4, 2020
@JohnMcPMS If you decide to go with update, then I would suggest to make upgrade alias of update to make the life easier for users familiar with other package managers that use upgrade for updating packages.
@JohnMcPMS If you decide to go with update, then I would suggest to make upgrade alias of update to make the life easier for users familiar with other package managers that use upgrade for updating packages.
RobGThai
Jul 12, 2020
•
Brew user here, every time I want to update an app, I have to look up help to see if I need to update or upgrade. One is making sure Brew is up to date, the other is for updating the app. If you trigger update without supplying app identifier then Brew will attempt to update every installed packages. Which I'm not a fan of.
Personally, I'm against making alias between update and upgrade. Having just one version of them at the start should reduce confusion on which one to use for newcomers. Instead of doing this, I'd suggest WinGet to only offer just one.
winget update - displaying help for update.
winget update <package_id> - updating provided package.
winget update winget - updating WinGet itself.
winget update -a|--all - updating every installed packages.
Brew user here, every time I want to update an app, I have to look up help to see if I need to update or upgrade. One is making sure Brew is up to date, the other is for updating the app. If you trigger update without supplying app identifier then Brew will attempt to update every installed packages. Which I'm not a fan of.
Personally, I'm against making alias between update and upgrade. Having just one version of them at the start should reduce confusion on which one to use for newcomers. Instead of doing this, I'd suggest WinGet to only offer just one.
winget update- displaying help for update.winget update <package_id>- updating provided package.winget update winget- updating WinGet itself.winget update -a|--all- updating every installed packages.
quangkieu
Sep 24, 2020
I think winget should use keywork like apt of Debian.
- Update: for refresh the catalog
- Upgrade: for actual installation operation of new version
This way we could remove the refresh frequency as winget user does not expect winget run in background as a CLI tool usually run and exit
I think winget should use keywork like apt of Debian.
- Update: for refresh the catalog
- Upgrade: for actual installation operation of new version
This way we could remove the refresh frequency as winget user does not expect winget run in background as a CLI tool usually run and exit
| ![show command]() | ||
| **Upgrade** when executed by itself will upgrade all apps ready for updates by the Windows Package Manager. |
martinmine
Jun 4, 2020
Would the user be prompted to confirm the package update? If yes, should there be flag to override this when being used in automation tasks, similar to how other package managers does this?
Would the user be prompted to confirm the package update? If yes, should there be flag to override this when being used in automation tasks, similar to how other package managers does this?
megamorf
Jun 5, 2020
Sounds like a good idea to stick to that already established pattern where by default a confirmation is required to proceed that can be skipped by passing an additional parameter.
Sounds like a good idea to stick to that already established pattern where by default a confirmation is required to proceed that can be skipped by passing an additional parameter.
| The following options are available. | ||
| | Option | Description | |
martinmine
Jun 4, 2020
What about specifying a manifest file that is located on the user's machine (or another repository)? Would this be part of another spec?
What about specifying a manifest file that is located on the user's machine (or another repository)? Would this be part of another spec?
| For inno, wix, nullsoft, and exe, the SystemAppId should be a string that is located in either of the Uninstall keys above. | ||
| ### Upgrade |
martinmine
Jun 4, 2020
It would be nice to hear how syncing with the remote repository will be handled, will the user have to do this manually (i.e. using an update), or will it be done automatically if the repository hasn't been synced after a said time?
It would be nice to hear how syncing with the remote repository will be handled, will the user have to do this manually (i.e. using an update), or will it be done automatically if the repository hasn't been synced after a said time?
KevinLaMS
Jun 4, 2020
Author
Contributor
Martin, I am curious. I think that the syncing of the remote repository is handled via the source:
C:\Users\kevinla>winget source update
Updating all sources...
Updating source: winget...
██████████████████████████████ 100%
Done.
Do you think this addresses the Update concern?
Martin, I am curious. I think that the syncing of the remote repository is handled via the source:
C:\Users\kevinla>winget source update
Updating all sources...
Updating source: winget...
██████████████████████████████ 100%
Done.
Do you think this addresses the Update concern?
martinmine
Jun 4, 2020
It is true you can handle this using the winget source command. I just think the spec should outline how the syncing of the remote repo is handled in context of running an update. Is a user required to run an winget source update before running winget upgrade or will this be implicit from running winget upgrade? (i.e. upgrade will invoke source update)
It is true you can handle this using the winget source command. I just think the spec should outline how the syncing of the remote repo is handled in context of running an update. Is a user required to run an winget source update before running winget upgrade or will this be implicit from running winget upgrade? (i.e. upgrade will invoke source update)
megamorf
Jun 5, 2020
•
In Linux package managers update the package cache for all enabled repositories. If a package was installed from repository "foo" then the search for available updates for that specific application will be narrowed down to repository "foo". If you'd actually want to install a new package that is available in multiple repositories without explicitly providing the correct repository name, the package will be installed from the repository with the highest priority. This priority system is also how the upcoming version 3 of PowerShellGet has been designed to define repository ordering.
In Linux package managers update the package cache for all enabled repositories. If a package was installed from repository "foo" then the search for available updates for that specific application will be narrowed down to repository "foo". If you'd actually want to install a new package that is available in multiple repositories without explicitly providing the correct repository name, the package will be installed from the repository with the highest priority. This priority system is also how the upcoming version 3 of PowerShellGet has been designed to define repository ordering.
lordcheeto
Jun 11, 2020
•
As of now, whenever a source (SQLite DB) is opened, it updates the source if it's been more than 5 minutes. winget source update is just the explicit command to update.
// TODO: Enable some amount of user control over this.
constexpr static auto s_DefaultAutoUpdateTime = 5min;
As of now, whenever a source (SQLite DB) is opened, it updates the source if it's been more than 5 minutes. winget source update is just the explicit command to update.
// TODO: Enable some amount of user control over this.
constexpr static auto s_DefaultAutoUpdateTime = 5min;
| **Update \ Upgrade** | ||
| **Uninstall** | ||
|
|
||
| ### List |
martinmine
Jun 4, 2020
Handling available updates with this would be similar to how dotnet handles packages updates, nice 👍 https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-list-package
Handling available updates with this would be similar to how dotnet handles packages updates, nice
Co-authored-by: Fabian Meyertöns <[email protected]>
Co-authored-by: Fabian Meyertöns <[email protected]>
Co-authored-by: Fabian Meyertöns <[email protected]>
Co-authored-by: Fabian Meyertöns <[email protected]>
Co-authored-by: Fabian Meyertöns <[email protected]>
Co-authored-by: Fabian Meyertöns <[email protected]>
| @@ -0,0 +1,230 @@ | |||
| --- | |||
| author: <first-name> <last-name> <github-id>/<email> | |||
JohnMcPMS
Jun 4, 2020
Member
Update metadata.
Update metadata.
| --- | ||
|
|
||
| # Spec Title | ||
|
|
JohnMcPMS
Jun 4, 2020
Member
Add links to Issues per latest spec template.
Add links to Issues per latest spec template.
|
|
||
|  | ||
|
|
||
| **List** when executed by itself will show all apps installed by the Windows Package Manager. |
JohnMcPMS
Jun 4, 2020
Member
Do we actually care about differentiating things installed by winget vs things that weren't? Doesn't seem very useful to me.
Do we actually care about differentiating things installed by winget vs things that weren't? Doesn't seem very useful to me.
| | **--moniker** | Filter results by application moniker. | | ||
| | **--tag** | Filter results by tag | ||
| | **--command** | Filter results by command | ||
| | **-s,--source** | Find the application using the specified [source](source.md). | |
JohnMcPMS
Jun 4, 2020
Member
Not relevant.
Not relevant.
|
|
||
|
|
||
| ## Mapping between Windows Package Manager repo and Apps and Features | ||
| *StoreApps* |
JohnMcPMS
Jun 4, 2020
Member
MSIX. Store is potentially a whole other can of worms. And we might have things available via both (Terminal for instance).
MSIX. Store is potentially a whole other can of worms. And we might have things available via both (Terminal for instance).
| [comment]: # Outline the design of the solution. Feel free to include ASCII-art diagrams, etc. | ||
| ## UI/UX Design |
JohnMcPMS
Jun 4, 2020
Member
I prefer "update'. Upgrade has other semantics (at least to me), and update fits more cleanly into what is happening.
I prefer "update'. Upgrade has other semantics (at least to me), and update fits more cleanly into what is happening.
| *Upgrade app when no update is available* | ||
| If the user attempts to update an app that there is no known update for, the package manager will issue an error. |
JohnMcPMS
Jun 4, 2020
Member
Yes, I believe so. If the command requested cannot be executed, the process should return a failure exit code.
Yes, I believe so. If the command requested cannot be executed, the process should return a failure exit code.
| ## Usage | ||
| ```winget uninstall [[-q] <query>] [<options>]``` |
yao-msft
Jun 5, 2020
Contributor
Does uninstall handle apps installed outside of WinGet?
If there're multiple matches with the query. Should we return a warning message saying "please refine the input ..." like what install command does today?
Does uninstall handle apps installed outside of WinGet?
If there're multiple matches with the query. Should we return a warning message saying "please refine the input ..." like what install command does today?
| | Argument | Description | | ||
| |--------------|-------------| | ||
| | **-q,--query** | The query used to search for an application. | | ||
| | **-?, --help** | Gets additional help on this command. | |
dev-nicolaos
Jun 16, 2020
Not a huge deal, but I'd personally prefer the -h alias as it is far more common and more clearly maps to --help than -?
Not a huge deal, but I'd personally prefer the -h alias as it is far more common and more clearly maps to --help than -?
GauthierPLM
Jul 8, 2020
Isn't -? the standard on Windows while -h is more a Unix thing?
Isn't -? the standard on Windows while -h is more a Unix thing?
This includes issue 120, 121 and 119.
Microsoft Reviewers: Open in CodeFlow