rpms/sane-backends/devel sane-backends-1.0.19-policykit.patch, 1.2, 1.3 sane-backends.spec, 1.108, 1.109

Nils Philippsen (nphilipp) fedora-extras-commits at redhat.com
Wed Mar 26 16:01:19 UTC 2008


Author: nphilipp

Update of /cvs/pkgs/rpms/sane-backends/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7949

Modified Files:
	sane-backends-1.0.19-policykit.patch sane-backends.spec 
Log Message:
cope with info.subsystem from new HAL versions as well as info.bus (#438827)


sane-backends-1.0.19-policykit.patch:

Index: sane-backends-1.0.19-policykit.patch
===================================================================
RCS file: /cvs/pkgs/rpms/sane-backends/devel/sane-backends-1.0.19-policykit.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sane-backends-1.0.19-policykit.patch	13 Feb 2008 09:20:14 -0000	1.2
+++ sane-backends-1.0.19-policykit.patch	26 Mar 2008 16:01:04 -0000	1.3
@@ -1,6 +1,6 @@
 diff -up sane-backends-1.0.19/tools/sane-desc.c.policykit sane-backends-1.0.19/tools/sane-desc.c
 --- sane-backends-1.0.19/tools/sane-desc.c.policykit	2007-07-29 20:39:54.000000000 +0200
-+++ sane-backends-1.0.19/tools/sane-desc.c	2008-02-13 10:18:23.000000000 +0100
++++ sane-backends-1.0.19/tools/sane-desc.c	2008-03-26 16:57:49.000000000 +0100
 @@ -3226,7 +3226,7 @@ print_udev (void)
  	    }
  	}
@@ -10,29 +10,41 @@
  	      usbid->usb_vendor_id + 2,  usbid->usb_product_id + 2);
        usbid = usbid->next;
      }
