Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 469696 - kernel-2.eclass: New USE flags and dependencies
Summary: kernel-2.eclass: New USE flags and dependencies
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: linux-3.11
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-05-13 15:56 UTC by Roman Žilka
Modified: 2021-08-28 16:57 UTC (History)
1 user (show)

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


Attachments
kernel-2.eclass.diff (kernel-2.eclass.diff,2.63 KB, patch)
2013-05-13 20:35 UTC, Roman Žilka
Details | Diff
kernel-2.eclass.diff (kernel-2.eclass.diff,2.64 KB, patch)
2013-05-13 20:43 UTC, Roman Žilka
Details | Diff
kernel-2.eclass.diff (kernel-2.eclass.diff,3.13 KB, patch)
2013-05-14 10:46 UTC, Roman Žilka
Details | Diff
kernel-2.eclass.diff (kernel-2.eclass.diff,3.15 KB, patch)
2013-05-14 11:10 UTC, Roman Žilka
Details | Diff
kernel-2.eclass.diff (kernel-2.eclass.diff,3.35 KB, patch)
2013-05-31 17:59 UTC, Roman Žilka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Žilka 2013-05-13 15:56:10 UTC
I know there's been some discussion about the right dependencies of the *-sources packages, but at any rate, ncurses probably shouldn't be mandatory. I think there should either be no such dep ("the user is smart enough"), or the ncurses dep should be controlled by USE="ncurses". The USE way is the cleanest IMO, and could be perhaps further extended to USE="gtk qt". For example, if I want to use "make gconfig", I have to install libglade by hand.

As for the infamous deps on lzop/xz-utils/gzip/bzip2, it's less of a deal, I guess, but again, it's natural in Gentoo to have them. Didn't somebody just forget to put USE flags to those packages? The flags "lzo", "lzma", "gzip" and "bzip2" are well and alive and even global.

(No, besides these two sets of flags I don't see a space for any other. "Running" the *-sources package is about compiling the kernel, not running the produced kernel.)

Reproducible: Always
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-13 16:28:44 UTC
To introduce such USE flags I guess we have to patch certain make options such that they bail out with an error that the USE flag needs to be enabled. Now we just assume these are present such that the full functionality can be used; but indeed, some users may not want all dependencies.

As for the compression formats, genpatches is only available in xz and bringing them out in all four file formats would be tedious to do. I don't see anyone that has an issue with this dependency as it is quite minimal; granted, there is improvement possible here but it would require changes to the eclass as well.

Patches to the eclass are welcome.
Comment 2 Roman Žilka 2013-05-13 18:12:33 UTC
(In reply to comment #1)
> To introduce such USE flags I guess we have to patch certain make options
> such that they bail out with an error that the USE flag needs to be enabled.

You're literal indeed. Wouldn't it be better to just extend the error messages that "make x/q/gconfig" print ("you don't have the necessary libs - remerge with USE=gtk")? The point is that maybe the make options will just happen to work for a user even without the USE flags. In which case - let them just use the make options freely.

> As for the compression formats, genpatches is only available in xz and
> bringing them out in all four file formats would be tedious to do. I don't
> see anyone that has an issue with this dependency as it is quite minimal;
> granted, there is improvement possible here but it would require changes to
> the eclass as well.

I didn't think of this. But xz-utils is required by @system on amd64/hardened and x86/default (and perhaps others as well). I suppose one of the reasons for that is that an increasing number of distfiles and patches come naturally in .xz. I suggest leaving the issue of the patch format to something beyond the scope of this bug, as that's where it seems to belong, to me. The compilability of the kernel, on the other hand, is specific to the *-sources packages and is dependent on the packagers' availability.

> Patches to the eclass are welcome.

Working on one.
Comment 3 Roman Žilka 2013-05-13 20:35:37 UTC
Created attachment 348184 [details, diff]
kernel-2.eclass.diff

* binutils removed from DEPEND - no apparent need (?)
* all RDEPENDs from top to gcc, just as DEPEND=sed, are "obvious"
* the "modules" USE flag description in use.desc may need updating to something more general, like "Support installation of kernel modules."
* I suppose portage merges REQUIRED_USE from eclasses and ebuilds (right?) - not using REQUIRED_USE+=... here
* "initramfs" needs to be included in use.local.desc
* the kernel sources have more: make *-pkg, make *docs - these would require new USE flags and deps, but I'll leave these for a later time
Comment 4 Roman Žilka 2013-05-13 20:43:35 UTC
Created attachment 348186 [details, diff]
kernel-2.eclass.diff

Forgot the !build? condition in REQUIRED_USE.
Comment 5 Roman Žilka 2013-05-14 10:46:13 UTC
Created attachment 348244 [details, diff]
kernel-2.eclass.diff

Moved the new ewarns into pkg_setup().

Could be overlooked: I dropped the RDEP on bc. Please re-add / let me know if there is a reason for it that I don't see.
Comment 6 Roman Žilka 2013-05-14 11:10:06 UTC
Created attachment 348246 [details, diff]
kernel-2.eclass.diff

Beg your pardon, bc is necessary and so is the binutils version spec, for semi-archaic reasons.
Comment 7 Roman Žilka 2013-05-31 17:59:07 UTC
Created attachment 349750 [details, diff]
kernel-2.eclass.diff
Comment 8 Roman Žilka 2013-05-31 18:00:39 UTC
Added the "development" local flag to pull in static code checking tools used by the root Makefile.
Comment 9 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-19 10:11:20 UTC
Will look at this by the upcoming 3.11 release; together with other eclass changes, to reflect the config / experimental discussion on gentoo-dev.
Comment 10 Mike Pagano gentoo-dev 2021-08-28 16:57:57 UTC
Dependencies have improved since this bug, I think they are adequate as this juncture