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

=== superm1_ is now known as superm1
=== cjwatson_ is now known as cjwatson
xivuloncjwatson, when you have a couple of minutes can we discuss about wubi inclusion plan?09:58
=== cjwatson_ is now known as cjwatson
xivuloncjwatson ping13:32
cjwatsonxivulon: pong. It's always better just to say the thing you would have said after the ping, rather than the ping/pong game13:35
xivulonHi colin, as mentioned previously wanted to discuss about wubi inclusion, is that ok to do it now?13:36
cjwatsonwhat about it? :-)13:42
cjwatsonIRC has lots of latency; I find it better to just accept the latency and have a laggy conversation rather than trying to find times that suit everyone ...13:42
xivulonfirst did you do any work on that yourself/evand?13:43
cjwatsonnot since UDS; dunno about evand13:43
cjwatsonI have been busy with spec approval, roadmap preparation, performance reviews13:43
cjwatsonetc.13:43
xivulonsecond, I think it would be easier to add the hardy branch to daily build (did not check if it's already there)13:43
cjwatsonhardy branch of wubi? sure13:44
xivulonthen we remove hack by hack13:44
xivulonbranch for lupin13:44
xivulonhttps://code.launchpad.net/~ubuntu-installer/lupin/hardy13:44
cjwatsonok13:44
xivulonat the moment that is the same for gutsy13:44
cjwatsonoh, then there's nothing to do13:44
cjwatsonthe branch itself isn't in the daily build13:44
xivulonthat's already in?13:45
cjwatsonuploads made from the branch are in the daily build13:45
xivulongood13:45
cjwatsonif the branch hasn't changed since gutsy, there is no upload to make13:45
xivulonhacks that would be quick for you to move upstream:13:45
xivulonadd /boot to fstab13:47
CIA-4oem-config: cjwatson * r386 oem-config/ (4 files in 2 dirs):13:48
CIA-4oem-config: * Automatic update of included source packages: console-setup 1.19ubuntu1,13:48
CIA-4oem-config:  localechooser 1.42ubuntu1, tzsetup 1:0.19, user-setup 1.16ubuntu1.13:48
xivuloncjwatson note that the hacks to be removed are in now in wubi not in lupin, since wubi was overriding the initrd (to avoid shipping a different initrd)13:49
xivulonthe boot hacks are in http://codebrowse.launchpad.net/~ubuntu-installer/wubi/hardy/files/ago%40nbago-20071108222051-y9zlwe38au12i4jf?file_id=finish.d-20071008002841-x6i7u2jcizw74pyu-1213:50
xivulonI am sure there is a far better way to add stuff to fstab13:50
xivulonfstab.d if my memory doesn't fail me13:50
saispoa new installer will be out for the next hardy ? the simple debian installer will continue to exist or it will die ?13:51
cjwatsonfinish.d is definitely wrong13:51
cjwatsond-i is not going to die as long as I'm around13:51
saispoyeah ^_^13:51
CIA-4oem-config: cjwatson * r387 oem-config/debian/ (changelog control): XS-Vcs-Bzr -> Vcs-Bzr13:52
cjwatsonsaispo: most of d-i has already been merged from Debian13:52
cjwatsonsaispo: so I don't know what you mean by "a new installer"13:52
xivuloncjwatson finish.d hacks simply append the boot line to fstab and mount it. As mentioned doing it via fstab.d (?) would be better.13:52
cjwatsonfstab.d yes13:53
cjwatsoncan be done in partman-auto-loop. Is there a bug filed with a patch?13:53
cjwatsonIRC is just about the worst way to track this stuff :)13:53
saispocjwatson: as you say about irc and the latency :) i see a new team name, a discussion and i think a new installer will come, that's all cjwatson :)13:53
cjwatsonsaispo: the installer is modular, and little components of it are always being upgraded. What new team name?13:54
saispolupin ?13:54
CIA-4oem-config: cjwatson * r388 oem-config/debian/changelog: releasing version 1.2413:54
saispocjwatson: yep, and i use it all days and i use it for creating my cd's. d-i is wonderfull13:54
cjwatsonsaispo: lupin is specifically for installation via Windows; this was partially in place in gutsy13:55
saispook13:55
saispodon't know that, thanks for your explaination13:55
cjwatsonsaispo: the Windows installer work does *not* supersede either d-i or ubiquity; it's an additional method, not a replacement13:55
saispok13:55
xivuloncjwatson https://bugs.launchpad.net/ubuntu/+source/partman-auto-loop/+bug/17365913:59
cjwatsonI was hoping for a patch against partman-auto-loop, but OK ;-)13:59
xivulonI can do the patch later on today13:59
cjwatsonthanks13:59
xivulonNot on a linux machine at the moment13:59
cjwatsonif you do it in fstab.d, you shouldn't need a separate script to mount it14:00
xivulonnice14:00
cjwatsonpartman-target should automatically mount stuff listed in fstab.d14:00
cjwatsonof course it should not hardcode "ubuntu"14:01
cjwatsonpartman-auto-loop fetches that from the preseed file rather than it being hardcoded14:01
xivulonsure14:01
xivulonissue #2 is http://codebrowse.launchpad.net/~ubuntu-installer/wubi/hardy/annotate/ago%40nbago-20071108222051-y9zlwe38au12i4jf?file_id=ntfs_3g-20071020080255-gmmr0086kisglkaq-314:03
xivulonBasically making sendsigs skip userspace filesystems. There are at least 2 bugs on it.14:03
cjwatsonthere's already a bug, no need to bring it up on IRC unless you have a patch that I've missed14:03
xivulonThe above is a quick patch for the reported bug14:04
cjwatsonpartman-auto-loop bzr already has a correction to add pidof mount.ntfs14:04
xivulonBut it does not fix the root issue14:04
cjwatsonand this is already in the spec14:04
cjwatsonwe don't need to go over it again :)14:04
xivulonThe gutsy one was wrong, not sure if it has been fixed since14:05
cjwatsonwe don't need to go over this again on IRC, it's in the spec14:05
xivulonThere where 2 issues, 1) no mkdir varrun 2) did not work with /sbin/mount.ntfs but works with mount.ntfs14:05
xivulonok will check that later14:06
cjwatsonyou put it there :)14:06
cjwatsonfixed partman-auto-loop to use pidof blah rather than pidof /sbin/blah14:09
cjwatsonI'll fix ntfs-3g in the next upload14:10
cjwatsonwhich I guess can be nowish14:11
cjwatsondear ntfs-3g upstream, stop changing the damned soname14:11
evandheh14:13
xivulonThat was the relevant bug by the way: https://bugs.launchpad.net/ubuntu/+source/ntfs-3g/+bug/15083114:15
cjwatsonthanks, I missed that14:16
CIA-4ubiquity: evand * r2370 ubiquity/ (configure configure.ac): bump to 1.7.214:16
xivuloncjwatson what was the init process that copied /dev/.initramfs/varrun -> /var/run?14:17
cjwatsonxivulon: ntfs-3g 1:1.1120-1ubuntu1 should obsolete http://codebrowse.launchpad.net/~ubuntu-installer/wubi/hardy/annotate/ago%40nbago-20071108222051-y9zlwe38au12i4jf?file_id=ntfs_3g-20071020080255-gmmr0086kisglkaq-314:18
xivulonThat has to run quite early on I guess... Wouldn't make sense to have the pidof in there directly?14:18
cjwatson$ grep -r varrun /etc/init.d14:18
cjwatson/etc/init.d/mountkernfs.sh:     for file in /dev/.initramfs/varrun/*; do14:18
CIA-4ubiquity: evand * r2371 ubiquity/debian/ (changelog control): * XS-Vcs-Bzr is now Vcs-Bzr.14:18
cjwatsonI think it's best the way it is for now14:18
xivulonWhat I mean is that if ntfs is in use by the time you run mountkernfs.sh is executed, it should be pretty safe to skip it, and that way we would not need to patch separately autopartition-loop14:21
cjwatsonI think the current approach (with the bug fixes I just uploaded) is sufficient and avoids the need to encode filesystem-specific stuff in the mountkernfs, which is supposed to be as generic as possible14:22
xivulonok14:23
xivulonnext14:23
xivulonOne more template: http://codebrowse.launchpad.net/~ubuntu-installer/wubi/hardy/annotate/ago%40nbago-20071108222051-y9zlwe38au12i4jf?file_id=extra.templates-20071101223742-1yyt3rc9cs3pkchh-214:24
cjwatsonthat sounds like it should have a patch associated with it, and be filed as a bug ...?14:24
cjwatson141217?14:24
cjwatsonno14:24
xivulonThe error message should be raised by autopartition-loop (will provide patches separately), just need that template in14:25
cjwatsonthe template and the code to use it should be submitted in a single patch14:26
cjwatsonas a general rule, we don't add templates without code to use them14:27
xivulonMakes sense then14:27
cjwatsontemplates are for the most part just an extension of code14:27
xivulonI will have to diff autopartition-loop, will do that tonight and give you the patches against that14:28
xivulonOn a side note, as mentioned, unless fallocate is available, I'd use windows-side virtual file generation, or we'd have to use zeroing on linux side which is painfully slow14:29
cjwatsonwe should be getting a new enough kernel to use fallocate14:30
xivulonthat also depend on ntfs-3g / vfat using that14:30
cjwatsoncorrect14:31
xivulonAnyway I have the code for windows side file generation, removing that is not a big deal14:31
cjwatsonthis is something we already discussed in Cambridge, and it's in the spec :)14:32
xivulonre template, I had a discussion with szaka, get_ntfs_resize_range (ntfsresize info), can return false negatives, i.e. give a malformed ntfs error, even though ntfs-3g can actually use the partition14:45
xivuloncjwatson, I also had a proposal to generalize external hooks in lupin, not sure what your view is on that https://bugs.launchpad.net/ubuntu/+source/casper/+bug/144798 (see last comment)14:53
xivulonfinally (for today), can I remind you of #140458? I have tried one of the programs to generate metalinks, and as far as I can see, looks to me, can that be added to the build process?14:54
xivulon...looks well to me...14:54
cjwatson144798> desperately need to fix naming to be in line with d-i standards14:54
cjwatson140458> I'll ask slangasek to look at it, I don't have time myself14:55
xivuloncjwatson, can you add your suggestion to 144798? So we take it from there?14:55
cjwatsonI'll think about it14:56
cjwatsonI want to have an actual suggestion14:56
cjwatsonbut basically any boot parameter that doesn't contain a slash is incorrectly named14:56
cjwatsonat least any installer parameter14:56
cjwatsonbecause unless it contains a slash it will be carried over to the installed system and encoded forever in users' bootloader configurations14:57
cjwatsonthere are a small number of exceptions but they are very much finite and we should avoid growing them14:57
xivulonin my proposal though we only have 1 parameter (we can add a slash to it): custom_installation14:58
cjwatsonthat is incorrectly named.14:58
cjwatsonI've commented on the spec to that effect14:58
cjwatsons/spec/bug/14:58
xivulonall I mean that should be the only one to fix14:58
cjwatsonsure14:58
cjwatsonbut my point is that it is actually more than an aesthetic consideration and therefore it's something I'd like developers to bear in mind14:59
xivulonadditional hooks, preseed, and override files follow a specific directory structure/naming convention withing the custom_installation folder14:59
cjwatsonyes, I read the bug14:59
cjwatsonI will think about it :)14:59
xivulonThere is one thing though, about the path14:59
xivuloncustom_installation=???15:00
cjwatsonI do not have an opinion yet15:00
xivulon??? = Find Path matching XYZ | /dev/sda/path | /dev/by-uuid/xyz/path ...15:00
cjwatsonthe latter two are abominations15:01
cjwatsonpossibly // might be an acceptable syntax15:01
cjwatsonbut definitely not something that looks like a device node but isn't15:01
cjwatson: would probably be closer than //15:02
cjwatsonso /dev/sda:/path15:02
xivulonfind:/path | /dev/sda:/path | /dev/by-uuid/xyz:/path15:02
cjwatsonI'm not certain I'm recommending that yet, but it's definitely better than /dev/sda/path15:02
xivulonagreed. we could also merge url paths in there15:03
xivulon 15:11
xivulonis /custom/installation ok as a parameter name?15:12
cjwatsonno15:16
cjwatsonleading slashes aren't allowed, and the first bit should generally be named for the component implementing it15:16
cjwatsonhence things like partman-auto-loop/partition15:16
xivuloncustom/installation then15:16
xivulonas that would probably span several components (casper being one of the most important)15:17
cjwatsonnot custom/15:17
cjwatsoncasper/ would be fine15:18
xivuloncasper/custom-installation?15:18
cjwatsondebian-installer/ is available for general things, though this isn't very d-i specific15:18
xivulondebian-installer/custom?15:18
cjwatsonsomething like that. I have to go and prepare for a client phone call now15:19
xivulonsure, maybe edit the bug if you have any good idea15:19
xivulonps It would be nice to implement the same mechanism on live and alternate15:20
xivulonthe implementation is different, but there is no much reason to have 2 separate override mechanisms15:20
xivuloncjwatson, do you think it is safe to have the following in umountfs?16:07
xivulon[ -x /usr/lib/lupin/host_device ] && [ "$DEV" = "$(/usr/lib/lupin/host_device)" ] && continue'16:08
bdmurraycjwatson: Have you seen the recent comments in bug 150930?16:12
cjwatsonxivulon: I guess, would need to refresh memory on the context16:22
cjwatsonbdmurray: hmm, apparently I shelved my fix for that16:24
cjwatsonI wonder why16:24
CIA-4ubiquity: cjwatson * r2372 ubiquity/ (debian/changelog scripts/install.py):16:26
CIA-4ubiquity: * Copy xserver-xorg/config/display/modes to the installed system before16:26
CIA-4ubiquity:  reconfiguring usplash (LP: #150930).16:26
cjwatsonperhaps that will do the job16:26
bdmurrayWas that done before after Hardy Alpha 1?16:27
cjwatsonCIA's commit messages are more or less real-time16:28
cjwatsoni.e. I committed it just now16:28
bdmurrayOkay, great.16:28
cjwatsonI've not really tested it though, it just looks plausible ...16:29
xivuloncjwatson, that's because umountfs tries to umount the /host drive before umounting other hosted systems.16:29
cjwatsonoh, in *umountfs*? I really, really don't think it should have anything involving "lupin" in it16:29
xivulonwe discussed that briefly, and you mentioned your concerns re umount order16:29
cjwatsonif that's needed, it should be made generic and pushed into sysvinit properly16:29
xivuloncjwatson, yes that is needed I am afraid16:30
cjwatsonthen it does not belong in lupin16:30
xivulonthat's why I wanted it upstream ;)16:30
cjwatsonright, but it shouldn't be done by calling /usr/lib/lupin/anything16:30
cjwatson(quite apart from the fact that /usr/lib is a crazy place for programs to live ...)16:30
xivulonthat can be anything you want... Just for illustrative purposes16:31
xivulonany script that returns an host device16:31
xivulonif there is one...16:31
cjwatsonI don't think it should hardcode /host, either. The question you're trying to ask is "is this filesystem used to implement /"?16:31
cjwatsons/"?/?"/16:31
cjwatsonit shouldn't matter what it's called16:31
cjwatsonand, as I said, it would be better to just topologically sort filesystems and unmount them in the right order16:32
cjwatsonso no, I don't think it's safe to have the line you quoted in umountfs. :)16:32
xivulonI guess so, to rephrase "is / a file/folder inside of this device?"16:32
cjwatson(folder is a Windows term)16:32
xivulondirectory16:32
cjwatson:-)16:33
xivulonof course16:33
xivulonone case is when root is a loopinstallation file, another is when root is a directory inside another root filesystem16:34
xivulonhave to think about a good detection algorithm16:36
cjwatson"topological sort"16:36
cjwatsonthat's the name of the algorithm16:36
xivulonanyway on top of the line above, you'd also need /etc/init.d/mounthost, /etc/init.d/umounthost16:36
cjwatsonit's the process of taking a directed acyclic graph and ordering it from leaves to root (or vice versa)16:37
cjwatsonshouldn't need mounthost/umounthost16:37
xivulonAn implementation is now in lupin-support16:37
cjwatsonmounthost has to be done in the initramfs anyway, and umounthost can be handled by a more intelligent umountfs16:37
cjwatsonor umountroot16:37
xivulonthe idea is that if you skip host in umountfs you have to unmount it later on16:38
cjwatsonyou just have umountroot unmount anything that's left over at the end16:38
xivulonthat will do16:38
xivulonI was thinking of a script after umount root16:38
cjwatsonI'm trying to avoid script proliferation here in what is a very delicate area16:38
xivulonsimilarly when you mount16:38
cjwatson/etc/init.d/mounthost just makes no sense :)16:38
xivulonWell you have to mount /host before mounting /...16:38
cjwatsonit has to be done in the initramfs - if you don't have /host mounted you don't have / mounted and therefore can't see /etc/init.d16:39
cjwatsonthis is already done in initramfs-tools16:39
xivulonwhat about remounting it16:39
xivulonrw + checks... all things you do normally to /16:39
cjwatsoncould be done by checkroot16:39
cjwatsondefinitely shouldn't be called mount* though since that's not what it does16:40
xivulonok we agree, I have preliminary implementation of both in lupin-support (but as separate scripts)16:40
xivulonyeah checkhost might be more appropriate16:40
cjwatsonit's probably reasonable for checkroot to remount,rw anything that's already mounted16:40
cjwatsonthere is no reason for it to be a separate script, imo16:41
xivulonmakes sense16:41
cjwatsonI realise that when you're writing an overlay-type system then separate files make sense, but when integrating things into the distribution it always makes sense to think about whether you can do it in the existing code16:42
xivulonBack to "topological sort" isn't it sufficient to check that the root device is not itself a mountpoint?16:42
cjwatsonthe root filesystem is always a mountpoint16:43
cjwatson$ mountpoint /16:43
cjwatsonis a mountpoint16:43
xivulonI mean the device, so that / is mounted on /host/myfile -> device = /host -> check if /host is mounted16:44
cjwatsonwhy not do it the proper, generic way?16:44
xivulonthe above does not hardcode "/host"16:45
xivulonthat was just for an example16:45
xivulonso that / is mounted on /host/myfile -> device = /host -> check if /host is mounted16:45
cjwatsonok, do what you like :-/16:46
xivulonso that / is mounted on /XYZ/myfile -> device = /XYZ -> check if /ZYZ is mounted16:46
xivulonnot sure what you mean by generic16:46
xivulonisn't the above generic enough?16:46
cjwatsonavoiding hardcoding assumptions about mount point structure16:46
cjwatsonso that we don't have just the same problem again when somebody creates an even more convoluted chain of stuff :)16:46
xivulonI think we are saying the same thing16:48
xivulonYou'd have to get the / device, and try understand what it is: either it is a real device, or a file/folder inside of another mountpoint.16:49
xivulonDo you have different suggestion?16:50
cjwatsonI suggest doing this all the way down the filesystem tree16:50
xivulonI see you want the full unmount order not just host-root16:51
cjwatsonwell16:51
cjwatsonsome of that probably comes from the order you get things out of /proc/mounts in16:51
cjwatsonso a simpler option might just be to ignore anything in /proc/mounts that comes before /16:52
cjwatsonI think /proc/mounts might be effectively topologically sorted anyway16:52
xivulonas you reminded me some time ago' though that gets a bit complicated in the case of userspace filesystems16:53
xivulonso /host might depend on /usr, (even though /host is mounted by the initrd)16:53
cjwatsonI didn't say that /host might, I said that some other ntfs-3g filesystem might16:54
cjwatsonand in that case the filesystem in question should be mounted after /usr and so should appear later in /proc/mounts than /usr ...16:54
cjwatsonlook at your /proc/mounts and you should see what I mean16:55
xivuloncannot do it now, but I see what you mean, and I am quite sure that /host is indeed before /16:55
xivulonI think it's a good idea16:56
cjwatsonthe only wart is that there are two / mountpoints; the first is rootfs and is actually the initramfs /16:57
cjwatsonso ideally you need to figure out the current /16:57
cjwatsonbut, SMOP :)16:57
xivulonLast point was a patch vs grub-install/update-grub (now I modified update-grub only, but I am not sure whether the code should be moved to grub-install)17:02
xivulongrub-install will do, unless menu.lst is deleted and gets regenerated by update-grub17:03
cjwatsongrub-install doesn't touch menu.lst at all, so if this is to change something in menu.lst, it should be in update-grub17:06
cjwatsongrub-installer (note difference; grub-install is a part of grub that installs the grub binary to disk, grub-installer is a d-i component) does make sure to call update-grub17:06
xivulonI meant grub-installer17:27
xivulonI seemed to rememebt that it generates an initial menu.lst17:29
cjwatsonnot really - grub-installer calls update-grub and then adjusts the result a bit17:30
xivulonin this case see if http://codebrowse.launchpad.net/~ubuntu-installer/lupin/hardy/annotate/ago%40nb-ago-20071029092615-uys52n7pb00aw6js?file_id=updategrub-20071021190150-hexwoe8fo26l1f9b-10 can be used17:37
xivulonyou may want to generalize on line 300-30217:38
xivulonThe modifications at line 701-... are a workaround to problems with device.map mismatch between grub and grub4dos17:42
cjwatsoncould you turn that into a patch against update-grub and file it as a bug report on grub, please?17:45
xivulonsure17:47
cjwatsonthanks17:47
xivuloncjwatson, on update-grub it is kind of difficult to understand whether / is using a host-device since I assume I cannot rely on /proc/mounts but only on fstab19:08
xivulonthis is an issue when update-grub is executed at installation19:10
xivulonWell in fact autopartition-loop will mount the host-device as /host anyway...19:12
xivulonis it possible to use a preseed recipe to mount-move a directory?22:28
xivulonI meant mount bind22:29
cjwatsonin update-grub, you can rely on /proc being mounted22:30
cjwatsonyou can do anything with preseeding.22:31
cjwatsondepends when you want it mounted22:31
cjwatsona preseed/early_command script can write out a fstab.d script that instructs partman to do the bind-mount22:31
xivulonthat's for adding boot to fstab in autopartition-loop22:32
xivulonI was thinking there might no be any need for a separate script at all, but a change of preseed file instead22:32
cjwatsonlike I say, you can do anything with preseeding, it's just a question of how difficult it is22:32
cjwatsonbut many of those things require using a preseed file to write out a script22:33
cjwatsonthere is no simpler way to do what you are asking22:33
xivulonI mean a preseed recipe22:33
xivulonnot a script22:33
cjwatsonyou can't do bind-mounts in those22:33
xivulonok22:34
xivulonthen we need a new preseed variable22:38
cjwatsonI don't think so22:38
cjwatsonyou need to provide a lot more justification for that22:38
cjwatsonyou certainly don't need it for /boot, since we'll be doing that directly in partman-auto-loop22:38
xivulonIf I add boot via fstab.d I ma22:40
xivulonmay22:40
xivulonOT any particular reason to insist on sh for all those scripts as opposed to python or similar?22:45
cjwatsonpython is not available in the initrd, and it would be a further memory hog to add it22:59
cjwatsonand any code that used python would have zero chance to go upstream to d-i23:00
cjwatsonso, I do insist on sh23:00
cjwatsonubiquity is OK because it's in an entirely different environment23:00
xivulonI was thinking more "outside" of the initrd, as in the live-iso/ubiquity23:02
xivulonthings like partman or update-grub23:02
cjwatsonpartman is used in the initrd!23:02
cjwatsonin d-i23:03
xivulonin d-i23:03
cjwatsonI have no desire whatsoever to fork partman between d-i and ubiquity23:03
cjwatsonit's hard enough to maintain as it is23:03
cjwatsonupdate-grub isn't part of the installer as such, so not my call23:03
cjwatsonI imagine it's just using the simplest facilities available23:03
cjwatsonalso, it used to be in / not /usr, and so couldn't use python23:03
xivulond-i has also gone gtk though, at least on debian if I am not wrong23:04
cjwatsonpartly, but only by means of a cdebconf frontend23:04
cjwatson(I wrote a fair chunk of the code)23:04
cjwatsonand that still does not use python23:04
xivulonif they can take gtk, python wouldn't be that much burden23:04
cjwatsonit has been explicitly rejected23:04
cjwatsonplease don't push this, it is not worth it23:04
cjwatsongtk provides real new user-visible facilities. python only makes developers' lives easier.23:05
xivulonI am not pushing it, just wondering, since I think that a lot of the script I am seeing would be much easier to maintain in python23:05
cjwatsontherefore gtk is more worthy of the memory requirement.23:05
cjwatsonmost of the parts of d-i I know well would not be significantly easier to maintain in python23:06
cjwatsonthose that include algorithms hard to express in shell are generally written in C23:06
xivulonfair enough [end of rant]23:07
cjwatsonat the end of the day, it's the way that the core d-i development team like it :)23:08
xivulonif it was for me sh would be used only for interactive tasks...23:09
cjwatsonwe feel differently23:09
cjwatson(which is fine, people are allowed to differ :-))23:09
xivulonsure23:10
cjwatsonpersonally, I think sh is an excellent glue language for the purpose of tying lots of different processes together, and (if you observe a few simple if poorly-known quoting rules) is much better-suited to that task than any other language I've seen23:11
cjwatsonbut I don't expect everyone to agree with me23:11
xivulonthey also say that python is an excellent glue language ;-)23:12
cjwatsonit's much more verbose for the same task23:12
cjwatsonand its signal handling is poor23:12
xivulonbut clearer23:13
cjwatsondo you understand its signal handling well enough to explain it to me? :)23:13
xivulonnot sure what you mean by that23:13
cjwatsonwhat does Python do with SIGPIPE and why is this bad for subprocesses?23:13
cjwatsonif you don't know this, you can't claim Python is clearer for gluing subprocesses together ;-)23:13
cjwatson(this is a real bug that has caused critical ubiquity bugs of the form "erased my entire partition table without warning"23:14
cjwatson)23:14
xivulonI normally do not call external programs from within python23:16
xivulonI tend to use libraries or wrappers, so errors are exceptions, and that works well23:16
cjwatsonso, I said "for the purpose of tying lots of different processes together"23:17
cjwatsonI was explicitly talking about calling external programs23:17
cjwatsonsuffice it to say that Python has at least one critical design flaw in this area that makes it very easy to do the job badly, and that this design flaw does not exist in sh23:17
cjwatsonso for this purpose I find Python's apparent clarity to be misleading23:18
cjwatsoneven though it is certainly excellent in other areas23:18
xivulonI agree that running unmodified programs is easier, but in the long end, creating a library of the desired wrappers may be more convenient23:18
xivulonis not one-off tasks we are talking here...23:18
cjwatsonnow you're just dodging the problem23:18
cjwatsonin the long run, it may also *not* be more convenient :)23:19
cjwatsonan explicit design goal of d-i is to reuse existing code, which often includes programs built by other packages23:19
xivulonthe situation though is not as bad as you make it, since today most things are available as a module23:19
xivulonso there is little need to run external programs directly23:20
cjwatson*shrug* not true IME23:20
cjwatsonit very much depends on what you're doing23:21
cjwatsonand, I repeat, this is a design flaw that has caused data loss23:21
cjwatsonin order to avoid it one has to write some very non-obvious code23:21
cjwatsonit'll bite you as soon as you call even one external program from Python and expect it to do the right thing in the event that your program takes e.g. an uncaught exception23:24
cjwatson(such as KeyboardInterrupt)23:24
xivulonAs mentioned not something I usually do, but I can see what you are saying, as mentioned, if calling a program from python is essential writing binding for it is usually a good approach23:28
CIA-4ubiquity: evand * r2373 ubiquity/ (5 files in 4 dirs): * Strip out support for creating multiple users in migration-assistant.23:30
cjwatsonxivulon: perhaps, but of course the binding still needs to take account of this23:31
cjwatsonanyway, bedtime23:31
xivulonthx for the chat goodnight23:34

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