Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477840 - app-shells/bash-4.2_p45 — process substitution considered syntax error
Summary: app-shells/bash-4.2_p45 — process substitution considered syntax error
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-23 02:27 UTC by 8573dd
Modified: 2013-09-13 04:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.xz (emerge-info.xz,2.54 KB, application/x-xz)
2013-07-23 02:27 UTC, 8573dd
Details
The (uncompressed) output of `emerge --info bash`, attached at ryao’s request. (emerge-info-bash,5.00 KB, text/plain)
2013-07-24 19:27 UTC, 8573dd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 8573dd 2013-07-23 02:27:11 UTC
Created attachment 353950 [details]
emerge-info.xz

Installing Gentoo Linux, running `genkernel initramfs`, I get the following output:

    /usr/share/genkernel/gen_funcs.sh: line 254: syntax error near unexpected token `<'
    /usr/share/genkernel/gen_funcs.sh: line 254: `  done < <(find "${CACHE_DIR}" -maxdepth 1 -type f -name '*.tar.*' -o -name '*.bz2')'
    Could not read /usr/share/genkernel/gen_funcs.sh

The full text of the function in which the error occurs is:

    setup_cache_dir()
    {
    
    [ ! -d "${CACHE_DIR}" ] && mkdir -p "${CACHE_DIR}"
    
    if [ "${CLEAR_CACHE_DIR}" == 'yes' ]
    then
            print_info 1 "Clearing cache dir contents from ${CACHE_DIR}"
            while read i
            do
                    print_info 1 "   >> removing ${i}"
                    rm "${i}"
            done < <(find "${CACHE_DIR}" -maxdepth 1 -type f -name '*.tar.*' -o -name '*.bz2')
    fi
   
    }

As a test, I ran `cat < <(echo foo)` and `while read x; do echo $x; done < <(echo $'foo\nbar')` in bash (gen_funcs.sh being a bash script), and got the same “syntax error near unexpected token `<'” error message for each.

I then ran the same commands in bash outside the installation chroot, in the environment of the installation live-disc (a System Rescue CD), which gave the expected output (“foo” and “foo<newline>bar”).

Bash on a nearby Mac also gave the expected output.

All three environments have bash version 4.2.45.

The same commands in zsh gave the expected output in all three environments.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-23 13:59:34 UTC
Comment on attachment 353950 [details]
emerge-info.xz

Why did you compress it?!?
Comment 2 8573dd 2013-07-23 18:08:20 UTC
(In reply to Jeroen Roovers from comment #1)
> Why did you compress it?!?

So it would consume less of your storage space. Should I not do that? Are attachments transparently compressed?
Comment 3 8573dd 2013-07-24 19:27:02 UTC
Created attachment 354122 [details]
The (uncompressed) output of `emerge --info bash`, attached at ryao’s request.
Comment 4 Richard Yao (RETIRED) gentoo-dev 2013-07-24 19:36:54 UTC
`cat < <(echo foo)` works for me on my system. It is strange it that it does not work on yours. My guess is that devpts is not mounted at /dev/pts.
Comment 5 8573dd 2013-07-24 20:18:14 UTC
(In reply to Richard Yao from comment #4)
> My guess is that devpts is not mounted at /dev/pts.

# ls -l /dev/pts
total 0
crw--w---- 1 root tty  136, 0 Jul 24 13:15 0
crw--w---- 1 root tty  136, 1 Jul 24 13:15 1
crw--w---- 1 root tty  136, 2 Jul 24 12:03 2
crw--w---- 1 root tty  136, 3 Jul 21 10:18 3
crw--w---- 1 root tty  136, 4 Jul 23 17:51 4
crw--w---- 1 root tty  136, 5 Jul 21 18:26 5
crw--w---- 1 root tty  136, 6 Jul 21 10:18 6
crw--w---- 1 root tty  136, 7 Jul 24 12:21 7
crw--w---- 1 root tty  136, 8 Jul 22 18:57 8
c--------- 1 root root   5, 2 Jul 17 14:59 ptmx
Comment 6 8573dd 2013-07-26 20:06:52 UTC
I don’t know what the problem was, but it seems to have been cured by a reboot.