macaroni-os / mark-issues

Macaroni Automated Repositories Kit Issues
4 stars 1 forks source link

[bug] `net-vpn/openconnect` does not depend on the kernel sources, but it should #60

Open cuantar opened 1 month ago

cuantar commented 1 month ago
* Messages for package net-vpn/openconnect-8.10:
* Unable to find kernel sources at /usr/src/linux
* Unable to calculate Linux Kernel version for build, attempting to use running version
* Messages for package net-misc/networkmanager-1.48.6:
* Unable to find kernel sources at /usr/src/linux
geaaru commented 1 month ago

@cuantar Honestly, i don't think that it makes sense this dependency. It seems needed just to check if the kernel has the tun kernel driver in our ebuild. We can resolve it, just with an einfo about checking that the tun kernel driver must be present to work correctly. Keep less fat the dependencies tree it's something that we need to begin to consider to speed up solver elaboration. The tun kernel driver normally is in the default kernel config, so we could use an informative note only.

geaaru commented 1 month ago

A lot of Ebuilds are full of useless things.

$> ls -l /usr/src
total 0
$> emerge  openconnect -j
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) net-vpn/openconnect-8.10::net-kit
>>> Installing (1 of 1) net-vpn/openconnect-8.10::net-kit
>>> Recording net-vpn/openconnect in "world" favorites file...
>>> Jobs: 1 of 1 complete                           Load avg: 1.01, 0.25, 0.09
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

Here the ebuild fix:

# git diff . 
diff --git a/net-vpn/openconnect/openconnect-8.10.ebuild b/net-vpn/openconnect/openconnect-8.10.ebuild
index 72ecd11..0394d23 100644
--- a/net-vpn/openconnect/openconnect-8.10.ebuild
+++ b/net-vpn/openconnect/openconnect-8.10.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 PYTHON_COMPAT=( python3+ )
 PYTHON_REQ_USE="xml"

-inherit linux-info python-any-r1
+inherit python-any-r1

 ARCHIVE_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz"
 KEYWORDS="amd64 arm arm64 ppc64 x86"
@@ -56,10 +56,6 @@ BDEPEND="

 CONFIG_CHECK="~TUN"

-pkg_pretend() {
-       check_extra_config
-}
-
 pkg_setup() {
        :
 }
cuantar commented 1 month ago

Your change makes sense to me. If all it wants to is make sure there's a module available, then sources aren't needed for that at all and the dep is superfluous.