Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647258 - sys-apps/less lesspipe cue sheet bug: ++ WARN: could not retrieve file info for `Rotting Christ - Passage to Arcturo.bin': No such file or directory
Summary: sys-apps/less lesspipe cue sheet bug: ++ WARN: could not retrieve file info f...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-10 23:06 UTC by Hadrien Lacour
Modified: 2019-12-11 09:49 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hadrien Lacour 2018-02-10 23:06:19 UTC
Less seems to have a problem with cue sheets; it can't open them and gives me a cryptic error message:
> less Rotting\ Christ\ -\ Passage\ to\ Arcturo.cue
++ WARN: could not retrieve file info for `Rotting Christ - Passage to Arcturo.bin': No such file or directory
++ WARN: init failed
>

After investigation, it's a bug in lesspipe (all versions). The following patch fixes the faulty logic.

--- /usr/bin/lesspipe   2018-02-10 23:37:11.860552815 +0100
+++ lesspipe    2018-02-11 00:03:41.984660197 +0100
@@ -171,7 +171,7 @@
        *.ogg)        ogginfo "$1" ;;
        *.flac)       metaflac --list "$1" ;;
        *.torrent)    torrentinfo "$1" || torrentinfo-console "$1" || ctorrent -x "$1" ;;
-       *.bin|*.cue|*.raw)
+       *.bin|*.raw)
                # not all .bin/.raw files are cd images #285507
                # fall back to lesspipe_file if .cue doesn't exist, or if
                # cd-info failed to parse things sanely
Comment 1 SpanKY gentoo-dev 2019-09-15 07:43:07 UTC
i can't reproduce.  please attach an example .cue file and describe whether you have a .bin/.raw file in addition to it.
Comment 2 Hadrien Lacour 2019-09-15 08:34:03 UTC
I can't reproduce with less anymore but lesspipe itself still gives me the same error message. Maybe less changed the way it handles the exit status of lesspipe?

> LESSDEBUG=1 lesspipe 'Rotting Christ - Passage to Arcturo.cue'
+ trap 'exit 0' PIPE
+ [[ -z Rotting Christ - Passage to Arcturo.cue ]]
+ [[ Rotting Christ - Passage to Arcturo.cue == \-\V ]]
+ [[ Rotting Christ - Passage to Arcturo.cue == \-\-\v\e\r\s\i\o\n ]]
+ [[ Rotting Christ - Passage to Arcturo.cue == \-\h ]]
+ [[ Rotting Christ - Passage to Arcturo.cue == \-\-\h\e\l\p ]]
+ recur=0
+ [[ -n 1 ]]
+ lesspipe 'Rotting Christ - Passage to Arcturo.cue'
+ local match=
+ [[ -z '' ]]
+ match='Rotting Christ - Passage to Arcturo.cue'
++ guesscompress 'Rotting Christ - Passage to Arcturo.cue'
++ case "$1" in
++ echo cat
+ local DECOMPRESSOR=cat
+ [[ -x /home/hadrien/.lessfilter ]]
+ local ignore
+ [[ -d Rotting Christ - Passage to Arcturo.cue ]]
+ [[ ! -f Rotting Christ - Passage to Arcturo.cue ]]
+ case "${match}" in
+ [[ -e Rotting Christ - Passage to Arcturo.cue ]]
+ cd-info --no-header --no-device-info 'Rotting Christ - Passage to Arcturo.cue'
++ WARN: could not retrieve file info for `Rotting Christ - Passage to Arcturo.bin': No such file or directory
++ WARN: init failed
cd-info: Error in automatically selecting driver for input Rotting Christ - Passage to Arcturo.cue.
+ lesspipe_file 'Rotting Christ - Passage to Arcturo.cue'
++ file -L -- 'Rotting Christ - Passage to Arcturo.cue'
+ local 'out=Rotting Christ - Passage to Arcturo.cue: ASCII text, with CRLF line terminators'
+ local suffix
+ case ${out} in
+ return 1
+ lesspipe 'Rotting Christ - Passage to Arcturo.cue'
++ WARN: could not retrieve file info for `Rotting Christ - Passage to Arcturo.bin': No such file or directory
++ WARN: init failed


Either we let it be, or we can add a check like so:

--- /usr/bin/lesspipe   2019-09-15 09:58:16.190318058 +0200
+++ lesspipe    2019-09-15 10:33:07.842941036 +0200
@@ -171,7 +171,7 @@
        *.ogg)        ogginfo "$1" ;;
        *.flac)       metaflac --list "$1" ;;
        *.torrent)    torrentinfo "$1" || torrentinfo-console "$1" || ctorrent -x "$1" ;;
-       *.bin|*.cue|*.raw)
+       *.bin|*.raw)
                # not all .bin/.raw files are cd images #285507
                # fall back to lesspipe_file if .cue doesn't exist, or if
                # cd-info failed to parse things sanely
@@ -179,6 +179,10 @@
                        && cd-info --no-header --no-device-info "$1" \
                        || lesspipe_file "$1"
                ;;
+       *.cue)
+               { [[ -e ${1%.*}.bin ]] || [[ -e ${1%.*}.raw ]] ;} && \
+                       cd-info --no-header --no-device-info "$1"
+               ;;
        *.iso)
                iso_info=$(isoinfo -d -i "$1")
                echo "${iso_info}"
Comment 3 hoffman9417calvin@gmx.com 2019-12-11 09:49:59 UTC
Yeah, this could be something with less/pipe itself. http://mrpromocode.com.au/