Created attachment 330570 [details, diff] patch against ntp-4.2.6_p5-r1.ebuild Changes to be added as ntp-4.2.6_p5-r2: - EAPI bumped to 4 to make portage prefix-aware - emake install + dodoc = EAPI4 default - ${D} -> ${ED} - ${ROOT} -> ${EROOT} - don't run fperms and fowners in prefix - dosed is obsolete in EAPI=4 - inherited user.eclass due to enewgroup and enewuser
Comment on attachment 330570 [details, diff] patch against ntp-4.2.6_p5-r1.ebuild >- use caps || dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd >- dosed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd >+ use caps || sed "s|-u ntp:ntp||" /etc/conf.d/ntpd || die >+ sed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd || die pretty sure this is wrong for two reasons: - missing ${ED} on file name after dosed->sed - addition of ||die in use caps statement means this always dies when USE=-caps rest looks fine
Created attachment 330638 [details, diff] patch against ntp-4.2.6_p5-r1.ebuild (In reply to comment #1) > Comment on attachment 330570 [details, diff] [details, diff] > patch against ntp-4.2.6_p5-r1.ebuild > > >- use caps || dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd > >- dosed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd > >+ use caps || sed "s|-u ntp:ntp||" /etc/conf.d/ntpd || die > >+ sed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd || die > > pretty sure this is wrong for two reasons: > - missing ${ED} on file name after dosed->sed > - addition of ||die in use caps statement means this always dies when > USE=-caps You are right, the "${ED}" was missing and also the -i switch for sed, patch updated. I don't understand the other concern. A || B || C is the same as A || { B || C } and { B || C } was inside a function (dodsed) before.
(In reply to comment #2) yes, the use||sed||die logic works correctly. generally i try to avoid that construct because it can be confusing at a glance :p. this patch is OK to commit
(In reply to comment #3) > (In reply to comment #2) > > yes, the use||sed||die logic works correctly. generally i try to avoid that > construct because it can be confusing at a glance :p. If you prefer if use caps ; then sed .. || die fi for readability, I am happy to commit that. > > this patch is OK to commit
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > > yes, the use||sed||die logic works correctly. generally i try to avoid that > > construct because it can be confusing at a glance :p. > If you prefer > if use caps ; then Of course: if ! use caps ; then
(In reply to comment #4) if you wouldn't mind, that'd be preferable
Committed in the preferred form, thanks.