<p>Alex Thiessen has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23231">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/crossgcc: Output apt-get commands on debian<br><br>In the buildgcc script, there is a check that the tools required are<br>installed. When a tool is missing, a message is output suggesting an<br>installation method, e.g. `sudo apt-get install foo` on debian-based<br>systems.<br><br>When run on a true, vanilla debian system, the error message provides<br>only a generic hint because the `please_install()` function fails to<br>detect the OS kind. Detection is based on definition of ID_LIKE in<br>`/etc/os-release` yet such systems only define `ID` to `debian`.<br><br>This commit closes the detection gap. Tested on debian 9 (stretch).<br><br>Change-Id: I3c867837e9157bee13010bd0a005028c369ce55f<br>Signed-off-by: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com><br>---<br>M util/crossgcc/buildgcc<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/23231/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc</span><br><span>index 76ed1be..2ee102b 100755</span><br><span>--- a/util/crossgcc/buildgcc</span><br><span>+++ b/util/crossgcc/buildgcc</span><br><span>@@ -184,6 +184,10 @@</span><br><span> {</span><br><span>  HALT_FOR_TOOLS=1</span><br><span>     test -r /etc/os-release && . /etc/os-release</span><br><span style="color: hsl(120, 100%, 40%);">+  # vanilla debian doesn't define `ID_LIKE`, just `ID`</span><br><span style="color: hsl(120, 100%, 40%);">+      if [ -z "${ID_LIKE}" ] && [ -n "${ID}" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+            ID_LIKE=${ID}</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span>   case "$ID_LIKE" in</span><br><span>         debian) solution="sudo apt-get install $1" ;;</span><br><span>      suse) solution="sudo zypper install $1" ;;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23231">change 23231</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/23231"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I3c867837e9157bee13010bd0a005028c369ce55f </div>
<div style="display:none"> Gerrit-Change-Number: 23231 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> </div>