Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 105069 Details for
Bug 157765
media-libs/libgphoto2-2.3.1 bump request
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
libgphoto2-2.3.1-backported-udev-fixes.diff
libgphoto2-2.3.1-backported-udev-fixes.diff (text/plain), 5.04 KB, created by
Kalidarn
on 2007-01-01 02:09:41 UTC
(
hide
)
Description:
libgphoto2-2.3.1-backported-udev-fixes.diff
Filename:
MIME Type:
Creator:
Kalidarn
Created:
2007-01-01 02:09:41 UTC
Size:
5.04 KB
patch
obsolete
># Backported PTP-Matching code from SVN (http://gphoto.svn.sourceforge.net/viewvc/gphoto/trunk/libgphoto2/packaging/generic/) > >diff -ruN libgphoto2-2.3.0/packaging/generic/check_ptp_camera libgphoto2-2.3.0/packaging/generic-svn/check_ptp_camera >--- libgphoto2-2.3.0/packaging/generic/check_ptp_camera 1970-01-01 01:00:00.000000000 +0100 >+++ libgphoto2-2.3.0/packaging/generic-svn/check_ptp_camera 2006-12-11 17:25:52.000000000 +0100 >@@ -0,0 +1,20 @@ >+#!/bin/sh >+ >+# check if any interface of this device is a PTP camera interface (06) >+INTERFACE="${1:-06/01/01}" >+ >+BASENAME=${PHYSDEVPATH##*/} >+for d in /sys/${PHYSDEVPATH}/${BASENAME}:*; do >+ [[ -d ${d} ]] || continue >+ INTERFACEID="$(< ${d}/bInterfaceClass)" >+ INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceSubClass)" >+ INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceProtocol)" >+ >+ #echo ${d}: ${INTERFACEID} >+ if [[ ${INTERFACE} == ${INTERFACEID} ]]; then >+ # Found interface >+ exit 0 >+ fi >+done >+ >+exit 1 >diff -ruN libgphoto2-2.3.0/packaging/generic/Makefile.am libgphoto2-2.3.0/packaging/generic-svn/Makefile.am >--- libgphoto2-2.3.0/packaging/generic/Makefile.am 2006-11-25 15:47:18.000000000 +0100 >+++ libgphoto2-2.3.0/packaging/generic-svn/Makefile.am 2006-12-11 17:25:39.000000000 +0100 >@@ -1,4 +1,5 @@ >-utils_PROGRAMS = print-camera-list >+utils_PROGRAMS = print-camera-list >+EXTRA_DIST = check_ptp_camera > > print_camera_list_SOURCE = print-camera-list.c > print_camera_list_LDADD = \ >diff -ruN libgphoto2-2.3.0/packaging/generic/print-camera-list.c libgphoto2-2.3.0/packaging/generic-svn/print-camera-list.c >--- libgphoto2-2.3.0/packaging/generic/print-camera-list.c 2006-11-25 15:47:18.000000000 +0100 >+++ libgphoto2-2.3.0/packaging/generic-svn/print-camera-list.c 2006-12-11 17:26:17.000000000 +0100 >@@ -284,7 +284,11 @@ > udev_begin_func (const func_params_t *params) > { > printf ("# udev rules file for libgphoto2 devices (udev < 0.98)\n#\n"); >- printf ("BUS!=\"usb\", ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n"); >+ /* Note: 2 lines because we need to use || ... having them on the same >+ * line would mean &&. >+ */ >+ printf ("BUS!=\"usb*\", GOTO=\"libgphoto2_rules_end\"\n"); >+ printf ("ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n"); > return 0; > } > >@@ -292,7 +296,11 @@ > udev_098_begin_func (const func_params_t *params) > { > printf ("# udev rules file for libgphoto2 devices (udev >= 0.98)\n#\n"); >- printf ("SUBSYSTEMS!=\"usb\", ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n"); >+ /* Note: 2 lines because we need to use || ... having them on the same >+ * line would mean &&. >+ */ >+ printf ("SUBSYSTEM!=\"usb*\", GOTO=\"libgphoto2_rules_end\"\n"); >+ printf ("ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n"); > return 0; > } > >@@ -352,7 +360,7 @@ > > if (flags & GP_USB_HOTPLUG_MATCH_INT_CLASS) { > if ((flags & (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) == (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) >- printf("ENV{INTERFACE}==\"%d/%d/%d\", ", class, subclass, proto); >+ printf("PROGRAM=\"check_ptp_camera %02d/%02d/%02d\", ", class, subclass, proto); > else > fprintf(stderr,"unhandled interface match flags %x\n", flags); > } else { >@@ -459,7 +467,7 @@ > > if (flags & GP_USB_HOTPLUG_MATCH_INT_CLASS) { > if ((flags & (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) == (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) >- printf("ENV{INTERFACE}==\"%d/%d/%d\", ", class, subclass, proto); >+ printf("PROGRAM=\"check_ptp_camera %02d/%02d/%02d\", ", class, subclass, proto); > else > fprintf(stderr,"unhandled interface match flags %x\n", flags); > } else { >@@ -1022,7 +1030,7 @@ > }, > {name: "udev-rules", > descr: "udev < 0.98 rules file", >- help: "Put it into /etc/udev/libgphoto2.rules, set file mode, owner, group or add script to run", >+ help: "Put it into /etc/udev/rules.d/90-libgphoto2.rules, set file mode, owner, group\n or add script to run. This rule files also uses the\n check_ptp_camera script included in libgphoto2 source. Either put it to\n /lib/udev/check_ptp_camera or adjust the path in the generated rules file.", > paramdescr: "( <PATH_TO_SCRIPT> | [mode <mode>|owner <owner>|group <group>]* ) ", > begin_func: udev_begin_func, > camera_func: udev_camera_func, >@@ -1030,7 +1038,7 @@ > }, > {name: "udev-rules-0.98", > descr: "udev >= 0.98 rules file", >- help: "Put it into /etc/udev/libgphoto2.rules, set file mode, owner, group or add script to run, for udev >= 0.98", >+ help: "Put it into /etc/udev/rules.d/90-libgphoto2.rules, set file mode, owner, group\n or add script to run, for udev >= 0.98. This rule files also uses the\n check_ptp_camera script included in libgphoto2 source. Either put it to\n /lib/udev/check_ptp_camera or adjust the path in the generated rules file.", > paramdescr: "( <PATH_TO_SCRIPT> | [mode <mode>|owner <owner>|group <group>]* ) ", > begin_func: udev_098_begin_func, > camera_func: udev_098_camera_func,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 157765
:
103763
|
103810
|
105068
|
105069
|
105348
|
105349
|
106716
|
106718
|
106755
|
106756
|
106760
|
106761
|
106762
|
106792
|
106799
|
106818
|
106825
|
106851
|
106919
|
107013
|
107014
|
107035
|
107462
|
107475
|
108059