[Starlingx-discuss] download_mirror.sh using bash -e causes early exit

Scott Little scott.little at windriver.com
Thu Jul 26 19:52:44 UTC 2018


find ./output -type f -name "*.rpm" | xargs rpm -K | { grep -i "MISSING 
KEYS" || true } > ./rpm-gpg-key-missing.txt

Scott

On 18-07-26 03:46 PM, Penney, Don wrote:
>
> Hi folks,
>
> I was just running a fresh download_mirror.sh execution and ran into a 
> problem. I run it as follows, to get timing info and record output:
>
> time ./download_mirror.sh 2>&1 | tee dpenney.out
>
> The script exited here:
>
> --> run: sudo -E yumdownloader -q -C --source 
> python-voluptuous-0.8.9-1.el7
>
> Looking for python-voluptuous-0.8.9-1.el7.src.rpm
>
> done!!
>
> finish 1st round of RPM downloading successfully!
>
> ERROR:  -------RPMs missing 6 in yumdownloader with L1 match 
> ---------------
>
> real    84m3.238s
>
> user    62m49.391s
>
> sys     9m46.608s
>
> It seemed like an odd place to finish “1^st round”, so I took a look 
> around there, checking various timestamps to try to see where it quit, 
> and found the last command executed was this line:
>
> ## verify all RPMs SRPMs we download for the GPG keys
>
> find ./output -type f -name "*.rpm" | xargs rpm -K | grep -i "MISSING 
> KEYS" > ./rpm-gpg-key-missing.txt
>
> Because I had no missing keys, the last piped command returned a 
> non-zero status. And since this script is launched with “bash -e” on 
> the first line, and I ran the script directly instead of “bash 
> download_mirror.sh”, the script exited at this point.
>
> The other download scripts use “bash -e” here as well. Since these are 
> called directly from download_mirror.sh, they could be exiting early 
> silently.
>
> Cheers,
>
> Don.
>
> *Don Penney*, Developer, *Wind River*
>
>
>
> _______________________________________________
> Starlingx-discuss mailing list
> Starlingx-discuss at lists.starlingx.io
> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20180726/2d10c519/attachment.html>


More information about the Starlingx-discuss mailing list