On 4 July 2013 16:39, Laurentiu Palcu <laurentiu.pa...@intel.com> wrote: >> Doing this in postinst is pretty nasty, > Nasty, in what way? How is this line different from the previous line in > the same postinstall? That one is also using sed to change 'halt' to > 'reboot' for qemuarm. Is it the sed you're worried about? This > postinstall is executed on host anyway, at do_rootfs().
The existing sed to manipulate the exec line is arguably a better solution to making this package machine-specific and special-casing just qemuarm. (I'm not sure why it special-cases qemuarm, and 751212d5effdceab91d95705e647cf07e6820940 where it was introduced doesn't clarify matters, but we'll ignore that for now). Arguably, but I'm not sure I agree. Anyway, you've a path that is known at build time so we can fix it at build time. Instead of using install, you can use sed. Just because we *can* run postinst scripts when generating the rootfs doesn't mean we *should*, do_install is for installing the files we're going to package, and postinst is for runtime changes that can't happen at any other time. >> instead change the desktop >> file to contain something like @SBIN@ and run it through sed in >> do_install. > Even though the change you're proposing is OK, involves changing the > desktop file to add the @SBIN@ pattern and move the sed line to > do_install(). Compared to having one single line added in the > postinstall... I would choose the latter, unless you elaborate on what > do you actually mean by "nasty". We're not being invoiced based on the number of patch hunks, and changing /sbin to @SBIN@ and install to sed isn't exactly a massive time sink. Ross _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core