Bernhard R. Link a écrit :
* Ludovic Rousseau <[EMAIL PROTECTED]> [080216 21:07]:
Bernhard R. Link a écrit :
Package: libccid
Version: 1.3.4-1
libccid depends on udev, while not needing it. Please make it
a Suggests or if you really think noone should install it without
udev a Recommends.
Why do you think libccid does NOT depend on udev?
Because it works out of the box (at least for me) when ignoring the dependcy.
The package installs a udev rule file in /etc/udev/rules.d/z60_libccid.rules
and the postinst script calls "udev reload"
Many packages ship udev rules without depencing on udev to support
udev's hotplug features once that is installed. And it only calls udev
reload when udev is installed:
| # reload udev rules if the package is installed
| if [ -x /etc/init.d/udev ]
| then
| invoke-rc.d udev reload 3> /dev/null || true
| fi
Maybe I missed something and udev is really not needed.
Correct me if I'm wrong, but I suppose libccid's purpose is to enable
pcscd to speak to my card reading devices.
I've just tried and went to an unstable machine where neither libccid
nor pcscd not anything else of that kind were ever installed or
configured, installed libccid and pcscd and everything just works:
Script started on Mon Feb 18 21:02:19 2008
laptop:~# ls -la /etc/pcsc*
ls: cannot access /etc/pcsc*: No such file or directory
laptop:~# ls -la /etc/read*
ls: cannot access /etc/read*: No such file or directory
laptop:~# apt-get install pcscd libccid
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpcsclite1 udev
The following NEW packages will be installed:
libccid libpcsclite1 pcscd udev
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 479kB of archives.
After this operation, 1438kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
laptop:~# apt-get -d install pcscd libccid
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpcsclite1 udev
The following NEW packages will be installed:
libccid libpcsclite1 pcscd udev
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 479kB of archives.
After this operation, 1438kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp2.de.debian.org sid/main udev 0.114-2 [279kB]
Get:2 http://ftp2.de.debian.org sid/main libpcsclite1 1.4.99-1 [39.1kB]
Get:3 http://ftp2.de.debian.org sid/main libccid 1.3.4-1 [91.9kB]
Get:4 http://ftp2.de.debian.org sid/main pcscd 1.4.99-1 [69.4kB]
Fetched 479kB in 1s (332kB/s)
Download complete and in download only mode
laptop:~# dpkg -i /var/cache/apt/archives/libccid_1.3.4-1_i386.deb
/var/cache/apt/archives/libpcsclite1_1.4.99-1_i386.deb
/var/cache/apt/archives/pcscd_1.4.99-1_i386.deb
Selecting previously deselected package libccid.
(Reading database ... 75598 files and directories currently installed.)
Unpacking libccid (from .../libccid_1.3.4-1_i386.deb) ...
Selecting previously deselected package libpcsclite1.
Unpacking libpcsclite1 (from .../libpcsclite1_1.4.99-1_i386.deb) ...
Selecting previously deselected package pcscd.
Unpacking pcscd (from .../pcscd_1.4.99-1_i386.deb) ...
dpkg: dependency problems prevent configuration of libccid:
libccid depends on udev; however:
Package udev is not installed.
dpkg: error processing libccid (--install):
dependency problems - leaving unconfigured
Setting up libpcsclite1 (1.4.99-1) ...
dpkg: dependency problems prevent configuration of pcscd:
pcscd depends on libccid | pcsc-ifd-handler; however:
Package libccid is not configured yet.
Package pcsc-ifd-handler is not installed.
Package libccid which provides pcsc-ifd-handler is not configured yet.
dpkg: error processing pcscd (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libccid
pcscd
laptop:~# dpkg --force-depends -i
/var/cache/apt/archives/libccid_1.3.4-1_i386.deb
/var/cache/apt/archives/libpcsclite1_1.4.99-1_i386.deb
/var/cache/apt/archives/pcscd_1.4.99-1_i386.deb
(Reading database ... 75645 files and directories currently installed.)
Preparing to replace libccid 1.3.4-1 (using .../libccid_1.3.4-1_i386.deb) ...
Unpacking replacement libccid ...
Preparing to replace libpcsclite1 1.4.99-1 (using
.../libpcsclite1_1.4.99-1_i386.deb) ...
Unpacking replacement libpcsclite1 ...
Preparing to replace pcscd 1.4.99-1 (using .../pcscd_1.4.99-1_i386.deb) ...
Unpacking replacement pcscd ...
Setting up libpcsclite1 (1.4.99-1) ...
dpkg: libccid: dependency problems, but configuring anyway as you request:
libccid depends on udev; however:
Package udev is not installed.
Setting up libccid (1.3.4-1) ...
Setting up pcscd (1.4.99-1) ...
egrep: none: No such file or directory
Starting PCSC Lite resource manager: pcscd.
laptop:~# gpg --card-status --disable-ccid
gpg: detected reader `HP USB Smart Card Keyboard (081712e6) 00 00'
[...]
Version ..........: 1.1
Manufacturer .....: PPC Card Systems
Name of cardholder: Bernhard Richard Link
Language prefs ...: de
[...]
Because you started pcscd _after_ plugging the USB smart card reader.
So the only thing making this package not work for me out of the box with my
usb-keyboard-and-cardreader is the depencency to udev.
Are you saying that libccid does NOT work for you if udev IS installed?
I don't see why.
You might consider an usb-keyboard-and-cardreader that is just always
plugged in and not needing any hotplug support unusual and just arguing
a recommends might be in place, but it's core functionality works, so depends
is really not needed.
libccid is not just for usb-keyboard-and-cardreader. In fact
usb-keyboard-and-cardreader are the exception. Normal smart card reader
only are only card readers. So the hotplug feature is really needed.
I personally would argue for a "Suggests:" even, as udev is since etch
the default for installs, so people not having it installed had to do
extra steps to remove it, and having a system suddenly unbootable
because one did not look out for it and accidentially installed udev
just because one wanted a smart card reader is quite a heavy burden.
If installing udev makes the system unbootable I think it is a bug in udev.
The next version of pcsc-lite will use libhal to detect USB events. So
udev will not be used anymore. So the question if I should use Depends:,
Suggests: or Recommends: will disappear.
Thanks for your feedback.
bye
--
Dr. Ludovic Rousseau