Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158609 - media-video/usb-pwc-re-20061023.042702 doesn't use linux-mod eclass
Summary: media-video/usb-pwc-re-20061023.042702 doesn't use linux-mod eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-19 17:17 UTC by Jose Marino
Modified: 2007-01-08 12:59 UTC (History)
3 users (show)

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


Attachments
usb-pwc-re-20061023.042702.ebuild (usb-pwc-re-20061023.042702.ebuild,1.33 KB, text/plain)
2006-12-19 17:18 UTC, Jose Marino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Marino 2006-12-19 17:17:42 UTC
The ebuild for media-video/usb-pwc-re-20061023.042702 doesn't take advantage of the linux-mod eclass.

The consequences of this are:
- ebuild doesn't check for valid kernel configuration
- module is installed in kernel/drivers/usb/media/pwc and therefore will be wiped out everytime the kernel is recompiled
- module doesn't get added to moduledb

Below I attach a new simplified ebuild that uses the linux-mod eclass and takes care of the issues mentioned above. It installs the module in media/video.
Comment 1 Jose Marino 2006-12-19 17:18:42 UTC
Created attachment 104408 [details]
usb-pwc-re-20061023.042702.ebuild
Comment 2 Patrick Kursawe (RETIRED) gentoo-dev 2006-12-28 14:39:10 UTC
Looks nice, but something irritates me: The check f
Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2006-12-28 14:39:10 UTC
Looks nice, but something irritates me: The check für V4l1 when using a version that is supposed to support V4l2. Why this check?
Comment 4 Jose Marino 2006-12-28 14:49:46 UTC
You're absolutely right about the V4L1 check. 
At the time I was playing with the ebuild there were some undefined symbols that went away when I enabled V4L1. This problem doesn't happen anymore now.

To check it I configured kernel with:
#
# Multimedia devices
#
CONFIG_VIDEO_DEV=m
# CONFIG_VIDEO_V4L1 is not set
# CONFIG_VIDEO_V4L1_COMPAT is not set
CONFIG_VIDEO_V4L2=y

Then took the V4L1 check out from the ebuild and it worked fine.
Comment 5 Patrick Kursawe (RETIRED) gentoo-dev 2006-12-30 03:27:57 UTC
Committed with little modifications (whitespace, the V4L1-check) - thank you very much!
Comment 6 Patrick Kursawe (RETIRED) gentoo-dev 2006-12-30 03:30:21 UTC
Committed with little modifications (whitespace, the V4L1-check) - thank you very much!
Comment 7 Patrick Kursawe (RETIRED) gentoo-dev 2007-01-02 08:52:25 UTC
The problem with the new ebuild is that it does not compile against the linked version (/usr/src/linux) of the kernel but against the currently running version.
Comment 8 Jose Marino 2007-01-02 21:32:13 UTC
It seems that the Makefile of the pwc package tries to be too smart and auto detects the kernel version using uname. The old ebuild gave "KSRC=${KERNEL_DIR}" as parameter to emake. This seems to do the trick. The new ebuild can be changed to do this with:

------ begin patch --------
 # linux-mod variables
 BUILD_TARGETS="all"
+BUILD_PARAMS="KSRC=${KERNEL_DIR}"
 MODULE_NAMES="pwc(media/video:)"
 CONFIG_CHECK="USB !USB_PWC"
 ERROR_USB="${P} requires Host-side USB support (CONFIG_USB)."
--------end patch ---------
Comment 9 Jose Marino 2007-01-02 21:39:44 UTC
On another point, I still get the errors about undefined symbols if I don't have CONFIG_VIDEO_V4L1_COMPAT set. I know the package is supposed to be for V4L2 but it seems to still need some things from V4L1.

File "pwc.h" uses some symbols defined in "<linux/videodev.h>". The required symbols are inside a preprocessor conditional that looks like:

#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)

So the symbols don't get defined if CONFIG_VIDEO_V4L1_COMPAT is not set.

Is anybody else getting this too?
Comment 10 Bertrand Jacquin 2007-01-08 00:53:04 UTC
Same here too.
Comment 11 Patrick Kursawe (RETIRED) gentoo-dev 2007-01-08 11:46:57 UTC
Still fighting some other trouble and a flu - please be patient.
Comment 12 Patrick Kursawe (RETIRED) gentoo-dev 2007-01-08 12:59:09 UTC
Re-added the KSRC tweak and the V4L1-check. Please re-open this bug if there are still problems.