Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 561386

Summary: app-emulation/libvirt-1.2.19: /lib64/rc/sh/gendepends.sh: 190: /etc/init.d/libvirt-guests: Syntax error: redirection unexpected
Product: Gentoo Linux Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: Current packagesAssignee: Doug Goldstein (RETIRED) <cardoe>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, dustin, tamiko
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    

Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-09-24 14:11:34 UTC
# rc-update -u
 * Caching service dependencies ...
/lib64/rc/sh/gendepends.sh: 190: /etc/init.d/libvirt-guests: Syntax error: redirection unexpected                                                         [ ok ]
# qfile -Cv /etc/init.d/libvirt-guests
app-emulation/libvirt-1.2.19 (/etc/init.d/libvirt-guests)
#
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-09-24 14:12:01 UTC
# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Sep 18 10:02 /bin/sh -> dash
Comment 2 Alexander Tsoy 2015-09-25 09:26:13 UTC
What's the point of running read twice?

    while read -r line
    do
        # tokenize the data
        read -r uri uuid <<<"${line}"
        ... snip ...
    done <"${somefile}"

Why not just

    while read -r uri uuid
    do
        ... snip ...
    done <"${somefile}"

?
Comment 3 Matthias Maier gentoo-dev 2015-10-03 18:18:40 UTC
commit d49be3cdca529511f81110a56c428045620fc46a
Author: Matthias Maier <tamiko@gentoo.org>
Date:   Sat Oct 3 12:59:12 2015 -0500

    app-emulation/libvirt: Avoid bashism in runscript, bug 561386
    
    Thanks to Lars Wendler and Alexander Tsoy.
    
    Gentoo-Bug: 561386
    
    Package-Manager: portage-2.2.22