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

Dependency Types #7

Open
em1lyy opened this issue Dec 7, 2020 · 7 comments
Open

Dependency Types #7

em1lyy opened this issue Dec 7, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@em1lyy
Copy link
Member

em1lyy commented Dec 7, 2020

kawa should support required/optional/recommended dependencies.

Many package managers accomplish this by creating multiple fields for certain requirement levels.

kawa will implement a way that is more like Gentoo's USE-Flags:
DEPENDS=req:glibc req:libcurl rec:tar rec:xz rec:gzip opt:bash

Every package name in DEPENDS has a preceding requirement type + :
Required is req, Recommended is rec, Optional is opt and for building Documentation is doc. (Or maybe not, we'll see if we'll add separate *-doc packages (probably))

Kawa's config.h will include a list of dependency types that will be selected by default. These settings can be changed by the --no-type, -Ntype, --use-type and -Utype command-line options.

@em1lyy
Copy link
Member Author

em1lyy commented Dec 7, 2020

Addition: This allows packagers to maintain more dependency types, for example optional X11 support (for example for vim) would get the dependency type x11: or xorg: or something

@em1lyy
Copy link
Member Author

em1lyy commented Dec 7, 2020

Addition: Packages of course know what dependency types they're installed with, kawa will maintain a Dependencies file to keep track of all dependency types. This will also allow keeping custom dependency types after updates etc.

@em1lyy em1lyy added the enhancement New feature or request label Dec 7, 2020
@em1lyy em1lyy self-assigned this Dec 7, 2020
@em1lyy
Copy link
Member Author

em1lyy commented Dec 8, 2020

to keep compatibility, all dependencies that are not prefixed are marked as required.

@em1lyy
Copy link
Member Author

em1lyy commented Dec 20, 2020

now that the only things really missing (apart from this of course) are patch pkgs and errno handling, I'll probably start work on this very soon

@em1lyy
Copy link
Member Author

em1lyy commented Jan 11, 2021

To make things exponentially easier, I'll just say that dependency type tags MUST be 3 chars long. This can change in a future kawa version, so don't rely on 3 char dependency types being a requirement.

@em1lyy
Copy link
Member Author

em1lyy commented Jan 11, 2021

or wait, how about we make it 1-4 chars, yeah, that sounds good
then we can put the chars into an unsigned int and pass an int array, because comparing one int is probably faster that comparing up to four chars

em1lyy added a commit that referenced this issue Jan 11, 2021
@em1lyy
Copy link
Member Author

em1lyy commented Jan 11, 2021

checklist:

  • pass deptypes to resolve_recursive
  • check deptype in resolve_recursive
  • fetch custom deptypes in update_all
  • pair deptypes with configurecmd
  • command line options -N && -U

em1lyy added a commit that referenced this issue Jan 14, 2021
em1lyy added a commit that referenced this issue Jan 14, 2021
em1lyy added a commit that referenced this issue Jul 14, 2021
em1lyy added a commit that referenced this issue Jul 14, 2021
em1lyy added a commit that referenced this issue Jul 14, 2021
em1lyy added a commit that referenced this issue Aug 29, 2021
em1lyy added a commit that referenced this issue Aug 29, 2021
em1lyy added a commit that referenced this issue Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant