Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 240233 - Provide an unified way in eutils.eclass to skip make when needed
Summary: Provide an unified way in eutils.eclass to skip make when needed
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-06 09:26 UTC by Pacho Ramos
Modified: 2010-02-01 14:10 UTC (History)
0 users

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


Attachments
emake.patch (emake.patch,597 bytes, patch)
2008-10-06 09:27 UTC, Pacho Ramos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2008-10-06 09:26:54 UTC
(this is the second part of bug 240227 )

Currently emake dies when Makefile is not found, I suggest change this behavior to simply skipping "make" stage. You will see (like with configure) that some eclass and a lot of ebuilds are already workarounding current portage behavior running things like "true" or "einfo..." 

Attached patch will make "emake" to simply skip make stage when Makefile is not present, this is a common case with some binary packages or apps that need a trivial installation.

My proposed emake will check the following before skipping:
1. Will check for "Makefile", "makefile" and "GNUmakefile", as shown in "make" man page, seems that these are the common names for makefiles. In case any of these files are found, emake will run as currently

2. If an ebuild is using "-f" option for specifying other makefile, emake will still use it as is doing currently. For this I use "getopts", maybe it is not perfectly used because I never used it before and I have learned to use it reading bash man page and seeing and script for converting dvds to vcds

Then, in summary, the behavior with the patch will be the following:

If any makefile is found, it will run as currently, if not, a warning will be shown for letting maintainer know the situation:
 * emake: Makefile not found, skipping make stages..."

Thanks a lot for considering this :-)

Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2008-10-06 09:27:07 UTC
Created attachment 167435 [details, diff]
emake.patch
Comment 2 Zac Medico gentoo-dev 2008-10-06 19:26:11 UTC
This sort of change requires an EAPI bump since we don't want ebuild authors
relying on new behavior in ebuilds that might be installed by an older version
of portage.
Comment 3 SpanKY gentoo-dev 2010-01-18 06:40:02 UTC
why exactly do you want this change ?  this smells like a bad idea all over.  i dont want `emake` trying to magically guess my intentions and just screwing it all up.

obvious errors in your code and your proposal: you dont handle the -C or -f options.  you dont handle implicit rules (there are some ebuilds in the tree that use `emake` and no makefiles via implicit rules).

you also provide no actual examples of how this proposal would help.  all in all, i propose we close this as WONTFIX.
Comment 4 Pacho Ramos gentoo-dev 2010-01-18 18:43:28 UTC
(In reply to comment #3)
> why exactly do you want this change ?  this smells like a bad idea all over.  i
> dont want `emake` trying to magically guess my intentions and just screwing it
> all up.
> 
> obvious errors in your code and your proposal: you dont handle the -C or -f
> options.  you dont handle implicit rules (there are some ebuilds in the tree
> that use `emake` and no makefiles via implicit rules).
> 
> you also provide no actual examples of how this proposal would help.  all in
> all, i propose we close this as WONTFIX.
> 

I agree that patch has that pointed issues :-S, but, about why I want that behavior, I think that I have explained it already on my first post:

"You will see (like with configure) that some
eclass and a lot of ebuilds are already workarounding current portage behavior
running things like "true" or "einfo..." "
"Attached patch will make "emake" to simply skip make stage when Makefile is not
present, this is a common case with some binary packages or apps that need a
trivial installation."
Comment 5 SpanKY gentoo-dev 2010-01-18 21:59:09 UTC
i asked for real examples.  copying & pasting your summary provides none.

considering the downsides i listed that are impossible to work around if your version is implemented, the theoretical gains dont come close to outweighing them.  you also have no way of catching issues where a makefile is supposed to be generated but due to some random error, it is not.  your emake would then be silently skipped.

if you wanted to propose a new command like "maybe_emake" that did all this kind of magical guesswork, i wouldnt care.  but breaking "emake" isnt acceptable.
Comment 6 Pacho Ramos gentoo-dev 2010-01-18 22:16:30 UTC
(In reply to comment #5)
> i asked for real examples.  copying & pasting your summary provides none.
> 
> considering the downsides i listed that are impossible to work around if your
> version is implemented, the theoretical gains dont come close to outweighing
> them.  you also have no way of catching issues where a makefile is supposed to
> be generated but due to some random error, it is not.  your emake would then be
> silently skipped.
> 
It wouldn't be "silently" skipped, a " * emake: Makefile not found, skipping make stages..." message would be shown

> if you wanted to propose a new command like "maybe_emake" that did all this
> kind of magical guesswork, i wouldnt care.  but breaking "emake" isnt
> acceptable.
> 

But, yes, maybe a "maybe_emake" or some standarized way for trying to unify current workarounds like running "true", "einfo"... would work and also don't touch emake :-/, then, it would be much better
Comment 7 SpanKY gentoo-dev 2010-01-18 22:27:13 UTC
ok, it wouldnt be "silently" skipping the step, but it would practically be the same thing.

if you're ok with a new command, then simply add it to eutils and merge the eclasses/ebuilds you refer to indirectly.  you could do that today and post it to the mailing list, and you could use it in all EAPIs instead of just the latest ones.
Comment 8 Pacho Ramos gentoo-dev 2010-01-18 22:34:44 UTC
I will do it as soon as I am able to (I am now too busy but I expect to have enough time at mid-february or so)

Thanks for reviewing this and sorry for the inconvenience
Comment 9 Pacho Ramos gentoo-dev 2010-02-01 14:10:30 UTC
After rethinking it, seems that adding a new command to simply run "einfo "Nothing to compile" doesn't make much sense :-/