* ERROR: net-wireless/hostapd-2.6::gentoo failed (prepare phase): * eapply_user (or default) must be called in src_prepare()! Why are you committing untested ebuilds?
commit 14d0f0fabefbc5cc25f28dab4b8402f1a82a3c89 Author: Lars Wendler <polynomial-c@gentoo.org> Date: Thu Oct 6 09:47:03 2016 net-wireless/hostapd: Fixed incomplete EAPI-6 conversion (bug #596306). Package-Manager: portage-2.3.1 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> Sorry to hijack this but I need the ebuild being installable.
*** Bug 596324 has been marked as a duplicate of this bug. ***
Seems like I forgot to copy the final version into my git tree before commiting it :S . Thanks for fixing it.
*** Bug 596330 has been marked as a duplicate of this bug. ***
Well, the final version is not working, the user patches won't apply, the working directory is wrong and set to: /var/tmp/portage/net-wireless/hostapd-2.6/work/hostapd-2.6/hostapd Since src/ lives in hostapd-2.6 which needs to be patched, afaik the working directory for patches and source prepare should be: /var/tmp/portage/net-wireless/hostapd-2.6/work/hostapd-2.6 probably a workaround like: src_prepare() { cd "${S}/.." default } might help. #### below snipped of failed patching… >>> Preparing source in /var/tmp/portage/net-wireless/hostapd-2.6/work/hostapd-2.6/hostapd ... * Applying patches from /etc/portage/patches/net-wireless/hostapd-2.6 ... * hostapd-2.6-optional_rfkill.patch ... The text leading up to this was: -------------------------- |diff -urNp src.original/drivers/drivers.mak src/drivers/drivers.mak |--- src.original/drivers/drivers.mak 2016-10-02 20:51:11.000000000 +0200 |+++ src/drivers/drivers.mak 2016-10-06 15:19:48.911571053 +0200 -------------------------- No file to patch. Skipping patch. 4 out of 4 hunks ignored The text leading up to this was: -------------------------- |diff -urNp src.original/drivers/rfkill.h src/drivers/rfkill.h |--- src.original/drivers/rfkill.h 2016-10-02 20:51:11.000000000 +0200 |+++ src/drivers/rfkill.h 2016-10-06 15:22:08.936944380 +0200 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored [ !! ] * ERROR: net-wireless/hostapd-2.6::gentoo failed (prepare phase): * patch -p1 failed with /etc/portage/patches/net-wireless/hostapd-2.6/hostapd-2.6-optional_rfkill.patch * * Call stack: * ebuild.sh, line 115: Called src_prepare * environment, line 2172: Called default * phase-functions.sh, line 805: Called default_src_prepare * phase-functions.sh, line 870: Called __eapi6_src_prepare * environment, line 192: Called eapply_user * environment, line 568: Called eapply '/etc/portage/patches/net-wireless/hostapd-2.6' * environment, line 545: Called _eapply_patch '/etc/portage/patches/net-wireless/hostapd-2.6/hostapd-2.6-optional_rfkill.patch' ' ' * environment, line 487: Called __helpers_die 'patch -p1 failed with /etc/portage/patches/net-wireless/hostapd-2.6/hostapd-2.6-optional_rfkill.patch' * isolated-functions.sh, line 117: Called die * The specific snippet of code: * die "$@" * * If you need support, post the output of `emerge --info '=net-wireless/hostapd-2.6::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-wireless/hostapd-2.6::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-wireless/hostapd-2.6/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-wireless/hostapd-2.6/temp/environment'. * Working directory: '/var/tmp/portage/net-wireless/hostapd-2.6/work/hostapd-2.6/hostapd' * S: '/var/tmp/portage/net-wireless/hostapd-2.6/work/hostapd-2.6/hostapd'
Confirmed, the following change will resolve the issue: diff -urNp hostapd-2.6.ebuild /usr/portage/net-wireless/hostapd/hostapd-2.6.ebuild --- hostapd-2.6.ebuild 2016-10-06 15:45:08.063603715 +0200 +++ /usr/portage/net-wireless/hostapd/hostapd-2.6.ebuild 2016-10-06 09:47:03.000000000 +0200 @@ -28,7 +28,6 @@ RDEPEND="${DEPEND}" S="${S}/${PN}" src_prepare() { - cd "${S}/.." default sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
(In reply to cilly from comment #6) > Confirmed, the following change will resolve the issue: > > diff -urNp hostapd-2.6.ebuild > /usr/portage/net-wireless/hostapd/hostapd-2.6.ebuild > --- hostapd-2.6.ebuild 2016-10-06 15:45:08.063603715 +0200 > +++ /usr/portage/net-wireless/hostapd/hostapd-2.6.ebuild 2016-10-06 > 09:47:03.000000000 +0200 > @@ -28,7 +28,6 @@ RDEPEND="${DEPEND}" > S="${S}/${PN}" > > src_prepare() { > - cd "${S}/.." > default > > sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \ Okay, this diff is in wrong direction, the cd line should be an addition.
(In reply to cilly from comment #7) > > S="${S}/${PN}" > > > > src_prepare() { > > - cd "${S}/.." > > default > > Okay, this diff is in wrong direction, the cd line should be an addition. <QA hat> No, ebuilds should generally call eapply_user in ${S}. If the source lives somewhere else, then S has a wrong value, in the first place. Also, S="${S}/${PN}" in global scope? That's another QA violation. PMS reference: https://projects.gentoo.org/pms/6/pms.html#x1-118002 </QA hat>
(In reply to Ulrich Müller from comment #8) > No, ebuilds should generally call eapply_user in ${S}. In EAPI 6 eapply_user is the default, or did I miss something?
(In reply to cilly from comment #9) > (In reply to Ulrich Müller from comment #8) > > No, ebuilds should generally call eapply_user in ${S}. > > In EAPI 6 eapply_user is the default, or did I miss something? Yes, the default src_prepare will call it. (So nothing wrong with "default" instead of directly "eapply_user" in src_prepare.)
Should have been fixed by... 06 Oct 2016; Lars Wendler <polynomial-c@gentoo.org> hostapd-2.6.ebuild: Fixed incomplete EAPI-6 conversion (bug #596306). ...?
(In reply to Wolfram Schlich from comment #11) > Should have been fixed by... > > 06 Oct 2016; Lars Wendler <polynomial-c@gentoo.org> hostapd-2.6.ebuild: > Fixed incomplete EAPI-6 conversion (bug #596306). > > ...? Indeed.
Why is this marked as resolved and fixed while it is still broken?
In EAPI 6 default means user-patches support. But user-patches won't apply, see my earlier comments. These changes need to be applied to the ebuild: diff -burN /usr/portage/net-wireless/hostapd/hostapd-2.6.ebuild /usr/local/portage/overlays/local/net-wireless/hostapd/hostapd-2.6.ebuild --- /usr/portage/net-wireless/hostapd/hostapd-2.6.ebuild 2016-10-14 19:01:21.000000000 +0200 +++ /usr/local/portage/overlays/local/net-wireless/hostapd/hostapd-2.6.ebuild 2016-10-06 15:45:08.063603715 +0200 @@ -30,6 +28,7 @@ S="${S}/${PN}" src_prepare() { + cd "${S}/.." default sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \ Otherwise the ebuild will fail is a user-patch is used. Please commit this change, so we finally can close this issue. Thanks.
@ cilly: No, you have to respin patches for any EAPI=6. From https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6/: > No -p* guessing. Instead, it defaults to -p1 There's nothing wrong with the hostapd ebuild. src_prepare() starts in the correct folder. Changing the CWD would be wrong.
(In reply to Thomas Deutschmann from comment #15) > @ cilly: No, you have to respin patches for any EAPI=6. From > https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6/: > > > No -p* guessing. Instead, it defaults to -p1 > > There's nothing wrong with the hostapd ebuild. src_prepare() starts in the > correct folder. Changing the CWD would be wrong. Did you test it?
cilly was right. Users were unable to patch src/drivers for example: > commit 0e0eafba82bba0fa9144acdcd97c1936a3b9d6ab > Author: Thomas Deutschmann > Date: Thu Nov 24 02:49:49 2016 +0100 > > net-wireless/hostapd: Allow users to apply patches to src/drivers > > Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=596306#c5 > > Package-Manager: portage-2.3.2