[haiku-web] Re: update Ubuntu Build document

  • From: Urias McCullough <umccullough@xxxxxxxxx>
  • To: haiku-web@xxxxxxxxxxxxx
  • Date: Mon, 20 Apr 2009 13:23:19 -0700

On Mon, Apr 20, 2009 at 12:34 PM, Dennis d'Entremont
<dennis.dentremont@xxxxxxxxx> wrote:
> Ok but since I have the partition set in the userbuildconfig file (sorry
> Urias I'm still using the old way) I shouldn't run into this problem unless
> I change the value in the file. All I do is build with sudo jam -q
> (sometimes aq) and away I go. So I guess using sudo doesn't affect the build
> process in anyway except maying killing the wrong partition but that's a
> user error.

It's simply bad practice, and there are "proper" (and easy) ways to do
this that we should be encouraging.

If you for example wish to build to another partition, and you edit
your UserBuildConfig accordingly and jam to it, a simple typo will
quickly ruin your day.

Speaking from experience, on two separate occasions, setting the
permissions manually has saved my ass on this very process - as I
build Haiku from many different machines with different partition
layouts, I have on occasion put the wrong partition name into
UserBuildConfig and didn't realize it until I took the next step of
setting permissions. That extra step alone was well worth it to me,
and relatively cheap in the grand scheme of things - I would
definitely suggest others use it as well :)

Also, once you have multiple build profiles in place you can quickly
become confused as to which profiles belong to which partitions - and
accidentally wipe out the wrong one (on my core 2 duo, i have two
separate gcc2 partition profiles and two separate gcc4 partition
profiles) - forcing myself to set permissions on the proper partition
helps there as well, as I tend to double-check the device name against
the partition before chmod'ing that I wouldn't have to do otherwise.

Another side-effect of using sudo jam is that root ends up owning the
targets created during that process - making it even harder to stop
using sudo jam later. You'll essentially have to chown -R or delete
your generated/* once root owns them if you the want to create an
image.

To each their own - BUT we should definitely be suggesting the safest
method up front, and let people go about doing things in a
precarious/lazy fashion without our added help.

- Urias
-----------------------------------------------------------------------
haiku-web@xxxxxxxxxxxxx - Haiku Web & Developer Support Discussion List

Other related posts: