Pbget: ABS and AUR PKGBUILD etc retriever
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)
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)
Similar Messages
-
Trouble compiling games from ABS and AUR (solved)
Hi I hope someone can help me. Ive downloaded the tar.gz for drascula from ABS unzipped it and when I try to run makepkg -s I get the error that scummvm 0.12 not found in sync db. I installed the scummvm from ABS manually same error. I then saw it was version 0.11.1 so I uninstalled it and downloaded the correct version from sourceforge. I installed it with ./configure --prefix=/usr/local then make then install. It installed sucessfully as it runs fine but I still recieve the same error when running makepkg -s. What am I doing wrong?
Last edited by itsgregman (2008-09-24 16:12:04)Welcome to the forums.
Since you installed it manually, pacman doesn't know it's there. The best way to this would have been to edit the scummvm PKGBUILD then install it with pacman. Usually you just need to change the pkgver line to the new version and comment out the md5sums line.
It's always best to use packages in Arch. You'll forever be running into problems like this if you don't. -
when i download a package from pacman is it compiling source or fetching a binary?, also is this the same with yaourt and the aur?
what is abs used for?Cew27 wrote:what binaries does arch use? i am only aware or rpm packages and debian
arch uses its own .pkg.tar.gz binaries, which are basically just tar.gz archives. -
Replacing Firefox 3.6.16 containing my history, bookmarks etc by version 4.0, I find that it will not open on my Mac Power PC G4 running on OS 10.4.11. Is there is a compatibility problem and how do I retrieve version 3.6 with my bookmarks etc.
Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
When you install one of the above it will use your existing bookmarks etc -
Hi all,
I noticed that qbzr had become unmaintained and in fact wouldn't install via the AUR PKGBUILD file as the source download link had become obsolete.
I took ownership of the package, then downloaded, updated, targz'd and submitted the new archive. However, it still doesn't seem to be quite right.
If I download the PKGBUILD , I can now makepkg and then pacman -U without trouble. (v0.18)
However, using yaourt - yaourt gets the version info etc from the PKGBUILD file I think, as it displays the intended version correctly (0.18). However it then downloads qbzr.tzr.gz, within which is the PKGBUILD file of version (0.16).
I feel I must have missed something, but I can't figure out how when I submitted qbzr.tar.gz AUR was able to correctly extract the PKGBUILD file for display but not provide the correct qbzr.tar.gz
Perhaps there is a lag in file propagation that I have been previously unaware of?
Cheers
Last edited by thread (2010-02-08 03:28:35)thread wrote:However it then downloads qbzr.tzr.gz, within which is the PKGBUILD file of version (0.16).
there's nothing wrong with the tarball, so i'm not sure why you think it's not an issue/bug/problem/etc with yaourt..
$ wget http://aur.archlinux.org/packages/qbzr/qbzr.tar.gz
$ bsdtar xf qbzr.tar.gz
$ grep ^pkgver= qbzr/PKGBUILD
pkgver=0.18
Last edited by tdy (2010-02-05 05:04:08) -
Its bad enough That the music purchased if protected from ME Albums I purchased thinking they were safe on a cloud I can no longer Retrieve Not available in my country I think I should get a refund so I can purchase it on Amazon
Yes your absolutely right I should have backed it up thankfully I never feel for the iTunes Match cause then I would have lost it . And thankfully there is Google Play , Amazon and several superior services .Thankfully I didn't use iCloud or the apple cloud. I backed all my music onto Amazon and as a safety measure Dropbox and my own cloud ( wdex8 which failed) .
My first desktop over 28years ago was a Macintosh floppy disk as well as my first laptop and smartphone, routers etc all Apple . I Too made excuses for Apples failures . "The next release will fix that problem" I doubt my last computer device will be made by Chinese slaves your reply set me straight. Pompous BS My son wants the new Galaxy I argued with him tomorrow he can pick out anything he wants he not an apple picker your on an apple try spellchecker -
I am retrieving high and low limits from step results in VB code that looks something like this:
' (This occurs while processing a UIMsg_Trace event)
Set step = context.Sequence.GetStep(previousStepIndex, context.StepGroup)
'(etc.)
' Get step limits for results
Set oStepProperty = step.AsPropertyObject
If oStepProperty.Exists("limits", 0&) Then
dblLimitHigh = step.limits.high
dblLimitLow = step.limits.low
'(etc.)
So far, so good. I can see these results in
VB debug mode.
Immediately after this is where I try to put the limits into the results list:
'Add Limits to results
call mCurrentExecution.AddExtraResult("Step.Limits.High", "UpperLimit")
call mCurrentExecution.AddExtraResult("Step.Limits.Low", "LowerLimit")
(No apparent errors here while executing)
But in another section of code when I try to extract the limits, I get some of the results, but I do not get any limits results.
That section of code occurs while processing a UIMsg_EndExecution event and looks something like this:
(misc declarations)
'Get the size of the ResultList array
Call oResultList.GetDimensions("", 0, sDummy, sDummy, iElements, eType)
'Step through the ResultList array
For iItem = 0 To iElements - 1
Dim oResult As PropertyObject
Set oResult = oResultList.GetPropertyObject("[" & CStr(iItem) & "]", 0)
sMsg = "StepName = " & oResult.GetValString("TS.StepName", 0) & _
", Status = " & oResult.GetValString("Status", 0)
If oResult.Exists("limits", 0&) Then
Debug.Print "HighLimit: " & CStr(oResult.GetValNumber("Step.Limits.High", 0))
Debug.Print "LowLimit: " & CStr(oResult.GetValNumber("Step.Limits.Low", 0))
End If
'(handle the results)
Next iItem
I can get the step name, I can get the status, but I can't get the limits. The "if" statement above which checks for "limits" never becomes true, because, apparently the limit results never made it to the results array.
So, my question again is how can I pass the low and high limit results to the results list, and how can I retrieve the same from the results list?
Thanks,
GriffGriff,
Hmmmm...
I use this feature all the time and it works for me. The only real
difference between the code you posted and what I do is that I don't
retrieve a property object for each TestStand object, instead I pass the
entire sequence context (of the process model) then retrieve a property
object for the entire sequence context and use the full TestStand object
path to reference sub-properties. For example, to access a step's
ResultList property called "foo" I would use the path:
"Locals.ResultList[0].TS.SequenceCall.ResultList[].Foo"
My guess is the problem has something to do with the object from which
you're retrieving the property object and/or the path used to obtain
sub-properties from the object. You should be able to break-point in the
TestStand sequence editor immediately after the test step in question
executes, then see the extra results in the step's ResultList using the
context viewer.
For example, see the attached sequence file. The first step adds the extra
result "Step.Limits" as "Limits", the second step is a Numeric Limit (which
will have the step property of "Limits") test and the third step pops up a
dialog if the Limits property is found in the Numeric Limit test's
ResultList. In the Sequence Editor, try executing with the first step
enalbled then again with the first step skipped and breakpoint on the third
step. Use the context viewer to observe where the Limits property is added.
That might help you narrow in on how to specify the property path to
retrieve the value.
If in your code, you see the extra results in the context viewer, then the
problem lies in how you're trying to retrieve the property. If the extra
results aren't there, then something is wrong in how you're specifying them,
most likely a problem with the AddExtraResult call itself.
One other thing to check... its hard to tell from the code you posted... but
make sure you're calling AddExtraResult on the correct execution object and
that you're calling AddExtraResult ~before~ executing the step you want the
result to show up for. Another programmer here made the mistake of assuming
he could call AddExtraResult ~after~ the step executed and TestStand would
"back fill" previously executed steps. Thats not the case. Also, another
mistake he made was expecting the extra results to appear for steps that did
not contain the original step properties. For example, a string comparison
step doesn't have a "Step.Limits.High" property, so if this property is
called out explicitly in AddExtraResult, then the extra result won't appear
in the string comparison's ResultList entry. Thats why you should simply
specify "Step.Limits" to AddExtraResul so the Limits container (whose
contents vary depending on the step type) will get copied to the ResultList
regardless of the step type.
I call AddExtraResult at the beginning of my process model, not in a UI
message handler, so there may be some gotcha from calling it that way. If
all else fails, try adding the AddExtraResult near the beginning of your
process model and see if the extra results appear in each step's ResultList.
Good luck,
Bob Rafuse
Etec Inc.
[Attachment DebugExtraResults.seq, see below]
Attachments:
DebugExtraResults.seq 20 KB -
Include PKGBUILD etc. in actual packages?
I'm sure this must have been asked or requested before, but couldn't find any trace of it, so here goes:
Would it not be helpful under various circumstances to have all the building stuff for a package (i.e. that which you would find in the abs directory) included (say, as .abs) in each package? This would make building your own repositories easier - no need to build an abs directory for them. It might help tweaking of old packages easier, when for some reason you can't use the latest build stuff. No problems syncing abs with your actual installed files ...
Are there good reasons for not doing this (apart from a minimal increase in package size)? To implement it should be very easy - just a tweak to makepkg.I see nothing beneficial that cannot be gleened from what abs gives you - PKGBUILDs are stored in CVS, so you can always view old packages.
The reason for not doing it is, obviously, the overcomplication. Also, it makes logical sense to have source and binary seperate - not much point to include build instructions in a package if they're never needed (i.e. a production server). It has nothing to do with size, it has to do with the fact that it's not needed. -
i lost my iPhone recently and how can i retrieve it using my Apple ID? also, how to turn icloud on using Itunes even if the phone's lost?
Unless you had enabled Find My iPhone on it before it was lost then there isn't any way to locate it (it can only be turned on directly on the phone, it can't be done remotely). If you did enable it then you could try locating it either via http://icloud.com on a computer or Find My iPhone on another device - but that will only work if it's connected to a network and the device hasn't already been wiped and/or Find My iPhone disabled on it.
If you think that it was stolen then you should report it to the police. You should also change your iTunes account password, your email account passwords, and any passwords that you'd stored on websites/emails/notes etc. -
I have an apple ID, I'm trying to use this to update and download apps etc. however, whenever I try this, it keeps asking me to use my old ID, which is attached to an email that no longer exists! I can't download or update anything! Help!
You can log out of the currently logged in account by taping on the id in Settings > Store (Settings > iTunes & App Stores on iOS 6) and you can then log back in.
If you updated your existing account with a new email address then that shoud 'refresh' it on it
If you created a new account then any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can redownload its content and download updates to its apps. You should be able to update an account's email address via this page : http://appleid.apple.com -
I have just bought a new iphone 4 as an upgrade to my iphone 3GS. How can I transfer all my apps including saved levels in games etc. and data and folders to the new iphone 4 and keep facetime etc on the new iphone 4. When I have done this for someone else they got all their data etc but lost the Face Time App and teh iphone 4 looked like the iphone 3 screen.
There is no FaceTime app for the iphone, FaceTime is built into the iOS. Follow the directions here:
http://support.apple.com/kb/HT2109 -
At night, as soon as I plug my iphone to be recharged, my iphone starts behaving anomaly. It is like somebody has taken control of it. I see the screens moving, music starts playing and then stopping, etc. I have noticed that several nights. What I do is in Settings is to change into Plane Mode, thinking that, may be if I do that, somebody that has taking control of it will not be able to download data. Yesterday night, I was awakened by an alarm, whose setting I did not changed. When I looked over, the alarm screen changed to Settings and the Plane Mode changed alone in front of my eyes, from on to off.
I have not observed such a situation during the day. Only when I plug the cable.
I suspected that may be there is no Trojan installed. May be the cable, which is a spare cable, has been modified by a hacker, and it has electronics installed in the connector. But tested with the original cable, and the behavior was the same, as described above.Thanks Meg for your reply.
It could be that both cable are bad. But, anyway, you would not expect any of these manifestations, even with a bad cable. I had bad cable for my 4s, and never saw such a thing!
I contacted by chat the support of Apple. They told me that this behavior could be a software problem and recommended me to do a full recover of my iphone. That meant, putting in at the factory conditions and recup all the data from the backup. I did that, and the behavior did not change. The backup was made with the data of my PC, not icloud. Tomorrow will try with icloud and check if that will work. -
Using ABS and Sum function at a time
<?if: sum(ARCH_AMT)!='0' ?>
we were using above condition in the template to restrict data till date,but we were facing a new problem when ARCH_AMT is having multiple lines with same amount but +ve and -ve i.e 500,-500 it's doing sum and not returning data since sum would be zero.
we need to do ABS(ARCH_AMT) before doing sum so that SUM will be thousand and data will be picked up.
please suggest how can we have ABS and sum at a time
i tried
<?if: sum(ABS(ARCH_AMT))!='0' ?> and also choose conditions and It's not working.
thanks in advance.
Kind Regards,
Mahi
Edited by: mahi4luck on Mar 28, 2012 2:33 AMstore ABS(ARCH_AMT) in a variable, and use that variable in a running total
example:
suppose i have an xml structure like this:
<CATALOG>
<AMOUNT>
<ARCH_AMT>-500</ARCH_AMT>
</AMOUNT>
<AMOUNT>
<ARCH_AMT>500</ARCH_AMT>
</AMOUNT>
</CATALOG>
<?xdoxslt:set_variable($_XDOCTX,'vTotal',0)?>
<?xdoxslt:set_variable($_XDOCTX,'vAbsAmt',0)?>
<?for-each:AMOUNT?>
<?xdoxslt:set_variable($_XDOCTX,'vAbsAmt',xdoxslt:abs(ARCH_AMT))?>
<?xdoxslt:set_variable($_XDOCTX,'vTotal', xdoxslt:get_variable($_XDOCTX, 'vAbsAmt') + xdoxslt:get_variable($_XDOCTX,'vTotal'))?>
<?end for-each?>
Total: <?xdoxslt:get_variable($_XDOCTX, 'vTotal')?> -
when I try to print, I get this error message "Communications Failure: The computer is no longer able to communicate with your printer. " followed by intruictions to turn off the printer and check connections etc. I am using an HP Officejet 6500 709e, connecter wirelessly
I'm using a mac (OS X - snow leopord) and am printing over the network (wirelessly).
HP Photosmart Premium Fax All in One - C410a
I was only able to print one page and then both my printer and my computer would display an error message about the printer's inability to print. Since then I've been able to resolve my specific problem.
I
1. uninstalled HP from my computer (checked to ensure that my printer was no longer visible in my printers and the HP Utility software was nowhere to be found),
2. grabbed the software/driver update from Aug, 2010,
3. installed the Aug, 2010 update, and my problems seem to have been fixed.
This is where I got my 2010 update from (obviously you should get the driver/software applicable to your OS and specific printer):
http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=mp-85379-1&cc=us&dlc=en&lc=en&... -
Need a little help my computer hard drive crashed and I bought a new computer and would like to retrieve my many songs that I paid for and upload them to my new computer how Retrieve my music t thank you
Either restore it from a backup, or use these instructions to redownload it through the iCloud.
(84741)
Maybe you are looking for
-
Qosmio X505 Hardware Lockups: 3 for 3
Hello, Toshibers-- I bought a Qosmio X505-Q870 from Fry's last Saturday. After about 12 hours of use, it locks up. Hard lock up: No mouse, no keyboard, nothing. After the second lockup in a few hours, I took it back. I got the replacement Sunday nigh
-
Hi All, Is their any way we can just upgrade the app server from 10.1.2 to 10.1.3 with uninstalling the older 10.1.2 and reinstalling 10.1.3 ? Thanks Raghavendra
-
MOVED: MSI Live Update not working Windows XP Professional 64bit Edition!!!
This topic has been moved to Operating Systems. MSI Live Update not working Windows XP Professional 64bit Edition!!!
-
I need the stored documents from a BP from a CRM Systems displayed in the VC. But I can´t find a BAPI that returns this documents. Has anyone an idea? the Task ist, to show a list of BP in a table view and if you select one, the detailed data includi
-
My Firefox android app, with data, is over 130MB.
My Firefox android aap has become so big that I can't install any other apps. The data storage used is: Total 131MB App 28.78MB Data 103MB Is there a way to reduce those data file sizes without just deleting all the data? Thanks