| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/843686
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/835396
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
| |
It's already an implicit IUSE, so we don't need this.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
|
|
|
| |
This bypasses the config check in the kernel Makefile.
Closes: https://bugs.gentoo.org/811726
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This reverts commit 4b48b038fa23b5580fa2b916b34c646c155db93a.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/669026
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/409207
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/637780
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Use the recommended <required args> [optional args] syntax
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/662772
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/460996
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
These functions are long deprecated and only defined in EAPIs 0 to 2.
|
|
|
|
| |
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
|
|
| |
The values get clobbered immediately afterward, so why bother?
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|