I am facing the problem that the README.gentoo needs to be different for a new release which is in the same slot. Please allow to define a custom name for README.gentoo.
I remember we added a logic for slots: elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo But, indeed, it will collide, what do you think about simply modifying the cp to: cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo-${SLOT%/*} ?
That's not the problem. Version 1-5 SLOT=0 has version 1 of README.gentoo but due to changes in version 6 I need to adopt the README.gentoo. so Version 6-10 SLOT=0 has version 2 of README.gentoo But I cannot have different README.gentoo for the same SLOT.
(In reply to Justin Lecher from comment #2) [...] > But I cannot have different README.gentoo for the same SLOT. Well, the original idea was to include messages that were placed as elog messages before in the README.gentoo file and, then, I didn't think on any case needing different README.gentoo for the same SLOT :/
aufs provides additional patches which are installed into docdir, so that you can apply manually to your kernel sources if wanted. I am pointing to those patches in the README.gentoo. Now upstream renamed one of those patches, which in turn needs the README.gentoo to be adopted.
I guess I am missing something. Looking to sys-kernel/aufs-sources I would only change eclass to: cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo-${SLOT%/*} and, then, you would only need to have REAME.gentoo-3.15.0 showing updated patch, the 3.14.7 showing the older one... :/
But this would mean I need to create a new README.gentoo-${SLOT} for every new SLOT with the same content as before, as long as one SLOT still uses the old patch name. Wouldn't it be simpler to allow specifying the name via a variable.
Ah, you are true. I would opt for a variable to append a suffix to README.gentoo then (to keep the "README.gentoo" pattern). Will work on it as soon as I am able to (I am really busy now in real life looking for a new lab :/, sorry for the delays :( )
Created attachment 379564 [details, diff] 1.patch Sorry for the delay, try this one please. Looks to work ok for me :)
My idea was this $ cvs diff readme.gentoo.eclass Index: readme.gentoo.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/readme.gentoo.eclass,v retrieving revision 1.8 diff -u -B -r1.8 readme.gentoo.eclass --- readme.gentoo.eclass 17 Mar 2014 08:17:27 -0000 1.8 +++ readme.gentoo.eclass 24 Jun 2014 11:43:16 -0000 @@ -48,6 +48,11 @@ # @DESCRIPTION: # If non-empty this variable forces elog messages to be printed. +# @ECLASS-VARIABLE: FILE_SUFFIX +# @DESCRIPTION: +# If you want to specify a suffix for README.gentoo file please export it. +: ${FILE_SUFFIX:=""} + # @FUNCTION: readme.gentoo_create_doc # @DESCRIPTION: # Create doc file with ${DOC_CONTENTS} variable (preferred) and, if not set, @@ -68,9 +73,9 @@ fi eshopts_pop elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then - cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo + cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die elif [[ -f "${FILESDIR}/README.gentoo" ]]; then - cp "${FILESDIR}/README.gentoo" "${T}"/README.gentoo + cp "${FILESDIR}/README.gentoo${FILE_SUFFIX}" "${T}"/README.gentoo || die else die "You are not specifying README.gentoo contents!" fi We don't need to save it with a suffix because *doc function install into /usr/share/doc/${PF}, so there will be no clash.
Ah, ok, we don't need suffixed file in install filesystem because we have a /usr/share/doc per revision ;) Feel free to commit your patch if you have time (if not, I will try to commit this afternoon :))
+ 24 Jun 2014; Pacho Ramos <pacho@gentoo.org> readme.gentoo.eclass: + Allow to handle more README.gentoo files (#513190 by Justin Lecher) +