/srv/irclogs.ubuntu.com/2007/03/29/#ubuntu-installer.txt

=== rrittenhouse [n=tad@unaffiliated/rrittenhouse] has joined #ubuntu-installer
=== mgalvin [n=mgalvin@ubuntu/member/mgalvin] has joined #ubuntu-installer
=== mgalvin [n=mgalvin@ubuntu/member/mgalvin] has joined #ubuntu-installer
=== cr3 [n=marc@pdpc/supporter/bronze/cr3] has joined #ubuntu-installer
=== avoine [n=avoine@modemcable056.3-203-24.mc.videotron.ca] has joined #ubuntu-installer
=== mgalvin [n=mgalvin@ubuntu/member/mgalvin] has joined #ubuntu-installer
CIA-16migration-assistant: evand * r46 migration-assistant/ (ma-ask ma-script-utils registry.c): order of operations fix.06:16
CIA-16migration-assistant: evand * r47 migration-assistant/debian/changelog: Releasing 0.4.306:17
evandcjwatson: can you push out m-a 0.4.3?  It doesn't fix the fact that Documents and Settings doesn't get translated, but that will be done in the next build.06:18
evandThere are a few other bugs that I wanted to make sure I got a fix out the door for first, which is what this release is.06:18
=== jetsaredim [n=jgreenwa@inet-netcache2-o.oracle.com] has joined #ubuntu-installer
=== jetsaredim still cannot get glade working properly under kubuntu
=== pkt_ [n=knoppix@85.73.168.46] has joined #ubuntu-installer
=== pkt [n=knoppix@85.73.168.46] has joined #ubuntu-installer
=== pkt [n=knoppix@85.73.168.46] has joined #ubuntu-installer
cjwatsonevand: done10:45
=== pkt [n=knoppix@85.75.170.118] has joined #ubuntu-installer
evandthanks!01:34
CIA-16ubiquity: cjwatson * r1990 ubiquity/ (3 files in 2 dirs):01:49
CIA-16ubiquity: * Don't crash if Install exits due to SIGINT, SIGTERM, or SIGKILL, since01:49
CIA-16ubiquity:  these are probably user-generated.01:49
=== mgalvin [n=mgalvin@ubuntu/member/mgalvin] has joined #ubuntu-installer
evandah, you beat me to updating those bugs01:56
CIA-16ubiquity: cjwatson * r1991 ubiquity/ (3 files in 2 dirs):02:18
CIA-16ubiquity: * Prepare for partman-partitioning/confirm_resize being asked during02:18
CIA-16ubiquity:  autopartitioning (partman-auto 62ubuntu9).02:18
=== cr3 [n=marc@modemcable178.77-70-69.static.videotron.ca] has joined #ubuntu-installer
=== evand [n=evand@ubuntu/member/evand] has joined #ubuntu-installer
=== pkt_ [n=knoppix@athedsl-160472.home.otenet.gr] has joined #ubuntu-installer
=== mgalvin [n=mgalvin@ubuntu/member/mgalvin] has joined #ubuntu-installer
=== jetsaredim [n=jgreenwa@inet-netcache2-o.oracle.com] has joined #ubuntu-installer
jetsaredimanyone around to have their brain picked?04:57
jetsaredimI guess that's a no05:04
=== mpt [n=mpt@121-72-130-40.dsl.telstraclear.net] has joined #ubuntu-installer
=== mgalvin [n=mgalvin@ubuntu/member/mgalvin] has joined #ubuntu-installer
jetsaredimanyone alive?05:36
cjwatsonalways best to ask rather than ask-to-ask05:47
jetsaredimgood point05:51
jetsaredimso, i'm still having issues with glade05:51
jetsaredimI tried to upgrade to feisty, but that didn't help05:51
jetsaredimin any case, I was looking some more at the code05:52
jetsaredimin the components like user info05:52
jetsaredimwhat happens with the data once it is processed with the ok action?05:52
jetsaredimmaybe i should put a storyboard together and that would better illustrate what i'm trying to do05:53
cjwatsonself.preseed tells debconf about it and then the script on the other side (see the prepare method) responds to that05:54
cjwatsonyou really need to understand debconf before any of this makes any sense at all05:54
cjwatsonso e.g. UserSetup.ok_handler does self.preseed('passwd/user-fullname', fullname), and the backend script is user-setup-ask05:55
cjwatsonwhile the GUI is running, user-setup-ask is blocked waiting for what it thinks is debconf but is actually ubiquity to get back to it with the reply to a db_input command05:55
cjwatsononce db_input returns successfully, it continues and retrieves the answers to the various questions from debconf05:56
cjwatsonif any of the debconf questions in the questions list defined in the prepare method are asked using db_input, debconffilter will call the run method of the appropriate component05:57
cjwatsonUserSetup just uses the default run method, which goes "wait for the user to hit Forward"05:58
jetsaredimhmm06:02
cjwatson(phone)06:03
jetsaredimso which packages are affected by debconf when the usersettings are set?06:03
evandjetsaredim: if you run ubiquity with the --debug option and tail the log file, it should be a little easier to see what's going on.06:04
jetsaredimmaybe usersettings is a bad example based on what I'm looking to do06:04
jetsaredimi mean basically, there are three system configurations we want to provide access for06:32
jetsaredimmythtv frontend-only, backend-only and a frontend/backend combo06:33
jetsaredimand there are configuration settings for each type, some are common to all, some are specific06:33
jetsaredimits not a lot of configuration, maybe like 5 or 6 packages difference either way06:34
jetsaredimthen the other complicated part is to try and run something in the install chroot, but I think we might have that figured out06:35
jetsaredimerr superm106:35
cjwatsonusersetup is about the simplest of the components06:38
jetsaredimi guess i just need to know more about debconf to understand the similarities between what I want to do and what the usersettings is doing06:39
evandjetsaredim: if you're asking these questions inside the first phase of the graphical installer, you could make a debian-installer component and hook into it from Ubiquity.06:39
evandjetsaredim: you could then use a select question to figure out which option of frontend-only, backend-only or frontend/backend taht you want and ask more questions from there06:39
evandgotta run though, I can explain further later if you'd like to take that route06:40
jetsaredimhmm06:42
jetsarediminteresting thought06:42
jetsaredimis there more documentation on setting up a debian-installer script?06:42
evandjetsaredim: http://people.debian.org/~fjp/talks/debconf6/paper/06:52
evandthere's also a video floating around the internet06:52
=== evand departs for real this time
jetsaredimthx06:54
jetsaredimare there any examples of ubiquity calling out to debian-installer scripts?07:11
cjwatsoner, yeah, that's how most of ubiquity works ...07:13
cjwatsone.g. user-setup07:14
cjwatsonmigration-assistant will be the one that Evan was thinking of, though07:14
jetsaredimso the component piece that's under the ubiquity tree is just calling the d-i piece?07:25
evandjetsaredim: to greatly simplify this, lets say that you just want to create a page that asks the user what their favorite color is07:30
jetsaredimok07:30
=== jetsaredim feels a wiki/howto coming on
evandyou would create a d-i component that has a script that simply does a "db_input yourcomponent/favoritecolor"07:31
evand(assuming that yourcomponent/favoritecolor is in your templates file)07:31
evand(and is a string type)07:31
jetsaredimok - so that was my next question07:32
evandthis would have the effect in the alternative installer of presenting an input box to the user07:32
jetsaredimasking for their favorite color07:32
evandright07:32
evandwhen they fill out this input box, the value they type is inserted into the debconf question yourcomponent/favoritecolor07:32
jetsaredimwhen you say template file, do you mean the glade thing?07:32
evandjetsaredim: no, not at all.  See the debconf guide for information about templates07:33
evandnow, if you wanted to interface ubiquity (the graphical installer) to this, you would create a yourcomponent.py file and place it in ubiquity/components....07:33
cjwatson"component" is a somewhat dodgy term meaning "interface to backend [usually d-i]  script"07:34
=== jetsaredim lightbulb dimly-lit
jetsaredimsure07:34
cjwatsondebconf guide> that's the debconf-devel(7) man page07:34
cjwatsonwhich is required reading07:34
evandyou'd probably be best served taking usersetup.py and stripping the code out of the functions07:34
evandin the return statement in prepare you'd type the path to that d-i script (I'm skipping over how a lot of the build works for now)07:35
jetsaredimand pass that questions thing07:35
jetsaredimlist07:35
evandthe questions object is a list of the questions that you care about07:35
cjwatsonone of these days I will make the interface a bit more rational :-)07:35
=== cjwatson -> dinner
evandso in your case, questions = ['mycomponent/favoritecolor'] 07:36
cjwatsonubiquity/debconffilter.py is the core of all of this, btw - everything else is conceptually layered on top of that07:36
jetsaredimok07:36
jetsaredimso - where are these templates stored?07:37
cjwatsonif it helps, ubiquity is an intercepting proxy for the debconf protocol. If that is a confusing statement, ignore it. :-)07:37
jetsaredimno it makes sense07:37
evandnow, you'd want to map that text input to an actual gtk/qt input box07:37
evandso we step away from mycomponent.py for a second07:37
cjwatson(I used to write web servers for a living; sometimes it shows)07:37
evandheh07:37
jetsaredimso07:38
evandand open up the glade file (or the kde ui file), make a new page and add an text box to it.  Be sure to name it something like "mycomponent_color" as you will reference it from another file07:38
jetsaredimk07:39
=== jetsaredim is still stuck with glade issues, but ok
jetsaredimthat's a topic for Riddell and the kubuntu peeps07:39
evandwe then go into gtkui/kdeui and create a get_favorite_color function.  In that we simply return self.mycomponent_color07:39
evandas the entire glade namespace gets imported into the current namespace we can reference any glade "item" as if it were a member, so self.mycomponent_color07:40
jetsaredimok07:40
=== jetsaredim is sorta following
jetsaredimsounds like I should try all of this and write it up07:41
evandnow, we go back into components/mycomponent.py and we either create or go to the ok_handler definition that you copied from usersetup.py.07:41
evandthis function will be called when the user presses the "next" button07:42
jetsaredimright07:42
evandso we'll say something like color = self.frontend.get_favorite_color()07:42
evandwhich will call that function in the ui code we're using, either gtkui.py or kdeui.py, which will then grab it from the actual interface item07:43
evanderr object07:43
evandignore my poor terminology07:43
jetsaredimno no07:43
jetsaredimi'm still with ya07:43
jetsaredimso then07:43
jetsaredimwe have this debconf "thing"07:43
jetsaredimand its getting set by the return code of the "ok" function?07:44
evandsince our goal is to wrap ubiquity around your d-i component, we're trying to mimick what the d-i component would do, which would be to then store the data it's asking for in debconf...07:44
evandto do that we use preseed07:44
evandso right below the "color =" line we preseed the proper question with that data07:45
jetsaredimok07:45
jetsaredimi see all that in usersetup07:45
evandso self.preseed('yourcomponent/favoritecolor', color)07:45
jetsaredimright07:45
evandwhich will take the value of color and stuff it in that specific debconf question07:45
jetsaredimok07:46
evandI'm leaving out a lot, and this is by no means complete, but I really must be off to work07:46
jetsaredimso what actually happens to that data/07:46
evandI hope that at least gives you a better idea of whats going on07:46
evandjetsaredim: it gets stuffed into debconf until your _apply function looks for it during the actual install07:46
jetsaredimlike - once that template item is preseeded07:46
evand_apply is another lesson :), good luck for now07:46
jetsaredimum07:47
jetsaredimwell - so in the usersetup_apply.py07:47
jetsaredimthat's where the information is getting "acted" upon?07:47
jetsaredimthough in the prepare function I only see it calling the user-setup-apply d-i script...07:48
=== rrittenhouse [n=tad@unaffiliated/rrittenhouse] has joined #ubuntu-installer
cjwatsonthe *_apply components are kind of hacks08:18
cjwatsonthe idea is that the regular components ask the questions up-front, and the *_apply ones are called after /target is set up and the live filesystem copied; they call d-i scripts to apply the results of the previous questions to the system08:19
jetsaredimso how is the data passed?08:19
cjwatsonsince applying the results of questions you've already asked typically doesn't involve asking any questions (unless something goes wrong), there's no need for the component to be very complicated08:20
cjwatsonit's still in the debconf database from when the questions were asked earlier08:20
jetsaredimalso - is the apply command run in the chroot?08:20
cjwatsonno08:20
jetsaredimhow do things get hooked into there?08:21
cjwatsond-i uses /target too, so scripts designed to run in d-i are typically set up to work with /target08:21
jetsaredimi c08:21
cjwatsonthey either put /target on the front of paths explicitly (if they're just writing out files or whatever), or they chroot08:21
jetsaredimbut would that be the place to put such things?08:21
cjwatsonwhat things?08:24
jetsaredimlike if I needed to run something in the installed system chroot08:24
jetsaredimmythtv has a whole gui-based setup program08:25
jetsaredimand re-implementing it for the sake of fitting in with ubiquity or d-i would be a nightmare08:25
cjwatsonright, though running a GUI will be an utter pain in the backside, as I said earlier08:25
cjwatsonpossible, but you'll have to mess with xauth and such to make it work08:25
jetsaredimsure08:26
jetsaredimok - i gotta strip all of the evand posts out into a checklist or something and give this a go08:26
jetsaredimhow do you guys normally test this stuff?08:27
jetsaredimi'm guessing that you don't build an entire iso every time and boot it in an emulator or something08:29
evandjetsaredim: no, I'll build a deb of my component, add it to my local repository, then do a make in ubiquity/d-i and then build the ubiquity package.  Then I'll scp ubiquity-frontend-gtk ubiquity-ubuntu-artwork and ubiqutity to an intermediate host, and scp it in from the virtual machine.  Then it's a simple matter of sudo dpkg -i *.deb and ubiquity -d.08:38
evandIf you're making minor changes you can always edit the files inside the VM08:39
evandjetsaredim: there's a little more to including a component in the ubiquity build system than that though08:39
evandsee debian/ubiquity.install-any and d-i/lists/any08:44
evandin the ubiquity package08:44
jetsaredimhmm09:21
jetsaredimi thought that i could just take a snapshot of the livecd09:21
jetsaredimand then modify the ubiquity src in there, no?09:21
jetsaredimdoesn't rebuilding the livecd rebuild ubiquity as well?09:21
cjwatsonI usually either rsync new source into the live session and build it in /tmp on the fly, or I scp over the changed source files, or I just hack stuff in place10:04
jetsaredimbut does rebuilding the livecd work too?10:06
jetsaredimgranted - its the long way around10:07
cjwatsonif you  the filesystem, yes10:07
cjwatsonif you modify the filesystem, yes10:07
jetsaredimso just changing the ubiquity source isn't enough?10:07
cjwatsoner10:11
cjwatsonwhere do you think the source is?10:11
jetsaredimi meant versus the livecd filesystem10:14
jetsaredimwas just clarifying10:14
cjwatsonI don't really understand you, sorry10:19
cjwatsonchanging the source is not enough unless you actually get it into the live session somehow, obviously :-)10:20
jetsaredimright10:23
jetsaredimwhat i meant was - I should be able to change the ubiquity source and then rebuild the livecd iso and see my changes10:23
jetsaredimright?10:23
cjwatsonwell, that would depend on how you rebuild the ISO, no?10:24
cjwatsonthere are multiple stages involved there10:24
cjwatsonthe ubiquity package build; the live filesystem; the actual ISO image itself10:24
jetsaredimisn't there a script at the top level of the livedisk directory?10:25
cjwatsonno10:25
jetsaredimhmm10:26
=== pkt__ [n=knoppix@85.73.129.9] has joined #ubuntu-installer
jetsaredimmust have been created by the mythbuntu project people10:26
jetsaredimevand: so where am I going to add this new page in the hierarchy of the ubiquity.glade layout?10:42
jetsaredimunder wizard?10:42
=== jetsaredim wishes there were more resources explaining glade on the interweb
jetsaredimi must really be dense cause I'm not getting how to add a new screen to the glade file10:56

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