All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Issue with the HOST_DIR/usr -> HOST_DIR move
Date: Sun, 9 Jul 2017 21:49:40 +0200	[thread overview]
Message-ID: <d912f9c1-39ad-74bd-1c95-f8d7d20b125e@mind.be> (raw)
In-Reply-To: <20170709194408.GF3196@scaer>



On 09-07-17 21:44, Yann E. MORIN wrote:
> Arnout, All,
> 
> On 2017-07-09 21:30 +0200, Arnout Vandecappelle spake thusly:

[snip]
>>  I'll make an explicit rule for $(HOST_DIR)/usr to solve this.

> I can totally understand the need to install in an existing directory,
> but I don;t think we should accept that there is a usr/ directory in
> there.
> 
> As far as I understand, we keep the compatibility usr/ as a symlink for
> two reasons:
> 
>   - that a host-package accidentally wants to install stuff in usr/ and
>     we missed that (e.g. for out-of-tree host-packages), but still want
>     the build to succeed,
> 
>   - that existing users' post-build/fakeroot/image scripts still work
>     without modification.
> 
> However, we do not add $(HOST_DIR)/usr/{s,}bin in the PATH, so an
> existing usr/ directory would have the potential to break when a package
> unexpectedly installs stuff therein, especially out-of-tree packages.
> And in this case, the build is broken.
> 
> So I would argue that we should only accept to use an existing directory
> if it is empty.

 I agree with your reasoning. However, it's a bit complicated to accomplish.
Since $(HOST_DIR)/usr exists already, we can't use the normal make dependency
mechanism to trigger the check. So we'd either need to FORCE it, or add another
PHONY rule just for this check.

 So I'm not sure that the added complexity is really warranted.

 I'll see if I can cook something up and add it as RFC to my series.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

      reply	other threads:[~2017-07-09 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09 16:25 [Buildroot] Issue with the HOST_DIR/usr -> HOST_DIR move Thomas Petazzoni
2017-07-09 19:30 ` Arnout Vandecappelle
2017-07-09 19:44   ` Yann E. MORIN
2017-07-09 19:49     ` Arnout Vandecappelle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d912f9c1-39ad-74bd-1c95-f8d7d20b125e@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.