Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409611 - autotools.eclass: doesn't add DEPEND when re-inherited with changed AUTOTOOLS_AUTO_DEPEND
Summary: autotools.eclass: doesn't add DEPEND when re-inherited with changed AUTOTOOLS...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-25 09:09 UTC by Michał Górny
Modified: 2014-11-15 07:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
autotools-utils.eclass: fix AUTOTOOLS_AUTO_DEPEND handling (autotools-utils.eclass.patch,959 bytes, patch)
2012-05-20 11:11 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-03-25 09:09:04 UTC
Consider the following.

a.ebuild:
	inherit x autotools

x.eclass:
	AUTOTOOLS_AUTO_DEPEND=no inherit autotools


Considering that x.eclass uses one of autotools.eclass functions but doesn't need DEPENDs added to all packages using it.

This used to work fine before; the second inherit of autotools added necessary DEPENDs as requested by the ebuild. Nowadays, with the double-inherit prevention the dependencies are no longer added and random packages fail to build in the tree.
Comment 1 SpanKY gentoo-dev 2012-03-25 15:52:56 UTC
would be easy to add a check to the autotools.eclass though so ebuild maintainers would know up front they have to include autotools first -- if they don't, the eclass would call `die`.  not sure if this would block any workflows though.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-03-25 16:30:58 UTC
(In reply to comment #1)
> would be easy to add a check to the autotools.eclass though so ebuild
> maintainers would know up front they have to include autotools first -- if
> they don't, the eclass would call `die`.  not sure if this would block any
> workflows though.

And it would cause even a larger and more noticeable failure when a number of ebuilds starts to die randomly.
Comment 3 SpanKY gentoo-dev 2012-03-25 16:46:07 UTC
you have to provide an example of how an ebuild would start to "randomly" die.  once all existing ebuilds are fixed, then anything new written would get the right behavior from the start.

i'm not looking for useless hyperbole but actual examples.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-03-25 20:04:52 UTC
(In reply to comment #3)
> you have to provide an example of how an ebuild would start to "randomly"
> die.  once all existing ebuilds are fixed, then anything new written would
> get the right behavior from the start.

Are you willing to find all broken ebuilds _including_ those in overlays and fix them?
Comment 5 William Hubbs gentoo-dev 2012-03-25 20:38:31 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > you have to provide an example of how an ebuild would start to "randomly"
> > die.  once all existing ebuilds are fixed, then anything new written would
> > get the right behavior from the start.
> 
> Are you willing to find all broken ebuilds _including_ those in overlays and
> fix them?

It is up to the overlay authors to keep up with what is happening in the main tree; not the other way around.
Comment 6 SpanKY gentoo-dev 2012-03-26 02:57:10 UTC
(In reply to comment #5)

+1

we can go either way: eclass silently supports any inherit order at a performance penalty, or the eclass includes warnings to enforce the order to keep the current performance gains.

obviously i prefer the latter as the long term is better at the cost of more short term work.  so if there are no examples as to why this won't work, that's the direction we'll take.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-03-26 07:04:11 UTC
(In reply to comment #6)
> (In reply to comment #5)
> 
> +1
> 
> we can go either way: eclass silently supports any inherit order at a
> performance penalty, or the eclass includes warnings to enforce the order to
> keep the current performance gains.
> 
> obviously i prefer the latter as the long term is better at the cost of more
> short term work.  so if there are no examples as to why this won't work,
> that's the direction we'll take.

Or check for the variable changes but who would think of doing the easier thing. You can just use its value instead of that wannabe-asciiart, then it would be sourced twice when the order is incorrect. Of course, that would damage the 'performance gain'.
Comment 8 SpanKY gentoo-dev 2012-03-27 05:11:42 UTC
(In reply to comment #7)

sounds to me you have no actual examples but instead can only make lame attacks.  so i'll move on with the proposal i made since no one has any fact-based objections.
Comment 9 SpanKY gentoo-dev 2012-05-20 11:11:03 UTC
Created attachment 312339 [details, diff]
autotools-utils.eclass: fix AUTOTOOLS_AUTO_DEPEND handling

Michał: you'll need this patch for autotools-utils.eclass.  or i can just commit it.  lemme know either way.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-20 12:06:12 UTC
(In reply to comment #9)
> Created attachment 312339 [details, diff] [details, diff]
> autotools-utils.eclass: fix AUTOTOOLS_AUTO_DEPEND handling
> 
> Michał: you'll need this patch for autotools-utils.eclass.  or i can just
> commit it.  lemme know either way.

That doesn't change a thing. Just rename + forced override of user-specified variable.
Comment 11 SpanKY gentoo-dev 2012-05-24 05:39:13 UTC
(In reply to comment #10)

read it closer.  the variable now stays set instead of changing values past the inherit statement.
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-28 07:35:08 UTC
Committed.
Comment 13 SpanKY gentoo-dev 2012-06-14 03:40:42 UTC
well, that eclass is only one of the ones we need to fix first before i can enable misbehavior detection
Comment 14 SpanKY gentoo-dev 2014-11-15 07:50:03 UTC
i've fixed xfconf.eclass as it was forcing AUTOTOOLS_AUTO_DEPEND to no even when ebuilds were not using EAUTORECONF but were trying to run autotools themselves:
http://sources.gentoo.org/eclass/xfconf.eclass?r1=1.46&r2=1.47

and i've deployed the fatal check in case the value changes:
http://sources.gentoo.org/eclass/autotools.eclass?r1=1.168&r2=1.169