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

Add support for subsources, just in case the winget community package repo becomes too large for people with free accounts to fork and Microsoft ends up splitting them among something like first letters. #144

Open
DrewNaylor opened this issue Jan 27, 2022 · 0 comments

Comments

@DrewNaylor
Copy link
Owner

While winget itself wouldn't have to worry about manifests being in multiple places as I'm sure the code that packages everything up to go on Microsoft's server would automatically grab all the files across the repos and place them where they have to go, guinget doesn't use that server for manifests and would be in trouble. Thus, support for subsources would need to be added. Since I don't know how they would be added if Microsoft did need to split the repo, at first I'd just get a list of the folders with the first letter and assume that would work for now, but ideally there would be some way to know automatically where to find the split-off repos without having to specifically list them out. That may be a security risk, though. Maybe there would be some way to know if a git subproject should be interpreted as a subsource if that's how the repo is split.

For now, the simplest way to do it would be to allow people to enter URLs to repo zip files that are downloaded and extracted during the cache update, with a base set of URLs that are already entered for the default winget source. Each of these subsources would be inside a source entry in the sources list file.

Adding a new subsource would be done by clicking a button in the sources manager to add a subsource to a list, which will pop up a window asking for the subfolder underneath the main folder (usually /manifests/, but there's a key for this in my example sources list file) the subsource will be extracted to and the URL to download it from. Clicking the Add button (or whatever it'll say) will add that source to a datagridview (I'd prefer to use a checkedlistbox, but I don't know how to have multiple columns in a checkedlistbox). By default, subsources can be active, but you can uncheck the Active checkbox either in the Add subsource window or to the side of the subsources list. It's assumed that a subsource is part of the source, unless there would end up being a case where you'd have to agree to use the subsource, in which case adding it and/or checking the Active checkbox will imply that you agree with the terms of use. If necessary, there will be a way to say specifically that you agree with the terms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant