On 01/17/2013 07:17 AM, Pacho Ramos wrote: > El lun, 14-01-2013 a las 01:29 -0800, Zac Medico escribió: >> On 01/13/2013 04:59 AM, Pacho Ramos wrote: >>> El dom, 13-01-2013 a las 04:54 -0800, Zac Medico escribió: >>>> On 01/13/2013 04:18 AM, Pacho Ramos wrote: >>>>> What about this approach? >>>> >>>> You should use ${SLOT%/*}, in order to exclude the sub-slot, because you >>>> don't care about the sub-slot and the slash would cause problems. >>> >>> Thanks, updated eclass attached >>> >> >> Here are a few problems I see with readme.gentoo_print_elog: >> >> 1) contains duplication of code >> >> 2) [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]] condition seems >> wrong, shouldn't it just use [[ -f "${T}"/README.gentoo ]] since the >> file was copied to "${T}"/README.gentoo iby readme.gentoo_create_doc? > > Yeah, probably both can be merged as checking for PACKAGENAME:SLOT > should be enough, the problem is how to check it :S > >> >> 3) [[ "${REPLACING_VERSIONS}:${SLOT%/*}" ]] condition seems wrong >> because SLOT is always non-empty and that means the condition is always >> true. >> > > Is there a way to check if category/package_name:$SLOT was installed > before merging?
REPLACING_VERSIONS always refers to packages with identical SLOT to the current package So, if ${REPLACING_VERSIONS} is non-empty, then the current package replaces another package with identical SLOT. -- Thanks, Zac