/srv/irclogs.ubuntu.com/2007/07/25/#ubuntu-installer.txt

=== mirkobuholzer [n=mirko@c-67-170-232-232.hsd1.ca.comcast.net] has joined #ubuntu-installer
=== ubuntulog [i=ubuntulo@trider-g7.fabbione.net] has joined #ubuntu-installer
=== Topic for #ubuntu-installer: Development of d-i and ubiquity in Ubuntu | http://wiki.ubuntu.com/InstallerDevelopment
=== Topic (#ubuntu-installer): set by cjwatson at Fri Jan 5 15:12:40 2007
=== Starting logfile irclogs/ubuntu-installer.log
=== ubuntulog [i=ubuntulo@ubuntu/bot/ubuntulog] has joined #ubuntu-installer
=== Topic for #ubuntu-installer: Development of d-i and ubiquity in Ubuntu | http://wiki.ubuntu.com/InstallerDevelopment
=== Topic (#ubuntu-installer): set by cjwatson at Fri Jan 5 15:12:40 2007
(cjwatson/#ubuntu-installer) tepsipakki: you might be interested to hear that I think I've fixed that old pkgsel hand04:34
(cjwatson/#ubuntu-installer) hang04:34
=== superm1 [i=malimonc@ubuntu/member/superm1] has joined #ubuntu-installer
superm1evand, over the weekend i caught some unfortunate ramifications of cjwatson's changes on the mythbuntu files to True/False from "yes"/"no".  I just pushed up the resolutions to it.  Would you be able to merge them back in?04:41
evandsuperm1: those were my changes04:49
evandbut I shall take a look momentarily04:49
superm1oh, i didn't look at the parent for it closely04:51
superm1well irregardless, i had to make one minor change to filteredcommand.py, but it shouldn't break anything else.04:52
evandyes, I'm looking at that now.  Why wouldn't you want the data to be UTF-8 encoded?04:54
cjwatsonblink, please be careful messing with the UTF-8 stuff there :)04:55
evandindeed04:55
cjwatsonthat's the product of a lot of tedious bug-fixing related to Kubuntu04:55
cjwatson(Qt is insanely picky about encoding)04:55
superm1well if its bool04:55
superm1you can't UTF-8 encode it04:55
evandsuperm1: you can only preseed strings04:56
cjwatsonyou should turn it into a string04:56
cjwatsonsnap04:56
superm1well that was the original thing I had with the "yes"/"no", which was because i thought you could only preseed strings04:56
cjwatsoninternally in python stuff should be True/False04:57
superm1things appear to work correctly with the bool though04:57
superm1with that change on filteredcommand.py04:57
cjwatsonwhen interacting with debconf, you should turn it into "true"/"false" (debconf booleans) or whatever else is appropriate04:57
cjwatsonwhere's this branch?04:58
superm1one sec i'll grab a link04:58
superm1here is the LP page: https://code.launchpad.net/~mythbuntu/mythbuntu/ubiquity04:59
cjwatsonoh, that's right, it's not flagged as a branch of ubiquity so it doesn't show up on code.lp.net/ubiquity05:00
superm1oh, how do i flag it as a branch of ubiquity?05:00
evandsuperm1: I'd prefer to avoid modifying the core bits of Ubiquity when unnecessary.  Changing your code to preseed "true" in the case of True, and "false" in the case of False should be relatively straightforward anyway.05:00
superm1will debconf convert a string that is "true" to a boolean True then?05:01
cjwatsonbtw, you should make your own changes in separate commits to merges05:01
cjwatsonbrowsing history is painful when you violate that rule05:01
superm1i'll make sure to do that in the future05:02
cjwatsonI agree with evand - I think that change is a mistake and it's not how the rest of ubiquity does it05:02
cjwatsonno, debconf won't convert it, frequent idioms are things like value = (db.get("foo/bar") == "true")05:02
cjwatson(the confmodule doesn't really know the type, you see)05:03
superm1right05:03
cjwatsonand nor does filteredcommand for that matter, at least not without inefficiency05:03
superm1well is the only reason that boolean types couldn't be preseeded because of that UTF-8 encoding?05:03
superm1or is there more to that05:04
cjwatsonthere's more to it05:04
evandsuperm1: debconf doesn't understand datatypes, just plain old strings.05:04
cjwatsonTrue won't be automatically converted to "true" by anything05:04
cjwatsonI think I would say rather that there is no mapping from Python data types to debconf data types other than strings.05:04
cjwatsonother than via strings05:05
superm1which would explain why there was a difference for True/true by what debconf got05:05
cjwatsonand since boolean is the only case where there could even really be a convenient mapping, it's not really worth the infrastructure it would take to do it right05:05
superm1when i thought there was a bool "datatype"05:05
cjwatsonat the level of language bindings ("confmodules"), type isn't known unless you do another round trip to the debconf frontend to ask it05:06
cjwatsonall it sees is <-- GET foo/bar --> 0 true05:06
cjwatsonbut foo/bar could be a string for all it knows ...05:06
cjwatsonor select or whatever05:06
superm1right.  so the type described in a template is only used when you present the user the question05:07
cjwatsonin order to find out the type you need to do METAGET foo/bar Type05:07
superm1that makes more sense05:07
cjwatsonpretty much, yeah05:07
cjwatsonubiquity looks up the type when it needs to do "frontend-like" logic05:08
cjwatsonso for instance in the Partman component it looks up the question type and has default handling for boolean questions that get asked05:08
cjwatson(pop up dialog with go back / continue buttons)05:08
cjwatsonbut note that to get the answer back it just does:05:09
cjwatson            if answer:05:09
cjwatson                self.preseed(question, 'true')05:09
cjwatson            else:05:09
cjwatson                self.preseed(question, 'false')05:09
superm1which makes more sense for that area05:09
cjwatsonnow, if you want that to be more convenient, I wouldn't object to a preseed_boolean method in filteredcommand05:09
cjwatsonI think that would probably make sense05:09
superm1what else would need to be done to enable that preseed_boolean method to work then?05:10
cjwatsonnothing, just use it05:10
cjwatsonso instead of the above:05:10
cjwatson            self.preseed_boolean(question, answer)05:10
superm1and then the True/False are used and stored to debconf05:10
cjwatsonwould just be a convenience wrapper05:10
superm1well that's a pretty easy change for me to make then05:11
cjwatsonit would turn its argument into 'true' or 'false' as appropriate and preseed that05:11
superm1well to True/False, not 'true'/'false' though05:11
cjwatsonno] 05:11
cjwatsonthat would be wrong05:11
superm1oh you mean in the wrapper, it should preseed the string 'true' or 'false'05:12
evandcorrect05:12
superm1gotcha.   that sounds like a good consensus to settle upon.05:12
evandhrm, the gobuntu community grew from nothing to being more active than plenty of other MLs pretty quickly.05:12
cjwatsonsimilarly a value_boolean method would be OK to translate in the other direction, if there's call for it05:13
superm1i'll ping you  guys later tonight or tomorrow when i rework it and test it05:13
evandthanks superm105:13
cjwatsonthere are no other users for that as yet though05:13
cjwatsoncorrection, one other potential user05:14
cjwatson(summary.py, the popcon bit)05:14
evandwow...so I'm banging my head against a wall trying to figure out why the interface never shows any of the pages when using --automatic mode and testing its interaction with my graceful page skipping work.  And then it hits me.  I answered all of the questions.06:00

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