about this fakeroot stuff I don't have a clue, i'm building as root at the moment and I guess I always used makepkg as root also,
is that not good?
EDIT: It looks like you are just building packages as root. You might want to spawn a subprocess that assumes permissions of a user, and then builds under fakeroot.
Maybe have the user specified in some pypac config file or something...
I've fixed a few things in libpysrc-0.1.9 and also added support for building without md5sum, I'll take a look on your patch later tonight, I'm going for a run in the park now so maybe I feel to lazy afterwards,
I've just used lazy-pac to run an update with gcc, glibc and a few other things and then I installed rxvt-unicode from source and everything seems to work so it should be closing in on first stable version 0.2.0 8)
]]>cactus, one goal I had with libpypac/libpysrc was that they should _NOT_ depend on pacman/makepkg,
it should be a complete standalone implementation of ABS,
I kind of figured. Just remove the passthrough function then. I think the directory find implementation might be useful..
With that in mind, I will see what else I can scratch together to assist in the code.
]]>it should be a complete standalone implementation of ABS,
]]>this is what I did this evening..
It took me bloody forever to figure out how to read the stdoutput and stderr from a spawned process, without it blocking until all the output was done..silly python.
Finally got it figured out..
The diff is against libpysrc.py-0.1.8. It contains a much shorter find function, and a "passthrough" function.
The passthrough does what its name suggests. It passes through a directory to work in, and a set of flags to makepkg. The output is snagged as soon as it occurs, and simply printed out in this case. It would be easy to send that text somewhere else though...
Here is the magic goodness
Note: I use tabs, so convert tabs to spaces first if you are an evil space user... :twisted:
heh..and here is a screenshot.
The test script just had the following:
passthrough("/home/build/bwbar","-of")
Now I only need to finish off libpysrc, I'm a little clueless on how to run the PKGBUILD from Python...
If you want to use the bash version of makepkg, and simply have libpysrc be a wrapper for it, I don't think it would be too hard.
Two possibilities I can think of offhand: go to the dir in question, spawn a bash shell, and have it do all the work. Just have libpysrc pass appropriate args, and return std output and error to the python script for display.
The other possibility would be to have lipysrc do it all by hand, basically mimicing the functionality of makepkg, but in python...
It looks like you have started down the road of solution #2, but solution #1 might be easier...
what do you think? I can help with either one if you want...
EDIT: xerxes..I shortened up your exist_check function in libpysrc to 7 lines..10 if you count the comments..
]]>it doesn't took that long either, phrak is taking the time isn't he...
heh..yeah. I bet he was using a stopwatch, and writing incremental time units on a whiteboard somewhere. :twisted:
]]>works like a dream, new versions are uploaded, 8)
I knew you should do it,
it doesn't took that long either, phrak is taking the time isn't he...
]]>from ftplib import FTP
ftp = FTP('ftp.archlinux.org')
ftp.login()
filepath="current/os/i686/"
ftp.cwd(filepath)
timestamp=ftp.sendcmd('MDTM current.db.tar.gz')
print timestamp
All it took was a little ethereal packet sniffing to determine the corrent ftp protocol command to send.
and the output...
(eliott@tungsten temp)$ python2.4 test.py
213 20050426160932
I've been reading the whole ftp standards today but I can't find these little tweaks in there,
]]>*xerxes starts up vim and starts coding*
]]>