You are not logged in.
I'm writing a script that automates portions of reinstalling Arch. The only issue I've run into is needing a few key strokes to select the correct package from yaourt. so, I went ahead and configured it to use makepkg instead. The only issue I've run in from there is makepkg cannot pull in dependencies in the aur. Is there anyway to grab those dependencies without explicitly installing them? Would packer be the correct aur helper to use for this?
Offline
You can use any helper you want, there's no correct one. Getting a list of installed packages or just ones from the AUR is easy.
Why do you need such a script?
Offline
Every now and then I just like wiping my drive, and reinstalling a fresh install. I'd prefer to run such a script, so I can have a similar install as I had previously. I'm just trying to avoid having to spend time re-configuring as much as possible, when I already have the config scripts I need. I can use yaourt or whatever, but if it's possible to install the aur dependencies without needing to manually intervene that would be ideal. (with yaourt I need to enter the number for the package being installed)
I'm testing the script in a virtual machine to make sure everything installs correctly. If it all runs correctly I'll be moving my install to another disk after secure erasing everything, and partitioning.
Offline
... makepkg cannot pull in dependencies in the aur.
Correct, but you already have a mechanism for obtaining the target package - just do the same thing with the others.
Say, for example, you want to install package A from the AUR, but A depends on B and C which are also in the AUR. You currently must have some mechanism to download the A-tarball from the aur website so you can run makepkg on it, right? So you have something like:
1) {curl|wget|other-downloader} http://aur...../A.tar.gz
2) {tar|aunpack|gunzip|other-extracter} A.tar.gz
3) cd A
4) makepkg
So just first do these steps for B and C (but you may want to use the asdeps flag for installation).
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
zerophase wrote:... makepkg cannot pull in dependencies in the aur.
Correct, but you already have a mechanism for obtaining the target package - just do the same thing with the others.
Say, for example, you want to install package A from the AUR, but A depends on B and C which are also in the AUR. You currently must have some mechanism to download the A-tarball from the aur website so you can run makepkg on it, right? So you have something like:
1) {curl|wget|other-downloader} http://aur...../A.tar.gz
2) {tar|aunpack|gunzip|other-extracter} A.tar.gz
3) cd A
4) makepkgSo just first do these steps for B and C (but you may want to use the asdeps flag for installation).
Ok, so I just need to figure out the dependencies before hand, and install everything in the correct order?
Offline
with yaourt I need to enter the number for the package being installed
Nope.
yaourt -S <pkgname>
Offline
Ok, so I just need to figure out the dependencies before hand, and install everything in the correct order?
Yes. But unless I misunderstood, this is not for some dynamic list of things, right? You know what you want installed, so you know what the packages are. There is no point in looking for elaborate mechanisms to automate something you'd only need to type into your script once. In fact automation tools just open up the option for breakage later on if/when those tools change: use the simplest mechanism that gets the job done. In this case it seems to me that that'd be wget or curl and makepkg.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
zerophase wrote:Ok, so I just need to figure out the dependencies before hand, and install everything in the correct order?
Yes. But unless I misunderstood, this is not for some dynamic list of things, right? You know what you want installed, so you know what the packages are. There is no point in looking for elaborate mechanisms to automate something you'd only need to type into your script once. In fact automation tools just open up the option for breakage later on if/when those tools change: use the simplest mechanism that gets the job done. In this case it seems to me that that'd be wget or curl and makepkg.
Yeah, curl and makepkg seems ideal. I'm just mainly thinking if I want to expand the script to a larger scope than initially planned. The only other thing I'm worried about is getting stuck with a bunch of dependencies only needed for compilation, and having to manually track them down later.
Offline
How about using a local repo for your aur packages ?
create a local repo[1] and add it to pacman.conf
1. build an aur package you use/need
2. add the binary package to your local repo
3. pacman -Syu
do that for all aur packages.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Thanks, that's exactly what I needed.
Offline