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

[Idea]: more flexible repos management #34

Open
Maxython opened this issue Feb 6, 2023 · 1 comment
Open

[Idea]: more flexible repos management #34

Maxython opened this issue Feb 6, 2023 · 1 comment
Labels
idea An idea to add or improve a function(s)

Comments

@Maxython
Copy link
Member

Maxython commented Feb 6, 2023

I suggest creating a termux-set-repo command which allows you to disable or enable repos for apt or for pacman. How to implement it correctly, I can’t figure out how to do it in my head, so I’m waiting for your implementation proposal (if you’re interested, of course).

@Maxython
Copy link
Member Author

Maxython commented Feb 10, 2023

Well, I have one idea how this can be implemented, but then will need to completely change the structure of the repos management of the service and mirrors.

So here's the idea: start storing all references to services and mirrors in files (let's call db) that will be located in $PREFIX/share/repos-db, thanks to which you can flexibly generate files in etc for package managers.

For example, the "db file" of the official termux apt service (packages.termux.dev) will look like this:

{
    "link": "https://packages.termux.dev/",
    "pm": "apt",
    "repo": {
        "main": {"arch": "all", "av": "new"},
        "root": {"arch": "all", "av": "new"},
        "x11": {"arch": "all", "av": "new"},
        "termux-main-21": {"arch": "all", "av": "old"}
    }
}

Explanation:

  • pm - for which package manager it belongs
  • av - which version of android repo is supported for ("new" for 7+ and "old" for 5/6)

Yes, it all looks complicated (in addition to this, these are just my ideas), but I think that the result will be worth it :)

@Grimler91 and @agnostic-apollo

@Maxython Maxython added the idea An idea to add or improve a function(s) label Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea An idea to add or improve a function(s)
Projects
None yet
Development

No branches or pull requests

1 participant