When trying to open a cue sheet file with less, the user only gets the following text instead of the .cue file contents: ++ WARN: could not retrieve file info for `<filename>.bin': No such file or directory ++ WARN: init failed The problem is that /usr/bin/lesspipe wrongly assumes that .cue files would belong to .bin or .raw files. It then calls 'cd-info --no-header --no-device-info $1' on it, which leads to the above message. The typical use case rather is a .cue file that corresponds to a FLAC or MP3 file, or even a .cue without any additional binary file. The solution is to remove "*.cue" from the file name check in line 164 of /usr/bin/lesspipe (Version 457 of sys-apps/less). This allows opening .cue files directly (which are normal text files anyway), but still allows usage of cd-info when .bin or .raw file areb opened directly.
(In reply to Kuli from comment #0) you really can't say "the typical use case". it might be your typical use case. that said, it works fine for me: $ less 'TRON- Legacy.cue' REM DATE 2010 REM DISCID 430EC217 REM COMMENT "ExactAudioCopy v1.0b1" PERFORMER "Unknown Artist" ... i'm using dev-libs/libcdio-0.90 over here which means cd-info does: $ cd-info --no-header --no-device-info TRON-\ Legacy.cue cd-info: Error in automatically selecting driver for input TRON- Legacy.cue. $ echo $? 1 you must post `emerge --info` with all of your bug reports, as well as version information for each package that you're using (like less & cdinfo).
Okay, maybe using .cue files for FLAC and MP3 files is not *the* typical use case, but it's a quite common use case. Currently, less only works for use cases where a corresponding .bin or .raw file exists. In all other cases, it fails. So even if only 10 % of the users don't use .bin files together with cue sheets, then it fails for 10 % of the users. I would call that a bug. And I have the strong believe that the percentage is much higher. If we remove *.cue from the file check, then everybody still can use less with the cd-info output by simply executing 'less file.bin' instead of 'less file.cue'. Since cue sheets are simple text files, and less is a text viewer, it makes pretty much sense to let less show the text contents if the user wants that. I'd assume that lesspipe has its usage in such cases where less can't display contents otherwise, e.g. as for the .bin file. Installed versions: sys-apps/less-457 dev-libs/libcdio-0.83 Output of emerge --info: Portage 2.1.12.2 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.8.13-gentoo x86_64) ================================================================= System uname: Linux-3.8.13-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5645_@_2.40GHz-with-gentoo-2.2 KiB Mem: 24692044 total, 6184176 free KiB Swap: 67108860 total, 67108860 free Timestamp of tree: Wed, 19 Jun 2013 00:45:01 +0000 ld GNU ld (GNU Binutils) 2.22 app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.3-r3, 3.2.3-r2 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j14" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X acl alsa amd64 berkdb bzip2 cli cracklib crypt cxx dbus dri flac fortran gdbm gif gpm iconv idn ipv6 java jpeg jpeg2k jpg mmap mmx modules mp3 mudflap multilib ncurses nls nptl nvidia ogg openmp pam pcre png readline session sse sse2 ssl ssse3 svg tcpd tiff truetype unicode vim-syntax vorbis xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de de_DE de_DE.UTF-8 en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
i already fixed this upstream while working on bug 285507 and it is part of the libcdio-0.90 release. that's why it works fine for me. 0.83 is known to be broken, but that's how it goes. once 0.90 goes stable, it'll fix it for you too.
Ah, perfect! I didn't know about the other bug. Thanks a lot!