You are not logged in.
Info page: http://xyne.archlinux.ca/projects/pbget
edit: updated post with current information
pbget is a command-line tool for downloading PKGBUILDs and local source files from the Arch Linux Git interface, the AUR, and the ABS tree
Last edited by Xyne (2012-03-08 23:25:21)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
*bump*
Added the "--upgradable" option which will retrieve taurballs for all upgradable core/extra/community/testing/aur pkgs.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
If you have ShowSize enabled in pacman.conf pbget --upgradable tries to download the size of the packages.
--> including upgradable packages
--> ntp
--> [0.55
--> MB]
--> searching for ntp in core/extra
pacman -Qu
Targets (1): ntp-4.2.4p6-2 [0.55 MB]
Offline
*bangs head on desk*
I really wish I could just
a) use alpm directly
b) find some magical pacman option to spit out what I want
Until I learn how, I'm stuck hacking through pacman output.
Thanks for letting me know, bluewind. I'll see what I can do.
*edit*
It should be fixed now. Please update pbget and let me know if it works.
Last edited by Xyne (2009-03-22 13:01:49)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I just tested 'pbget --upgradable --aur' and it works great. It may be helpful to have a "check only" option just to take a quick glance at what's out of date also.
Great work Xyne.
Offline
I just tested 'pbget --upgradable --aur' and it works great. It may be helpful to have a "check only" option just to take a quick glance at what's out of date also.
Great work Xyne.
dto.
Anyway: very very nice . Was looking for this for months...
Offline
Hey Xyne,
Could you please look into the bug mentioned on the AUR page for your package? http://aur.archlinux.org/packages.php?ID=23848 (not downloading *.sh files)
I experience it when grabbing Eclipse. Thanks
Offline
@Ranguvar
It should work now. I have no idea why I haven't been receiving comment notifications for pbget. Hopefully "UnNotify" -> "Notify" will fix that.
Just for reference, until the SVN web interface is extended to community packages, you need to use "--abs" for them.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks for that.
And since the SVN interface now exists for [community], can you modify pbget to work with that (without ABS)?
`pbget ncmpcpp` fails, even though the SVN ViewVC for that package can be found here: http://repos.archlinux.org/viewvc.cgi/n … =community
Offline
done, thanks
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
awesome
aurget pbget
rm -f ~/bin/aurget
edit: crap, it needs bash-xyne-common_functions and I just deleted my aurget
Last edited by iphitus (2009-09-13 02:59:36)
Offline
Wow, that was fast. Thanks!
Offline
I only had to tweak the code for core/extra to get community working (not sure why they didn't make the interface options identical).
I've also made bash-xyne-common_functions an optdepend.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Works well, I badly needed something to replace my little script. Nice to have a uniform interface for both aur/repos.
though...
iphitus(~/src)$ pbget --aur chromium-snapshot
--> searching for chromium-snapshot in core/extra
--> searching for chromium-snapshot in community
Should that be trying to get chromium snapshot off AUR? The --aur-only option works as expected.
Offline
I removed that code by mistake when ripping out the old [community] code. It should work as expected again.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I've also made bash-xyne-common_functions an optdepend.
Actually, you made it an optdepend in addition to a depend. You might want to fix that
Offline
Xyne wrote:I've also made bash-xyne-common_functions an optdepend.
Actually, you made it an optdepend in addition to a depend. You might want to fix that
Xyne, you will be docked 10% of your Arch T.U. pay over this effective immediately.
Offline
ataraxia wrote:Xyne wrote:I've also made bash-xyne-common_functions an optdepend.
Actually, you made it an optdepend in addition to a depend. You might want to fix that
Xyne, you will be docked 10% of your Arch T.U. pay over this effective immediately.
al·so
adv.
1. In addition; besides.
2. Likewise; too: If you will stay, I will also.
conj.
And in addition: It's a pretty cat, also friendly.
Oh look, a tree!
*removes the dependency and begins to whistle casually, hoping he won't lose 10% of his monthly taco ration*
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
With the recent changes to the SVN interface, it appears that all repos have broken (AUR still works fine), if you have time to fix it
It now lets you download a .tar.gz of all files, that'd probably be the way to go..?
Offline
I now use a bash function as replacement for pbget. Probably, you are intereseted...
pbget() {
local extract
[[ "$1" = "-x" ]] && extract=1 && shift
local pkgname="${1##*/}"
if [[ "$pkgname" = "$1" ]]; then
local repos=(testing core extra community-testing community aur)
else
local repos=(${1%%/*})
fi
for repo in ${repos[@]}; do
local url
case "$repo" in
aur)
url="http://aur.archlinux.org/packages/$pkgname/$pkgname.tar.gz"
;;
community-testing|community)
url="http://repos.archlinux.org/wsvn/community/$pkgname/repos/$repo-$(uname -m)/?op=dl&rev=0&isdir=1"
;;
testing|core|extra)
url="http://repos.archlinux.org/wsvn/packages/$pkgname/repos/$repo-$(uname -m)/?op=dl&rev=0&isdir=1"
;;
*)
echo "Unknown repository. Exiting..."
return 1
;;
esac
wget -O "$pkgname.tar.gz" "$url"
if [[ ! -s "$pkgname.tar.gz" || "$(file -bp --mime-type "$pkgname.tar.gz")" = "text/plain" ]]; then
rm -f -- "$pkgname.tar.gz"
else
break
fi
done
if [[ ! -f "$pkgname.tar.gz" ]]; then
echo "Package \`$pkgname' does not exist in the repositories. Exiting..."
return 1
fi
# extract downloaded file
if [[ -n "$extract" ]]; then
mkdir "$pkgname"
bsdtar xkf "$pkgname.tar.gz" --strip-components 1 -C "$pkgname"
rm -f -- "$pkgname.tar.gz"
cd "$pkgname"
fi
}
edit: I should probably give some examples how to use it:
$ pbget pacman
Will search for pacman in the following repos (testing core extra community-testing community aur) and takes the first pacman it finds. So, if there is a pacman package in testing, it would use this one.
$ pbget core/pacman
Get the PKGBUILD of the pacman package in core.
$ pbget -x core/pacman
Get the PKGBUILD of the pacman package in core, extract the tarball (and delete it) and change into the directory which contains the extracted PKGBUILD.
Last edited by xduugu (2009-10-20 00:17:24)
Offline
I assume the functionality of pbget is just broken currently? About the only thing it does properly for me is pbget --aur-only
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
[core] and [extra] still worked. Everything else was falsely detected in one of those without the "--aur-only" option.
It should be fixed now.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks, it works now with community/AUR packages.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
pbget can no longer retrieve PKGBUILDs from SVN. I think it's related to this.
Offline
pbget can no longer retrieve PKGBUILDs from SVN. I think it's related to this.
I'm not sure. The website links haven't changed. It seems to be a server problem. Go to a package page and click on the download link, e.g.:
pacman -> download
All it displays is "Unable to create a temporary directory.".
I have filed a bug report. Once I know more I will update pbget if necessary.
In the meantime, use the "--abs" option to retrieve files via rsync.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline