summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* linux-info.eclass: use consistent styleSam James2022-12-271-76/+66
| | | | | | | | | - Use Bash tests (i.e. [[ ]] instead of [ ]) - Use consistent newlines for if/while - Drop unnecessary ; line terminators Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
* linux-info.eclass: getfilevar: pass 'need-compiler=' to makeMike Gilbert2022-12-021-1/+3
| | | | | | | | | This avoids some unnecessary Makefile logic and gives a nice speed up. Before the change, linux-info_pkg_setup takes 11 to 15 seconds on my AMD Phenom II. After, it takes 3 to 4 seconds. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass: Add SKIP_KERNEL_CHECK in addl funcs to support tinderboxMike Pagano2022-09-041-0/+5
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Var to not check for running kern ver or installled verMike Pagano2022-08-141-0/+18
| | | | | | | This change was requested to have the ability to not check for either a running or installed kernel Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info: Remove deprecated eclass func after warning period expirationMike Pagano2022-08-071-15/+0
| | | | | | Bug: https://bugs.gentoo.org/843686 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Provide ability to skip CONFIG_* checksMike Pagano2022-08-071-1/+10
| | | | | | | | | Provide support for users who requested the ability to skip CONFIG_* checks. (e.g. from within a chroot for testing purposes) Closes: https://bugs.gentoo.org/862315 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Documentation updatesMike Pagano2022-05-161-5/+30
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* inux-info.eclass: Remove local function.Calling code removed on Aug 3,2010Mike Pagano2022-05-131-20/+0
| | | | | | | | | | This function was only called locally and the last use was almost 12 years ago See: https://gitlab.com/rindeal/gentoo-cvs-history-archive/-/commit/1715ad cd9e404075340e5a5ed82f88928feeffd9 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Fix func name to comply with pms, dep old with deadlineMike Pagano2022-05-121-1/+17
| | | | | | | | | | | According to PMS certain words are reserved for package manager use and may not be used or relied upon by ebuilds. See: https://projects.gentoo.org/pms/8/pms.html#x1-13700012.3.17 Closes: https://bugs.gentoo.org/843686 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Call ebegin, properly close with eendThomas Bracht Laumann Jespersen2022-04-151-1/+3
| | | | | | | | | | | | | | | | | A recent QA check added to portage informs of eend being called without a preceding call to ebegin. This warning was emitted during pkg_setup for net-vpn/openvpn, and was traced back to the check_extra_config() function in linux-info.eclass. The preference is here to call ebegin (instead of dropping the lone eend) and in each of the possible exit branches for check_extra_config() call eend appropriately. Reported-by: Sam James <sam@gentoo.org> Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Closes: https://github.com/gentoo/gentoo/pull/25019 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-14/+14
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: drop unnecessary IUSE="kernel_linux"Sam James2022-01-041-3/+1
| | | | | | It's already an implicit IUSE, so we don't need this. Signed-off-by: Sam James <sam@gentoo.org>
* linux-info.eclass: add --no-print-directory to emakeMike Pagano2021-10-181-1/+1
| | | | | | | | | | | | | | Thanks to Jocelyn Mayer for the report and the patch. When MAKEOPTS contains '-w' or '--print-directory', getfilevar echoed value contains make: Entering directory 'xxx' and make: Leaving directory 'xxx' which result in a wrong multiline version string thus making kernel versions comparisons always fail. Closes: https://bugs.gentoo.org/816888 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: getfilevar: pass dot-config=0 to makeMike Gilbert2021-09-141-1/+2
| | | | | | | This disables the kernel config check for versions prior to 5.4. Closes: https://bugs.gentoo.org/811726 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass: rework get_running_versionMike Gilbert2021-09-141-27/+20
| | | | | | | | | | | | | | This function may fail if the version cannot be parsed from a Makefile found by following the /lib/modules/${KV_FULL}/{source,build} symlinks. Instead of failing, we should just split KV_FULL as a fallback. Also, simplify the existance checks for the kernel Makefile; if we can't find the kernel source directory, there is really no point in checking for the kernel build directory. The latter will probably contain a Makefile with no version information. Bug: https://bugs.gentoo.org/811726 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass : Remove log references to linux 2.4 and gcc 4Mike Pagano2021-09-081-15/+0
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: getfilevar: pass need-config= to makeMike Gilbert2021-09-061-1/+2
| | | | | | | This bypasses the config check in the kernel Makefile. Closes: https://bugs.gentoo.org/811726 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* linux-info.eclass: Properly return when makefile foundMike Pagano2021-09-041-3/+3
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* Thanks to Sam, mgorny and Ulm for the review.Mike Pagano2021-09-041-4/+26
| | | | | | | | | | | | | | | Support the possibility that the Makefile could be one of the following and should be checked in the order described here: https://www.gnu.org/software/make/manual/make.html Order of checking and valid Makefiles names: GNUMakefile, makefile, Makefile Closes: https://bugs.gentoo.org/663368 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Support Makefiles that set vars to a non-static valueMike Pagano2021-09-021-8/+5
| | | | | | | | | | Previously, the Makefile had to define version variables be a string literal. This change will support both methods. Closes: https://bugs.gentoo.org/490328 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: Replace bit-shift arithmetic by ver_testUlrich Müller2021-08-301-4/+5
| | | | | | | There are kernel versions like 4.9.280, therefore shifting version components by 8 bits in kernel_is() may fail. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Revert "linux-info.eclass: Replace bit-shift arithmetic by ver_test"Ulrich Müller2021-08-271-5/+4
| | | | | | This reverts commit 4b48b038fa23b5580fa2b916b34c646c155db93a. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: Replace bit-shift arithmetic by ver_testUlrich Müller2021-08-271-4/+5
| | | | | | | | There are kernel versions like 4.9.280, therefore shifting version components by 8 bits in kernel_is() may fail. Reviewed-by: Alice Ferrazzi <alicef@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* Linux-info.eclass : Fix typo in commentMike Pagano2021-08-271-1/+1
| | | | | | Closes: https://bugs.gentoo.org/669026 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* eclass/linux-info: Properly document CONFIG_CHECK and ERROR_<CFG>Mike Pagano2021-06-181-1/+6
| | | | | | Closes: https://bugs.gentoo.org/409207 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* eclass/linux-info: eclassdoc fixes. Mark variables correctlyMike Pagano2021-06-181-8/+8
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* eclass/linux-info: eclassdoc fixesMike Pagano2021-06-181-5/+12
| | | | | | Closes: https://bugs.gentoo.org/637780 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* linux-info.eclass: fix grammar in elogSam James2021-03-311-3/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* linux-info.eclass: Pass M=${T} to the Linux Makefile unconditionally.Ulrich Müller2020-06-261-6/+3
| | | | | | | | | | | | Using M="${S}" breaks in the pkg_setup phase where the S variable is not valid. Previous commit messages don't give any rationale why some phases would need the dir pointing to ${S}. Therefore, use ${T} in all phases unconditionally. Closes: https://bugs.gentoo.org/729178 Bug: https://bugs.gentoo.org/469210 Acked-by: Thomas Deutschmann <whissi@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* linux-info.eclass: avoid lexicographical compare on numbers, bug #705248Sergei Trofimovich2020-05-231-3/+3
| | | | | | | | | | | | | | | | | Originally found in bug #705240 as: ``` error=0 ... if [[ ${error} > 0 ]]; then ... ``` '>' are string comparisons. They are benign in this case, but let's be consistent and use integer comparison. Closes: https://bugs.gentoo.org/705248 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* linux-info.eclass: minor @USAGE syntax fixesBen Kohler2020-03-311-7/+7
| | | | | | Use the recommended <required args> [optional args] syntax Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* linux-info.eclass: CONFIG_LOCALVERSION for out of source buildsFrancesco Riosa2018-10-021-13/+13
| | | | | Closes: https://bugs.gentoo.org/662772 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linux-info.eclass: respect kernel CONFIG_LOCALVERSIONDmitry Derevyanko2018-07-301-25/+25
| | | | | Closes: https://bugs.gentoo.org/460996 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linux-info.eclass: fix for prematurely merged patchMarty E. Plummer2018-07-171-1/+1
| | | | | | https://github.com/gentoo/gentoo/pull/9222 was merged prematurely, and included the first iteration of my linux-info EAPI 7 patch, and requires this patch on top to avoid a double slash.
* linux-info.eclass: account for lack of trailing slashMarty E. Plummer2018-07-171-9/+9
| | | | | | | | | | | In EAPI 7, D, ED, ROOT, EROOT no longer have a trailing slash[1]. This makes finding /usr/src/linux not work properly as it currently stands. Use the form "${ROOT%/}/" where apropos in order to unify behavior across EAPIs. 1: https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-113001r7 Closes: https://github.com/gentoo/gentoo/pull/9222
* linux-info.eclass: use eapi7-verMarty E. Plummer2018-07-141-4/+5
| | | | | | | versionator is banned in EAPI 7, so switch to either native EAPI 7 version functions or inherit eapi7-ver on EAPI 0-6. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linux-info.eclass: Skip linux_config_*_exists on non-LinuxMichał Górny2018-07-091-2/+2
| | | | | | The linux_config_src_exists and linux_config_bin_exists always return false on non-Linux systems by design. Short-circuit it via 'kernel_linux' check.
* linux-info.eclass: Die in most of public-ish APIs on non-LinuxMichał Górny2018-07-091-0/+36
| | | | | | | | | Add appropriate 'die' calls in most of the seemingly public APIs of the eclass that could be called by ebuilds and that are going to fail horribly when used on non-Linux systems. This means that e.g. 'kernel_is' calls need to be explicitly guarded in ebuilds, as we can't really reasonably return 'true' or 'false' if there is no Linux kernel in the first place.
* linux-info.eclass: Ignore check_extra_config on non-LinuxMichał Górny2018-07-091-1/+7
| | | | | | | | | | Make the check_extra_config and pkg_setup calls no-op on non-Linux systems. Those systems don't have a Linux kernel, so they obviously can't satisfy the requirements. This currently results in a lot of useless warnings about missing Linux kernel sources on FreeBSD. We could make it conditional per-package but there is really no point in adding a lot of conditionals everywhere if this eclass can't ever work on non-Linux.
* linux-info.eclass: require_configured_kernel, improve error handlingMichał Górny2018-07-091-1/+1
| | | | | | Add error handling for failing get_version call in require_configured_kernel. Give just a simple 'die' message since the get_version function should verbosely explain the problem.
* linux-info.eclass: Move get_version to require_configured_kernelMichał Górny2018-07-091-3/+1
| | | | | | | All require_configured_kernel calls in this eclass are followed by a get_version call. Since even calling it proactively wouldn't hurt, move it to require_configured_kernel. This saves us from having to manually implement error handling for it everywhere.
* linux-info.eclass: linux-info_get_any_version, die on failureMichał Górny2018-07-091-1/+3
| | | | | | | Make linux-info_get_any_version die if it can't determine any version of the Linux kernel. This indicates a problem with the eclass code (as it should not happen on Linux) and the missing KV_* variables are going to cause random misbehavior and failures.
* linux-info.eclass: Replace unnecessary $? checksMichał Górny2018-07-091-6/+3
|
* linux-info.eclass: get_localversion, do not call 'ls'Michał Górny2018-07-091-1/+6
| | | | | | Use bash array to perform a safe filename glob instead of calling 'ls'. Also, use nullglob to cleanly handle no matches instead of silencing errors.
* eclass: Remove remaining uses of epause and ebeep.Ulrich Müller2018-05-311-2/+1
| | | | These functions are long deprecated and only defined in EAPIs 0 to 2.
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* linux-info.eclass: get_version: remove useless readlink -fMike Gilbert2016-12-151-2/+0
| | | | The values get clobbered immediately afterward, so why bother?
* Update copyright year to 2016.Joshua Kinard2016-01-251-1/+1
|
* Change maintainer for linux-mod and linux-info eclasses to kernel@gentoo.org.Joshua Kinard2016-01-251-1/+1
|
* linux-info.eclass: fix error/warning messages with ~!SYMBOLSMike Frysinger2016-01-171-4/+6
| | | | | | For ebuilds that do things like ~!IDE, the current warning system would drop the ~ but not the !. This would lead to doing variable expansion like ${WARNING_!IDE} which is invalid shell code.