The cdrom_get_cds() function improperly tests for the existence of a given file when determining which CD of a given set has been provided. The problem is with this line: @@ -1512,7 +1512,7 @@ export CDROM_SET=-1 for f in ${CDROM_CHECK_1//:/ } ; do ((++CDROM_SET)) - [[ -e ${CD_ROOT}/${f} ]] && break + [[ -e ${CDROM_ROOT}/${f} ]] && break done export CDROM_MATCH=${f} return $CD_ROOT does not exist at that point, so it's checking for the presence of "/${f}", which, of course, fails. It should instead check "${CDROM_ROOT}/${f}", which will work as expected. Attached patch will fix the problem. Please see also bug 195868. Reproducible: Always Steps to Reproduce: Try to install an ebuild (such as Unreal Tournament in bug 134156) that: 1. copies from CD media 2. has multiple versions of the CD media 3. using $CD_ROOT[_n] to specify the location of the media As described in bug 195868, this check will also fail in an unpredictable manner by returning the last option checked whether it or nothing was matched. Actual Results: ebuild will fail stating the proper CD was not detected Expected Results: ebuild should install
Created attachment 238089 [details, diff] cdrom_get_cds fix
Thanks for the find, Jared. Its now committed to the tree.