Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430562 - sys-fs/udev-187-r3: can not compile in paludis, check_KV is not defined
Summary: sys-fs/udev-187-r3: can not compile in paludis, check_KV is not defined
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ciaran McCreesh
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-09 09:47 UTC by zym
Modified: 2012-08-13 16:06 UTC (History)
4 users (show)

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


Attachments
sys-fs/udev-187-r3 binary installation, cave resolve fail, full log (1344576845-install-sys-fs_udev-187-r3:0::Gserver-bin.out,2.98 KB, text/plain)
2012-08-10 07:16 UTC, zym
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zym 2012-08-09 09:47:10 UTC
check_KV is a reserved function in paludis, and udev ebuild have own function but that can not override the paludis. please rename it to udev_check_KV or kill it, it is one line function.

thanks

Reproducible: Always

Steps to Reproduce:
build sys-fs/udev by 'cave resolve'
Actual Results:  
failed

Expected Results:  
we should be abled to build in paludis, as it is one of our supporting package manager.
Comment 1 Florian Scandella 2012-08-09 13:23:12 UTC
hmm, it's working for me: paludis-0.76.0
Comment 2 Julian Ospald 2012-08-09 13:30:34 UTC
(In reply to comment #0)
> we should be abled to build in paludis, as it is one of our supporting
> package manager.

gentoo is not involved in paludis development. If paludis does not follow PMS or breaks ebuilds then it's an upstream bug and should be reported there.
Comment 3 Ciaran McCreesh 2012-08-10 05:23:02 UTC
In the olden days, check_KV used to be defined both as a Portage internal and in an eclass. Sometimes people would forget to inherit the eclass, and weird stuff would happen, so Paludis defines a check_KV with a helpful error message. You *should* be seeing the eclass-defined version... Why aren't you?
Comment 4 zym 2012-08-10 05:30:02 UTC
paludis 0.76 does not have the issue now. closing.
Comment 5 zym 2012-08-10 05:35:54 UTC
hmm, maybe that is because of I do a binary build & install?
this is from what I get when installing:

 * Checking for suitable kernel configuration options...
rm /var/tmp/paludis/environment-sys-fs-udev-187-r3-13960

Error:
  * In program cave perform install --hooks --managed-output --output-
exclusivity with-others =sys-fs/udev-187-r3:0::Gserver-bin --destination installed --replacing =sys-fs/udev-186:0::installed --x-of-y 1 of 1:
  * When installing 'sys-fs/udev-187-r3:0::Gserver-bin' replacing { 'sys-fs/udev-186:0::installed' }:
  * When running an ebuild command on 'sys-fs/udev-187-r3:0::Gserver-bin':
  * Install failed for 'sys-fs/udev-187-r3:0::Gserver-bin' (paludis::ActionFailedError)
                                                                         [ ok ]

!!! ERROR in sys-fs/udev-187-r3::gentoo:
!!! In check_KV at line 564
!!! check_KV not implemented

!!! Call stack:
!!!    * check_KV (/var/tmp/paludis/sys-fs-udev-187-r3/temp/loadsaveenv:564)
!!!    * pkg_setup (/var/tmp/paludis/environment-sys-fs-udev-187-r3-13960:3791)
!!!    * ebuild_f_setup (/usr/libexec/paludis/0/pkg_setup.bash:43)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:643)
!!!    * main (/usr/libexec/paludis/ebuild.bash:666)

diefunc: making ebuild PID 13960 exit with error
die trap: exiting with error.

Failed install to / for sys-fs/udev-187-r3:0::Gserver-bin replacing 186:0::installed
Comment 6 zym 2012-08-10 07:16:40 UTC
Created attachment 320840 [details]
sys-fs/udev-187-r3 binary installation, cave resolve fail, full log
Comment 7 zym 2012-08-10 07:34:25 UTC
the following patch may fix this issue.


--- udev-187-r3.ebuild.bak	2012-08-10 15:22:48.148152676 +0800
+++ udev-187-r3.ebuild	2012-08-10 15:26:51.158518087 +0800
@@ -67,15 +67,6 @@
 
 S="${WORKDIR}/systemd-${PV}"
 
-check_KV()
-{
-	if kernel_is lt ${KV_min//./ }
-	then
-		return 1
-	fi
-	return 0
-}
-
 check_default_rules()
 {
 	# Make sure there are no sudden changes to upstream rules file
@@ -99,7 +90,7 @@
 
 	linux-info_pkg_setup
 
-	if ! check_KV
+	if kernel_is lt ${KV_min//./ }
 	then
 		eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
 		eerror "It must be at least ${KV_min}!"
@@ -107,7 +98,7 @@
 
 	KV_FULL_SRC=${KV_FULL}
 	get_running_version
-	if ! check_KV
+	if kernel_is lt ${KV_min//./ }
 	then
 		eerror
 		eerror "Your running kernel version (${KV_FULL}) is too old"
Comment 8 David Leverton 2012-08-11 11:14:58 UTC
(In reply to comment #3)
> In the olden days, check_KV used to be defined both as a Portage internal
> and in an eclass. Sometimes people would forget to inherit the eclass, and
> weird stuff would happen, so Paludis defines a check_KV with a helpful error
> message.

I think we can remove this now as it isn't defined in Portage anymore, so anyone trying to use it without it being defined is probably going to notice.

Perhaps in hindsight it should have been declared reserved or something in PMS, but oh well.

> You *should* be seeing the eclass-defined version... Why aren't you?

Environment dumps aren't allowed to redefine any of Paludis's own functions.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2012-08-13 16:06:16 UTC
Fix in tree by reverting back to udev_check_KV as it was before:

udev-146-r1.ebuild:udev_check_KV() {
udev-146-r1.ebuild:	udev_check_KV
udev-146-r1.ebuild:	udev_check_KV
udev-149.ebuild:udev_check_KV() {
udev-149.ebuild:	udev_check_KV
udev-149.ebuild:	udev_check_KV
udev-151-r4.ebuild:udev_check_KV() {
udev-151-r4.ebuild:	udev_check_KV
udev-151-r4.ebuild:	udev_check_KV
udev-164-r2.ebuild:udev_check_KV() {
udev-164-r2.ebuild:	udev_check_KV
udev-164-r2.ebuild:	udev_check_KV
udev-171-r6.ebuild:udev_check_KV() {
udev-171-r6.ebuild:	udev_check_KV
udev-171-r6.ebuild:	udev_check_KV

Here:

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?r1=1.108&r2=1.109

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-187-r3.ebuild?r1=1.3&r2=1.4