You are not logged in.

#1 2016-01-06 17:03:43

zerophase
Member
Registered: 2015-09-03
Posts: 229

How to retrieve dependencies from aur for makepkg?

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

#2 2016-01-06 17:14:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to retrieve dependencies from aur for makepkg?

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

#3 2016-01-06 17:27:54

zerophase
Member
Registered: 2015-09-03
Posts: 229

Re: How to retrieve dependencies from aur for makepkg?

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

#4 2016-01-06 17:29:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: How to retrieve dependencies from aur for makepkg?

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) 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

#5 2016-01-06 17:31:51

zerophase
Member
Registered: 2015-09-03
Posts: 229

Re: How to retrieve dependencies from aur for makepkg?

Trilby wrote:
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) makepkg

So 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

#6 2016-01-06 17:33:48

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How to retrieve dependencies from aur for makepkg?

zerophase wrote:

with yaourt I need to enter the number for the package being installed

Nope.

yaourt -S <pkgname>

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2016-01-06 17:38:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: How to retrieve dependencies from aur for makepkg?

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.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2016-01-06 17:54:20

zerophase
Member
Registered: 2015-09-03
Posts: 229

Re: How to retrieve dependencies from aur for makepkg?

Trilby wrote:
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

#9 2016-01-07 12:14:42

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: How to retrieve dependencies from aur for makepkg?

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.

[1]
https://wiki.archlinux.org/index.php/Pa … repository


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

#10 2016-01-07 21:53:58

zerophase
Member
Registered: 2015-09-03
Posts: 229

Re: How to retrieve dependencies from aur for makepkg?

Thanks, that's exactly what I needed.

Offline

Board footer

Powered by FluxBB