mdaffin/arch-pkgs

AUR dependencies in meta packages

Closed this issue · 5 comments

Hi, great setup you've got here. I'm trying to replicate it using your blog posts as a guideline. I'm a bit stuck on something.
If I declare AUR dependencies in my meta package PKGBUILD, they don't end up added to the repo when I call repo-add. I'm using yay and when I run yay -S for the meta package, it finds it in the repo but can't resolve the AUR dependencies. Arguably a deficiency of yay but I'm curious how it works for you. Either the dependencies are automatically added by repo-add (which doesn't seem like a great idea and this isn't happening in your scripts) or they're resolved at install time by an AUR helper, right?

Sorry for the delayed response. The way I solved this was with aurutils - an aur helper that is designed around creating a repo rather than installing packages locally. I then use this to push the aur packages to the same repo as my meta packages and just don't use local aur helpers like yay. Then when I want to install/update a aur package I first publish it to the repo then run pacman to pull down those changes. This is all encapsulated by this sync script which you can call with ./sync <aur package> or ./sync -u to update existing packages. But it is just a thin wrapper around aurutils.

Thanks for getting back to me!

What exactly is the process by which, when you add a new AUR package to mdaffin-desktop.depends, this AUR package finds its way into your package repo? Are you manually running sync explicitly for these new packages every time one's added? Ideally these packages would be discovered somehow and added to the repo but I'm not seeing this happening in sync and I can't see how aurutils would support it.

It is a manual process, I first build/upload the AUR packages with sync (generally I manually install/test these to see if they are something I actually want to use longer term). Then I add them to my depends and rebuild/upload the meta package with the build script - and given they are now in my repos makepkg can find them during its build process.

Not really seen much of a problem with this approach and honestly never really thought about automating it fully as I like to test things out before including them in my meta package. So by the time I get to that point they are already built and in my repo. I suppose the difference here is I always use sync to build AUR packages I want to test and install them with pacman like any other package rather than using yay for this process and skipping the remote repo.

I have not really thought about automating that side of things as there is not a huge amount of value in it for me. You would basically have to teach makepkg how to build AUR packages, or parse the AUR package for dependencies and build/upload them separately first. I basically do the latter manually during my testing phase of the AUR package.

Ok, that makes sense. I thought I was missing something. I guess I imagine my ideal case being a few meta packages that I can install with yay or whatever that depend on both AUR and normal packages but which are themselves not in the AUR. Ideally I wouldn't even need a local package repo, since it's just copies of packages available elsewhere. I suppose I really am looking for Jguer/yay#694 or even Jguer/yay#647 . Thanks for your help!

Yeah, my whole workflow is centered around the remote repo so I have not encountered that same problem. Those issues look like what you want - same yay does not already support that. Maybe one of the other AUR helpers already does. But short of that I am not sure what is the best method for your workflow.