/srv/irclogs.ubuntu.com/2013/07/30/#ubuntu-release.txt

=== james_ is now known as Guest88169
=== henrix_ is now known as henrix
=== Ivanka_ is now known as Ivanka
cjwatsoninfinity: I notice you're using subprocess.check_output in buildrecipe now.  Doesn't launchpad-buildd need to stick to features that were in Python 2.5 until we upgrade off lucid?09:09
cjwatsonEr, hardy I mean09:09
cjwatsonlucid had 2.6; subprocess.check_output is new in 2.709:09
cjwatsoninfinity: Also, did you intentionally drop the "apt-get clean" from debian/launchpad-buildd.cron.daily?  The commit message didn't mention it.09:13
infinitycjwatson: Oh, I didn't realize check_output was new.  Bother.09:56
infinitycjwatson: And yes, I dropped the pointless apt-get clean.  lp-buildd has no business dealing with the host's apt.09:57
infinitycjwatson: Do you have a pre-2.7 recommendation for check_output-like functionality?09:58
infinitycjwatson: Hrm, os.popen.read, perhaps?10:02
cjwatsonGod, no, don't use os.popen.10:05
infinitycjwatson: *smirk*10:06
cjwatsonsubprocess.Popen(stdout=subprocess.PIPE).communicate()[0] is probably the best answer10:06
infinitycjwatson: I'm just looking for a quick-n-dirty backtick equivalent, not the most robust and complex subprocess control setup evar.10:06
cjwatsonThough it wouldn't hurt to assign the Popen object to a variable so that you can check .returncode after calling .communicate.10:07
infinityPython amuses me.  The number of times I hear "oh god, don't use that method", when something shinier comes along, why don't they just rewrite the old to use the new, rather than point and laugh at you for using the wrong thing? :P10:09
cjwatsonSo maybe something along the lines of http://paste.ubuntu.com/5928451/, entirely untested.10:09
cjwatsonWell, it's more that os.popen is lower-level.10:10
infinityThat's certainly more unreadable.  Progress. ;)10:10
infinitycjwatson: I'm struggling to see what's wrong with low-level.  What could be lower-level than forking another process and checking its output?10:10
infinityPretty sure that $() isn't all that fancy and high-level.10:11
cjwatsonThe above paste really is wrong.  One moment.10:11
infinityBut, meh.10:11
infinity(I was going to just use os.popen and comment out the "this should actually be this, when we have 2.7+" line)10:11
cjwatsonhttp://paste.ubuntu.com/5928455/ - better.10:12
cjwatsoninfinity: You're saying this to the guy who got fed up of doing that in C and wrote libpipeline ...10:12
=== doko_ is now known as doko
infinityI wish I hadn't deleted all my hardy chroots.10:14
infinityBut I don't wish that hard enough to recreate them.10:14
cjwatsonI suspect the real reason os.popen is deprecated rather than fixed is a combination of (a) hard to make cross-platform (b) interfaces that take strings as commands rather than lists are fundamentally evil10:14
cjwatson(Although maybe (a) is wrong since the documentation says it works on Windows.)10:15
infinitycjwatson: A string is perfectly reasonable if you're passing it to "sh -c", but that returns to the "not cross-platform".10:15
infinityMaybe there's a cmd.exe -c equivalent (or some functionality provided by rundll or something)10:16
* infinity shrugs.10:16
cjwatsonInterfaces that take strings are the root of many security holes.10:17
infinityProgrammers who don't do input validation are the root of many security holes.10:17
infinityAnyhow.  Doesn't matter to me either way.  And I'm too sick to have religious debates.10:18
infinitycjwatson: If that pastebinned diff works as a quick copy-and-paste-and-replace-the-chroot-path-with-a-string snippet, commit away.10:19
infinityAnd given the hasty addition of PIPE to your import in the second try, I assume you did actually test it. ;)10:20
infinitycjwatson: I actually started out with basically that (since Popen was already imported), got lost when various stdout=PIPE examples blew up in my face, and never get to the point of learning until now that PIPE was a thing I needed to import.10:22
infinitys/get/got/10:22
cjwatsonI usually spell it subprocess.PIPE, which is clearer, but I was going with the prevailing style here.10:28
cjwatsonCommitted.10:28
=== Ivanka_ is now known as Ivanka
phillwHi folks, just a quick note to say that the links at http://iso.qa.ubuntu.com/qatracker/milestones/254/builds/37582/downloads are reporting 40417:09
cjwatsonThat's hardly surprising17:09
cjwatsonWe only keep daily builds around for a couple of days17:10
cjwatsoniso.qa.ubuntu.com is not a persistent way to get at images after they've finished their testing cycle17:11
cjwatsonUbuntu 12.04.2 server amd64 is here: http://releases.ubuntu.com/12.04.2/17:11
phillwcjwatson: thanks colin, I need to re-grab it.17:14
=== shadeslayer_ is now known as shadeslayer

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!