Bug 298878

Summary: create default SANE FDI file
Product: [openSUSE] openSUSE 10.3 Reporter: Marcus Meissner <meissner>
Component: BasesystemAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P5 - None CC: jsmeix, lnussel, meissner
Version: Alpha 7   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Marcus Meissner 2007-08-09 15:11:22 UTC
create a default SANE FDI for use with resmgr.

sane-backends now even includes a list of USB ids in a udev ruleset, we can reuse that.
Comment 1 Johannes Meixner 2007-08-10 05:55:20 UTC
I do not understand the reason behind your request.

Currently /usr/share/sane/create_hal_global_fdi_for_scanners
creates /etc/hal/fdi/policy/10osvendor/70-scanner.fdi
during package installation via RPM post install script.

Isn't this o.k.?
If not, could you explain why not
and what you propose to solve which problem.
Comment 2 Johannes Meixner 2007-08-10 05:57:40 UTC
Currently I cannot remember why I create it via RPM post install script
and not during RPM build-time, there must have been a special reason,
hmmm...
Comment 3 Marcus Meissner 2007-08-10 07:02:30 UTC
Assignee:   Marcus Meissner <meissner@novell.com>

This bug was mostly a reminder for me to check up on it.

I had not expected USB IDs in the rules files under /policy/.

I guess the reason you do it in a %post section is due to potentially add-on desc files.

Also the included UDEV FDI file has some more ids:
$ grep idProduct /etc/udev/rules.d/55-libsane.rules|wc -l
580
$ grep product_id //etc/hal/fdi/policy/10osvendor/70-scanner.fdi|wc -l
533
$ 

There should really be a static file in the RPM and you could catch other
ids into seperate rules file.
Comment 4 Johannes Meixner 2007-08-10 07:42:57 UTC
I know about the inconsistencies of USB IDs in both files.
Th reason is that the UDEV rule was derived from a recent
SANE CVS version while the generated HAL fdi file is based
upon the SANE description files in the RPM sources.

I change it into the following enhancement requests:

1.
Make USB IDs consistent in both files.
Use the union set of USB IDs from both files.

2.
Provide the HAL fdi file as static RPM source file.
Because of 1. it might become too complicated to generate
it for 10.3 during build time.
Only if it is relatively easy to be generated, I will generate it
otherwise I will postpone it for after 10.3 where usually all
the udev/HAL/resmgr machinery changes again ;-)
Comment 5 Johannes Meixner 2007-08-10 07:55:07 UTC
I think I found the reason why it is done via post install:
For the update of the sane package (now renamed to sane-backends)
from Suse Linux 10.0 to 10.1 I used a big post install script
to deal with the changes in the udev/HAL/resmgr machinery, see
/work/SRC/old-versions/10.1/SLE/all/sane/sane.spec
and I guess this is the only reason why it is still done via post install.
Comment 6 Johannes Meixner 2007-08-14 14:15:27 UTC
Replaced create_hal_global_fdi_for_scanners by
create_hal_global_fdi_from_libsane.rules which creates the
global HAL 70-scanner.fdi file during build-time from the
libsane.rules file and submitted sane-backends to STABLE.