IRC logs for #buildstream for Thursday, 2017-06-01

*** juergbi has quit IRC04:08
*** brlogger has joined #buildstream04:11
*** hergertme has joined #buildstream04:17
*** Chris has joined #buildstream04:19
*** tiagogomes has joined #buildstream04:23
*** brlogger has joined #buildstream04:49
*** tiagogomes has joined #buildstream05:01
*** Chris has joined #buildstream05:02
*** tristan has joined #buildstream06:15
*** ChanServ sets mode: +o tristan07:00
*** jude has joined #buildstream07:02
*** jonathanmaw has joined #buildstream07:11
jonathanmawI think something squiffy might have happened. I've got a gnome-system built, but when I try to `bst checkout`, I get permission denied (https://pastebin.com/hYxFt9a4)08:18
jonathanmaw(~/tmp has permissions a+rwx, btw)08:19
tristanoh that is strange08:25
tristanjonathanmaw, and if you try the same symlink in your shell with `ln -s` what does it say ?08:26
tristanalso, is ~/tmp on the same filesystem as your artifact cache (~/.cache/buildstream/artifacts) ?08:27
tristanNote that I have to change `bst checkout` to always do copies, the fact it currently does hardlinks is a bug08:27
tristansort of unfortunate, but must be08:27
tristanmaybe we could add a `bst checkout --hardlinks` with an "At your own risk" warning08:28
jonathanmawtristan: permission denied when creating symlinks08:29
jonathanmawaha, ~/tmp managed to get owned by root08:30
tristanWe didnt do that :)08:33
tristanheh08:33
tristanjonathanmaw, please file a bug though08:34
tristanjonathanmaw, it's not correct that `bst checkout` gives you a stack trace when that happens08:34
jonathanmawtristan: created https://gitlab.com/BuildStream/buildstream/issues/3608:38
tristanthanks :)08:39
*** gitlab-br-bot has joined #buildstream08:40
tristanjonathanmaw, here is a script you can use to convert a dd'able system image into a virtualbox bootable thingie: https://bpaste.net/show/4f208bec3df409:34
tristanif you run that, like ./setup-vm.sh <imagefile> <vmname> ... then after launching virtualbox you will see 'vmname' is already there09:35
jonathanmawta tristan09:35
tristanjonathanmaw, also note that there are some problems with that system, the gnome-initial-setup user handoff seems to be broken09:36
tristanit will boot into a shell, and then doing `service gdm start` will automatically launch gnome-initial-setup, but at the end it wont create the user and flip over to the new session09:36
*** zes has joined #buildstream09:45
*** zes has quit IRC09:47
*** jonathanmaw has quit IRC10:34
*** jonathanmaw has joined #buildstream10:36
gitlab-br-botbuildstream: merge request (jonathan/enhance-script-element->master: Jonathan/enhance script element) #22 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/2211:09
*** Chris has quit IRC11:13
*** Chris has joined #buildstream11:13
jonathanmawtristan: I've made merge requests https://gitlab.com/BuildStream/buildstream-tests/merge_requests/3 and https://gitlab.com/BuildStream/buildstream/merge_requests/22 which I'd appreciate your input on11:14
tristanjonathanmaw, Ok !11:18
tristanjonathanmaw, I just want to go put food in me...11:18
tristanand directly after :)11:18
jonathanmaw:)11:25
*** tristan has quit IRC11:25
*** tristan has joined #buildstream12:13
*** ChanServ sets mode: +o tristan12:13
tristanjonathanmaw, so I've been looking at these MRs... I think it brings us much of the way there13:17
tristanI think we will try to merge soon and probably there will be some post-merge churn here13:18
tristanbut I think first we aught to probably nail the x86image element a bit better...13:18
tristanjonathanmaw, I'll put my comments in the MR but my biggest concern here is how derived script elements expose their own API to users13:20
tristanI.e. the base script element is bleeding API to the image element, we should fix that13:21
jonathanmawtristan: ok13:21
tristanI.e. I can see that gnome-system-image.bst is defining the layout, however the layout for an x86image is probably a detail of the x86image itself13:22
tristaninstead it should be exposing it's own API for "what element is the tooling, and what element is the system we're deploying"13:23
tristanroot-read-only: true is probably default anyway, but still; a user of the 'x86image' element has no business deciding how the image element is going to do it's work13:24
jonathanmawtristan: I was assuming the "default" use-case is that you stage everything to "/", perform your commands, and pack up the changed staging area as the output13:29
jonathanmawin which case root would default to not being read-only13:29
tristanjonathanmaw, right, I think though, that already the x86image element *itself* as a part of it's yaml file can mention that13:38
jonathanmawtristan: ok13:38
tristanthe users of the x86image should not need to know about it13:38
jonathanmawtristan: I think if the values of the element field in layout accept variables, I can abstract away the need for a "layout" field, assuming there is one element that's in "/", and the other that's being worked on.13:41
tristanjonathanmaw, Ok I gave more comments, I think I have a good idea to change this13:43
tristanAfter, I think I may want to churn the x86image element itself later on but that is less important13:43
tristanjonathanmaw, take a read of the concerns and the suggested approach, I think it's better13:44
jonathanmawtristan: I'm not sure what you mean by "Make the base ScriptElement interface purely pythonic"13:50
jonathanmawWould that mean making root-read-only and layout set in the class, instead of the yaml?13:50
tristanjonathanmaw, yep just stepped out for a sec... ok so...13:54
tristanBasically, ... (I'm going refer to what you called ScriptElementBase as ScriptElement)... The ScriptElement would not itself have a configure() implementation13:55
tristanInstead, it would have some additional python APIs, which it expects the subclass to call in ITS configure() implementation13:56
tristanSo, the bulk of the code you presently have in ScriptElement.configure(), would be moved over to the concrete script.py13:56
tristanAnd the x86image element, would parse it's own things, and call ScriptElement APIs with only the configuration relevant to itself13:57
tristanThis way, the all purpose 'script' element gets to basically use all of the features exposed by the base ScriptElement class using yaml, in a very dynamic way13:57
tristanBut the x86image only lets you do things relevant to the x86image element13:58
tristanWhile the bulk of the implementation (get_unique_key(), assemble() etc) is all implemented in the base ScriptElement class13:58
tristanjonathanmaw, how does that sound ?13:58
tristanSo far I think it's all around cleaner and safer13:59
jonathanmawsounds good14:00
tristanmostly some code moves from one place to another, and some APIs need to be defined and documented14:00
tristanjonathanmaw, note that any internal state that needs to be stored on the base ScriptElement instance, should be stored with double underscore prefix14:01
jonathanmawtristan: I'm guessing that preflight should also be defined only in plugins, since that validates the input14:07
tristanjonathanmaw, Well, in that case we can share14:15
tristanWell, maybe you need some help from the core for that14:15
tristanhold on...14:15
tristanjonathanmaw, right, so for now there are two invariants we have across all script elements14:16
tristanA.) They have no sources14:16
tristanB.) Their direct dependencies are all build only dependencies14:17
tristanjonathanmaw, We can assert that in the base class script element, and document in ScriptElement that subclasses should always chain up in preflight()14:18
jonathanmawok14:18
tristanin python3 that is nicely done with: super(MyType, self).preflight()14:18
tristanNice, ok updated blog post at: https://blogs.gnome.org/tvb/2017/06/01/continuous-bst-conversions-of-gnome-modulesets/14:21
tristanAfter sneaking in a patch to jhbuild2bst14:21
tristanHopefully in the nic of time :)14:21
tristanbst build --track meta-gnome-apps-tested.bst completes to a varying degree, but after this; `bst shell --scope run foo.bst` indeed works to launch and debug any application you have built14:22
* tristan just launched gnome-sudoku.bst and glade.bst from a buildstream sandbox without issue14:23
*** jude has quit IRC14:33
jonathanmawtristan: I'm currently reading the variables "cwd", "build-root" and "install-root" during configure, too. Should I separate them into a "load_variables" method too?15:01
jonathanmawI'm not sure if they change the idea that configure should be implemented only in derived classes15:02
tristanOk so, for the all purpose script element, it is important to be able to specify what the cwd, and other things are, at least the install-root, I'm not sure about whether build-root is relevant15:04
tristanFor an x86image element, it makes no sense really to allow the user to specify what the cwd is15:04
tristanThink of it the other way around I think: What API does the base element need to provide in order to allow the subclasses to do meaningful things ?15:05
tristanjonathanmaw, in other words, I would rather see APIs like ScriptElement.set_work_directory()15:06
tristanlooking at the current MRs, the x86image element uses %{build-root} as a layout location, that is quite fine, but is quite irrelevant to the ScriptElement base class15:10
jonathanmawtristan: it's currently just used as part of get_unique_key because it can affect the output15:11
jonathanmawthough I suppose since layout parsing happens after variable substitution, I can get around that15:12
tristanRight15:12
tristanThe layout may or may not use the %{build-root}15:12
tristanor may use other variables depending on the subclass15:12
tristanFor the collection area (where the artifact is produced from), it can be a set_install_root() which defaults to %{install-root}, or... it can just be hard wired to %{install-root}15:13
tristanwithout any API15:13
tristanthat seems to be a pretty constant variable with always the same meaning15:13
tristanWe could always grow an API for it without breaking any projects too, if we wanted to be more strict (and forcefully disallow users from being able to override that)15:14
tristan(i.e. it can be argued that for the x86image element, allowing the user to set install-root at all is just allowing an additional point of failure for no reason)15:15
tristanpast midnight here /me leaves coffee shop...15:16
*** tristan has quit IRC15:20
*** jude has joined #buildstream15:21
*** tristan has joined #buildstream15:27
*** jonathanmaw has quit IRC15:37
*** jude has quit IRC17:06
*** ChanServ sets mode: +o tristan18:05
*** tristan has quit IRC19:17
*** tristan has joined #buildstream19:19
*** tristan has quit IRC21:24

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