steven-omaha / pacdef

multi-backend declarative package manager for Linux
GNU General Public License v3.0
341 stars 13 forks source link

[Feature request]: pacdef as pacman/paru replacement #88

Open gro-david opened 3 months ago

gro-david commented 3 months ago

In one sentence, what would the new feature allow the user to do?

Instead of needing to use a package manager this would mean you only need to use pacdef.

Describe what problem this new feature would solve.

Often you just simply forget to add a package to your list, which then means that it might get removed.

How should this feature in your opinion work?

Since for now pacdef does not use any flags, it could detect if a - sign is in the executed command. then it would pass that command to either paru or the configured AUR helper. Afterwards an interface like the one when selecting the group could be shown.

Would you be willing to implement this? We would support you through this process.

Additional information

I am not sure how you could implement this for multiple backends. But it should be possible.

ripytide commented 3 months ago

I've wanted this for a while, one approach might be a new command such as pacdef add <backend> <package> which then asks for a group to be selected.

The tricky part would be appending that package to the selected group file. Which means this use-case might need some reconsideration of the file format overhaul in #79

InnocentZero commented 3 months ago

Another problem would be dependencies. You'd need to make sure that the dependencies get added as well. I'm not sure if pacman provides a querying method for this though.

ripytide commented 3 months ago

Aren't dependencies installed automatically by pacman when installing a package though so we don't need to worry about dependencies?

Optional dependencies would need to be manually specified though.

InnocentZero commented 3 months ago

I'm talking about adding dependencies to the group file. We need a method to query the specific packages that got installed alongside the one we requested.

gro-david commented 3 months ago

I honestly do not think that that is complicated. Using pacman -Qd <package> you get get the dependencies (I think the other package managers should have the same feature, flatpaks do not need them since they are sandboxed afaik). And then you could just add them as dependencies.