Mailinglist Archive: opensuse-factory (602 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?

On 12/02/2019 16:39, Michal Kubecek wrote:
On Tuesday, 12 February 2019 1:59 Simon Lees wrote:
Before this thread we hadn't considered looking at whether using a
different #!/bin/sh would have a impact on builds particularly in the
time it takes to execute configure or process makefiles under
different shells, at some point in the next couple of months its now
on my list to look at. Particularly in regards to packages like the
kernel, libreoffice and chromium.

It certainly can. Few years ago, I was rather frustrated that when
building a kernel package locally, more than 6 minutes out of total 35
was spent by brp-symlinks script. I was even considering to rewrite it
to C and parallelize as a hackweek project.

Then Tomáš Čech tried, as an exercise, to rewrite the script just by
replacing various invokations of sed, grep etc. with bash specific
expansions. As a result, he managed to squeeze those 6 minutes down to
~30 seconds.

Michal Kubeček

Thats probably why I didn't notice it so badly now 30 seconds compared
to the rest of the build time on some arch's is tiny. In the last year
or two we modified the script to use GNU parallel so now most of the
tests should also run in parallel as well, which generally means they
take as long as the longest test, there are many packages that now only
spend a second or two in these checks rather then 6-8 in the past.


Simon Lees (Simotek)

Emergency Update Team
SUSE Linux Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B

< Previous Next >