You are not logged in.
Pages: 1
After reading the wiki a multitude of times I feel I am still a little confused on the beast that is the Arch User Repository. I haven’t really found much of a need for it yet though it seems there are plenty of packages that may simplify my life. After reading the wiki this is what I’ve done to install packages from the AUR (so bascially just copy/paste from the wiki)
cd $HOME/Builds
git clone https://aur.archlinux.org/PackageName.git
cd PackageName
less PKGBUILD #inspecting that everything makes sense/isn’t malicious
# as well as inspecting package dependencies if I satisfy them
makepkg -si
cd ..
rm -rf PackageNameFrom there, it is my understanding that it is now just a regular package like all other packages installed from pacman, I only say this because I have been removing them with
pacman -Rsn PackageNameMy confusion then is updating them and (I hope maybe I am overcomplicating things) how do I go about updating them? Or checking for updating? Because I can remove them with pacman is it as simple as
pacman -SyuOr do I have to stop removing the build directory after I build and do something like
cd $HOME/Builds/PackageName
git pullOr is it something else entirely?
I apologize if this is written explicitly somewhere and I continually read over it
(reed not red, though I guess both ways work)
Also, I would prefer (at this point) to do all of this manually rather than using an AUR as I feel an AUR helper would be somewhat counter productive to Arch's DIY mentality!
Last edited by jbenge1 (2018-07-31 07:11:50)
"Dr. Madden, why don't the natural numbers include 0?" -me
"....... Take a philosophy course" -Dr. Madden
Offline
You seem to have a pretty good grasp on the process. -git packages can be updated by merely re-running makepkg against the existing PKGBUILD. Others, you need to obtain an updated PKGBUILD and rebuild it.
I tend not to delete the build directories, but on my system, disk space is not an issue.
You can use a tool such as cower to check for installed AUR packages that have updates available.
As you clearly understand how to do it by hand, you may be ready for one of the (good) AUR helpers such as aurtools. https://wiki.archlinux.org/index.php/AUR_helpers
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
You seem to be on the right track.
First lets separate updating AUR package from detecting when updates are available - those really are two completely different tasks (even if you'd want them done together).
For updating AUR packages, it works exactly like the initial installation of the package: you download the (new) PKGBUILD and associate files from the aur (or clone them via git), then run makepkg. That's it.
But there are (at least) two approaches to this. First, in your steps, I see no reason to have that directory in your home directory only to later delete it. If that is your approach, you can just build under /tmp/. This is what I do: git clone to /tmp/pkgname, cd to /tmp/pkgname, then run makepkg -si. I don't worry about deleting anything as it will be cleaned up next time I reboot.
Alternatively, you can keep the build directory around (e.g., somewhere under $HOME), and just cd into that directory, git pull, then makepkg -si - this is what you have at the end of your post.
Either of these alternatives will work fine.
As for detecting available updates, pacman will not do this. Once the package is built and installed you are correct that pacman sees it just like any other package from the repos. Except there is no repo associated with it, just "local". So when you run pacman -Syu, pacman has no where to check for a newer version. So you must decide when to update your AUR package(s).
You can check the AUR web page and/or subscribe to get emails when there are changes to a given AUR package. Or you can use the rpc interface to query the aur page about available versions of various packages. And as soon as you've scripted this into a conviently automated check for updates, you've created an AUR helper.
Another alternative is to actually make a local repository of your own. So you can build with makepkg, and put the built packages in your local repo, then pacman will really treat that exactly like the main repos. Pacman -Syu will detect and install updates to your locally built packages (but you still must know when to rebuild them and place new versions in your local repo). Alad has a set of AUR tools which do basically this (I think).
For reference, this is how I check for aur updates. This is actually a part of a only slightly larger script I use as my own aur helper.
Last edited by Trilby (2018-07-30 14:54:25)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
Wow thanks for the great responses! This really clears up a lot of confusion for me so again thank you very much! It does however raise a few more questions!
As you clearly understand how to do it by hand, you may be ready for one of the (good) AUR helpers such as aurtools. https://wiki.archlinux.org/index.php/AUR_helpers
I apologize if this is to opinon based or philosophical (thus I will accept the answer my mathematics teacher Dr. Madden would give when asked "Why don't the natural numbers include 0?" his response being "Take a philosophy course") but what exactly defines a "good" AUR helper? I've really only heard about aurman (which if my memory servers me is outdated and no longer maintained?) and yaourt which seems to me is equivalent to the devil in some peoples eyes..
For reference, this is how I check for aur updates. This is actually a part of a only slightly larger script I use as my own aur helper.
Wow that is actually really cool little code snippet, I moonlight as a TA at my university for a python course and this would fit right in with a couple of the units for formatting strings and getting working with json responses... You wouldn't mind if I used this a small demo or walkthrough in one of my classes would you? I definitley prefer real world use cases of python rather than any silly contrived examples I come up with!
Also marking as solved as I feel these responses more than adequatley answered my question! ![]()
"Dr. Madden, why don't the natural numbers include 0?" -me
"....... Take a philosophy course" -Dr. Madden
Offline
what exactly defines a "good" AUR helper?
There are some comparison tables here, although the criteria in the columns of those tables are rather arbitrary. I think it is easier to outline what makes a bad aur helper: these traits would come in two flavors. First, helpers that do objectively incorrect, foolish, insecure, and dangerous things should be avoided. I'm not famialar with aurman, but the other one you listed ticks off every one of these boxes. Second, and this is arguably only my personal view, a bad aur helper is one that does things the user does not understand. Building from the AUR is a really simple task. There are a handful of steps that one might want to automate, but the code to automate a relatively simple task should never be ridiculously complex. If you can't look at the code of the AUR helper you are using and quickly understand what it is doing, I'd say it is too complex and should not be used.
The best way (again just in my view) to avoid the second flaw is to write your own. Alternatively thoroughly reviewing and perhaps modifying the code of someone else's AUR tool is good way to go - you should still know it well.
I'd also add, a good AUR tool should not do more than it needs to. It should help automate tedious tasks, but it should not obscure what is actually happening.
You wouldn't mind if I used this a small demo or walkthrough in one of my classes would you?
Go ahead. Here's the whole thing if you want it. I'll say it's free to use in any way under public domain, but I'll give one non-binding/informal caveate: while most licenses delineate rights to use, modify, and (re)distribute, I'd prefer to have people only modify and distribute and not use this as-is (for reasons noted above) and to only really use it once it morphs into Theseus's Script. Using it for educational example(s) is more than welcome.
Last edited by Trilby (2018-07-31 13:50:02)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
I agree with Trilby's criteria for 'good'. I currently use aurtools; it answers the 'good' mail. It has an unusual approach of maintaining a local repository of packages from the AUR. Prior to that, I had used cower to find updated packages. If I were to not use aurtools, I would probably adopt something like Trilby's script. (Or, go back to Gentoo and use emerge
)
Edit:
Here's the whole thing if you want it
Not big on comments, are you buddy?
$ pydoc trilby.py
No Python documentation found for 'trilby.py'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
$ ![]()
Last edited by ewaller (2018-07-31 14:42:57)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Pages: 1