You are not logged in.
Bruenig, one more thing, could you make -Ss the default option? This is the behaviour I'm used to with yaourt. (eg. you can type yaourt python to search for python).
All along I have been waiting to add this with the numbered prefixes and so on because I knew messing with the pacman output in order to get it right would be really difficult. Yaourt does it by walking through each line of the pacman output which is very much the reason why it is soooo slow. In the previous parts of the code, I can just pacman -Ss foo and let that output just go straight out (therefore not having to mess with formatting and such). Unfortunately if you want to number and allow someone to come up later and type in numbers to install, you have to do something more than that.
Anyways, I have pushed something that just numbers. I will work on having a prompt allowing the user to type in the numbers later. As short as the code is to get it to do this. It took me a long time to figure it out. So if anyone is interested in seeing it, they should take a look. I think it is pretty interesting. Just very hackish, but intentionally so for speed purposes.
Offline
Great work. It's really fast and promising. Will you also try to add the -Rs package option and maybe the -Qdt one too ?
Great work
Offline
Ok I have added full support for: packer pkg1 pkg2 ... If you type that it will search for matches and prefix each match with a number, which you can then type and install. packer -S packer to get the latest.
Tell me if there are any problems.
I was testing against yaourt and I found this. Yaourt fails to find all of the matches. If you needed any other reason to switch, here it is. Yaourt is not only slow, but it simply does not even search correctly (missing 4 of 7 aur matches)
[bruenig ~]$ packer pacman wrapper
0 extra/srcpac 0.6-2
The pacman from-source wrapper
1 community/aqpm 1.3.3.2-1
Qt wrapper around pacman's libalpm
2 community/powerpill 17.0-3
A wrapper for pacman that speeds up package retrieval by using aria2c for
concurrent/segmented downloads.
3 aur/airpac 0.1.2-1
aria2c wrapper for pacman
4 aur/yaourt-git 20091130-1
A pacman wrapper with extended features and AUR support
5 aur/srcman 0.3-1
A pacman wrapper which transparently handles source packages
6 aur/pacatatime-git 20090616-1
A wrapper on pacman that install few packages at a time. This is good if you have little free space (like I do on my Eee)
7 aur/srcpac-git 20091125-1
The pacman from-source wrapper
8 aur/pacmatic 20100114-1
A pacman wrapper to avoid bricking your system and such other surprises.
9 aur/packer 20100107-1
Bash wrapper for pacman and aur
Type numbers to install. Separate each number with a space.
Numbers: ^C
[bruenig ~]$ yaourt pacman wrapper
1 extra/srcpac 0.6-2
The pacman from-source wrapper
2 community/aqpm 1.3.3.2-1
Qt wrapper around pacman's libalpm
3 community/powerpill 17.0-3
A wrapper for pacman that speeds up package retrieval by using aria2c for
concurrent/segmented downloads.
4 aur/pacmatic 20100114-1 (33)
A pacman wrapper to avoid bricking your system and such other surprises.
5 aur/srcman 0.3-1 (8)
A pacman wrapper which transparently handles source packages
6 aur/yaourt-git 20091130-1 (174)
A pacman wrapper with extended features and AUR support
==> Enter n° (separated by blanks, or a range) of packages to be installed
==> ----------------------------------------------
==>^C
[bruenig ~]$
Last edited by bruenig (2010-01-18 01:52:10)
Offline
Added --auronly option.
Offline
bruenig, can you add support for --skipinteg? (or maybe it can be globally overriden somewhere?)
Offline
I added --devel. It only works when you are doing -Su or -Syu and is ignored if used with any other command.
It downloads the PKGBUILDs of all of the aur packages installed and then sees if they have any of the following variables in their pkgbuilds: _darcstrunk _cvsroot _gitroot _svntrunk _bzrtrunk _hgroot. If so, it puts in the queue to install. Note when you use --devel, the process for testing versions and such is ever so slightly slower because instead of using the json api, it uses PKGBUILD which are a little bigger than json output. It is actually almost unnoticable, the speed drop, which kind of suprised me.
Note: Unless someone tells me otherwise, I have no real way of figuring out whether the remote git/svn or whatnot has actually updated over the installed version, so it simply installs regardless. I believe yaourt had the same behavior, but it is something to know.
Last edited by bruenig (2010-01-18 07:40:05)
Offline
bruenig, can you add support for --skipinteg? (or maybe it can be globally overriden somewhere?)
Adding support for it would be trivial, I just don't know why. Like, are you wanting to skip integrity checks for things you download off the aur?
Offline
[hsa2@businessboi ~]$ packer -S gnome
Package `gnome' does not exist.
Actually, it exist. Looks like packer is not able to install package groups, is this a bug?
Offline
You have added many new features to packer. Originally, packer only had "4 major functions". I wonder, what are your goals for packer?
It doesn't really matter what the goals for packer are to me, as long as it is still super fast. Packer is perfect for me with just the four major functions.
Offline
You have added many new features to packer. Originally, packer only had "4 major functions". I wonder, what are your goals for packer?
It doesn't really matter what the goals for packer are to me, as long as it is still super fast. Packer is perfect for me with just the four major functions.
There are only four major functions. The rest are modifications on those functions. Like I mean to say, there is no removing of packages, or querying of local packages, or anything you can do with pacman. There is still only -Ss, -Syu, -Si, and -S. The --auronly, --noconfirm, --devel are just modifications on the behavior of each of those commands. I had always intended to put at least those in there, I just needed to get everything solid to do so.
Offline
Offline
Thanks bruenig. So far Im really liking packer.
Offline
[hsa2@businessboi ~]$ packer -S gnome Package `gnome' does not exist.
Actually, it exist. Looks like packer is not able to install package groups, is this a bug?
You are right. I fixed it. Get the latest version of packer with packer -S packer. The fix now checks if supplied packages are pacman packages or pacman groups or aur packages, and if meets any one of those puts in the queue to install. I am not sure if there is a such thing as groups on aur, but if there are, it does not support that and I am really not sure how you would implement that without being really slow.
Offline
Thanks a lot for all of this seriously. This should help a lot to get people to get people to see it exists and teach them how to use it (not that it is that hard if you know how to use pacman .
Offline
Kudos comrade. Keep up the good work.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Packer is not detecting updates to AUR packages for me. For example I have pybgsetter 0.3-1 installed but it doesn't offer me 0.3-2:
Offline
Packer is not detecting updates to AUR packages for me. For example I have pybgsetter 0.3-1 installed but it doesn't offer me 0.3-2:
Fixed. I was using vercmp and was testing if -gt 1 when it should have been -gt 0. Anyways, typo, fixed. packer -S packer and try again. In addition, I took out two sed's and a grep that were previously used in this function, so speed increase .
Last edited by bruenig (2010-01-19 03:27:29)
Offline
Great, thanks.
Offline
Many people have talked to me about pacdiffviewer from yaourt. Some saying they use it a lot and really like it and that they could not give up yaourt without it. To keep it short, I forked it, modifying it to work as a stand alone application called pacdiff.
Here are the links
github link
aur link
forum post about pacdiff
Hopefully those who mentioned it in this thread will read this and find what they need and finally free themselves from yaourt!
Last edited by bruenig (2010-01-19 06:00:17)
Offline
Just had a quick look at your code and these lines made me cry:
# Info (-Si) handling
if [[ $option = info ]]; then
# Pacman info check
sourcemakepkgconf
for package in "${packageargs[@]}"; do
<...>
else # Check to see if it is in the aur
wget -q "http://aur.archlinux.org/packages/$package/$package/PKGBUILD" -O "$tmpfile"
[[ $? -eq 0 ]] || err "No result found."
. "$tmpfile"
You _really_ should use rpc.php here; sourcing unknown code is more than reckless.
Offline
Just had a quick look at your code and these lines made me cry:
# Info (-Si) handling if [[ $option = info ]]; then # Pacman info check sourcemakepkgconf for package in "${packageargs[@]}"; do <...> else # Check to see if it is in the aur wget -q "http://aur.archlinux.org/packages/$package/$package/PKGBUILD" -O "$tmpfile" [[ $? -eq 0 ]] || err "No result found." . "$tmpfile"
You _really_ should use rpc.php here; sourcing unknown code is more than reckless.
rpc does not give any useful information for -Si.
It doesn't provide dependency information for instance. I would love if the aur developers would actually provide this relevant information in the rpc, but until they do, how else am I supposed to reliably find dependency information? I was told by one of them that their parser doesn't really work very well and that caused problems with their stuff.
Anyways, I will try to conceive of some way to parse it out of the pkgbuild without sourcing. If you can think of a way, that would be great too. By the way, that is also where I get dependency information when I am resolving aur package dependencies . Yaourt does the same.
When coming up with a reliable parser, take into consideration that this counts as a legitimate depends array and should parse correctly.
depends=('hmm' 'what'
'wet' \
'lolque')
Oh and recall again that some pkgbuild's have conditional dependencies. They test one's CARCH, then depending on whether that is i686 or x86_64, they define a different set of depends. Good luck . No but seriously, it is impossible. Unless you want to rewrite a bash parser in bash.
Last edited by bruenig (2010-01-19 07:32:28)
Offline
Do you display pkgbuilds before sourcing? If not, switch the order. Problem solved.
Offline
Do you display pkgbuilds before sourcing? If not, switch the order. Problem solved.
Let's say you do packer -S pkg1, and pkg1 has 3 dependencies on aur, all of which have 3 dependencies on aur. When the program is resolving all of those dependencies by downloading pkgbuild after pkgbuild and sourcing, you wish all 12 of those pkgbuild's to be shown to you as it resolves one by one? If this is the sort of thing you are interested in, you probably are looking for slurpy which just downloads the aur tarball and lets you figure out what to do with it.
Last edited by bruenig (2010-01-19 07:51:34)
Offline
If this is the sort of thing you are interested in, you probably are looking for slurpy which just downloads the aur tarball and lets you figure out what to do with it.
True, but it's more like an option request than anything. No one, or at least few enough people, would realistically use it during large updates with plenty of dependencies, yet it's there for those that rightfully don't like blindly sourcing foreign code.
Offline
olegchir wrote:bruenig, can you add support for --skipinteg? (or maybe it can be globally overriden somewhere?)
Adding support for it would be trivial, I just don't know why. Like, are you wanting to skip integrity checks for things you download off the aur?
Exactly
There's a lot of packages with wrong md5 or without it at all... beginning from yaourt itself
Offline