-@@ -3278,8 +3278,17 @@ print_hal (void)
-   usbid_type *usbid = create_usbids_table ();
-   printf ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
-   printf ("<deviceinfo version=\"0.2\">\n");
+@@ -3272,40 +3272,77 @@ print_plist (void)
+ 
+ 
+ static void
+-print_hal (void)
++print_hal_entries (usbid_type *usbid)
+ {
+-  int i;
+-  usbid_type *usbid = create_usbids_table ();
+-  printf ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+-  printf ("<deviceinfo version=\"0.2\">\n");
 -  printf ("  <device>\n");
 -  printf ("    <match key=\"info.bus\" string=\"usb\">\n");
-+  printf ("  <device>\n\n");
-+  printf ("    <!-- SCSI scanners -->\n");
-+  printf ("    <match key=\"@info.parent:scsi.type\" string=\"scanner\">\n");
-+  printf ("      <match key=\"info.category\" string=\"scsi_generic\">\n");
-+  printf ("        <append key=\"info.capabilities\" type=\"strlist\">access_control</append>\n");
-+  printf ("        <merge key=\"access_control.file\" type=\"copy_property\">linux.device_file</merge>\n");
-+  printf ("        <merge key=\"access_control.type\" type=\"string\">scanner</merge>\n");
-+  printf ("      </match>\n");
-+  printf ("    </match>\n\n");
-+  printf ("    <!-- USB scanners -->\n");
-+  printf ("    <match key=\"info.bus\" string=\"usb_device\">\n");
    while (usbid)
      {
        manufacturer_model_type * name = usbid->name;
-@@ -3295,10 +3304,12 @@ print_hal (void)
- 	  i++;
- 	}
++      int i = 0;
+ 
+-      i = 0;
+       printf ("      <!-- ");
+       while (name)
+-	{
+-	  if ((name != usbid->name) && (i > 0))
+-	    printf (" | ");
+-	  printf ("%s", name->name);
+-	  name = name->next;
+-	  i++;
+-	}
++        {
++          if ((name != usbid->name) && (i > 0))
++            printf (" | ");
++          printf ("%s", name->name);
++          name = name->next;
++          i++;
++        }
        printf (" -->\n");
 -      printf ("      <match key=\"usb.vendor_id\" int=\"%s\">\n", usbid->usb_vendor_id);
 -      printf ("        <match key=\"usb.product_id\" int=\"%s\">\n", usbid->usb_product_id);
@@ -47,3 +59,52 @@
        printf ("        </match>\n");
        printf ("      </match>\n");
        usbid = usbid->next;
+     }
++}
+ 
++static void
++print_hal (void)
++{
++  usbid_type *usbid_first = create_usbids_table ();
++
++  printf ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
++  printf ("<deviceinfo version=\"0.2\">\n");
++  printf ("  <device>\n\n");
++  printf ("    <!-- old HAL versions have info.bus -->\n");
++  printf ("    <!-- SCSI scanners -->\n");
++  printf ("    <match key=\"@info.parent:info.bus\" string=\"scsi\">\n");
++  printf ("      <match key=\"@info.parent:scsi.type\" string=\"scanner\">\n");
++  printf ("        <match key=\"info.category\" string=\"scsi_generic\">\n");
++  printf ("          <append key=\"info.capabilities\" type=\"strlist\">access_control</append>\n");
++  printf ("          <merge key=\"access_control.file\" type=\"copy_property\">linux.device_file</merge>\n");
++  printf ("          <merge key=\"access_control.type\" type=\"string\">scanner</merge>\n");
++  printf ("        </match>\n");
++  printf ("      </match>\n");
++  printf ("    </match>\n\n");
++
++  printf ("    <!-- USB scanners -->\n");
++  printf ("    <match key=\"info.bus\" string=\"usb_device\">\n");
++  print_hal_entries (usbid_first);
++  printf ("    </match>\n\n");
++
++  printf ("    <!-- new HAL versions have info.subsystem -->\n");
++  printf ("    <!-- SCSI scanners -->\n");
++  printf ("    <match key=\"@info.parent:info.subsystem\" string=\"scsi\">\n");
++  printf ("      <match key=\"@info.parent:scsi.type\" string=\"scanner\">\n");
++  printf ("        <match key=\"info.category\" string=\"scsi_generic\">\n");
++  printf ("          <append key=\"info.capabilities\" type=\"strlist\">access_control</append>\n");
++  printf ("          <merge key=\"access_control.file\" type=\"copy_property\">linux.device_file</merge>\n");
++  printf ("          <merge key=\"access_control.type\" type=\"string\">scanner</merge>\n");
++  printf ("        </match>\n");
++  printf ("      </match>\n");
++  printf ("    </match>\n\n");
++
++  printf ("    <!-- USB scanners -->\n");
++  printf ("    <match key=\"info.subsystem\" string=\"usb_device\">\n");
++  print_hal_entries (usbid_first);
++  printf ("    </match>\n\n");
+ 
+-  printf ("    </match>\n");
+   printf ("  </device>\n");
+   printf ("</deviceinfo>\n");
+ }


Index: sane-backends.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sane-backends/devel/sane-backends.spec,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- sane-backends.spec	14 Mar 2008 11:06:54 -0000	1.108
+++ sane-backends.spec	26 Mar 2008 16:01:04 -0000	1.109
@@ -1,7 +1,7 @@
 Summary: Scanner access software
 Name: sane-backends
 Version: 1.0.19
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPL (programs), relaxed LGPL (libraries), and public domain (docs)
 Group: System Environment/Libraries
 Source0: ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/%{name}-%{version}.tar.gz
@@ -159,6 +159,9 @@
 %{_libdir}/pkgconfig/sane-backends.pc
 
 %changelog
+* Wed Mar 26 2008 Nils Philippsen <nphilipp at redhat.com> - 1.0.19-9
+- cope with info.subsystem from new HAL versions as well as info.bus (#438827)
+
 * Fri Mar 14 2008 Nils Philippsen <nphilipp at redhat.com> - 1.0.19-8
 - add arch-specific provides/requires to/for libs-gphoto2 subpackage (#436657)
 




More information about the fedora-extras-commits mailing list