Justin Pryzby wrote:

> The source of the originally-reported problem is that files are
> generated at install time which are not removed on purge:

Thanks for noticing this, this will be fixed in 2.1.99-4.


> postinst:
> /usr/lib/$PACKAGE/print-usb-usermap $PACKAGE 
> >/etc/hotplug/usb/$PACKAGE.usermap
> ln -sf ../$PACKAGE.rules /etc/udev/rules.d/025_$PACKAGE.rules
> /usr/lib/$PACKAGE/print-udev-rules /etc/hotplug/usb/$PACKAGE 
> >/etc/udev/$PACKAGE.rules
> 
> There is another problem; these overwrite local changes to the file.
> The files shouldn't be written if they exist; or, you should use a ucf
> style mechanism to prompt the user with a diff.  It *might* be
> considered sufficient to mark the file as generated, in the style of
> /etc/modules.conf; this isn't clear to me, though:
> 
> { echo "# Do not edit .. This is a generated file .. run .. to regenerate 
> it";\
>   print-usb-usermap; } >$PACKAGE.usermap

This is actually explained in /usr/share/doc/libgphoto2-2/README.Debian:

  /etc/hotplug/usb/libgphoto2.usermap is created on package installation.
  Local customizations should not go there but in /etc/hotplug/usb.usermap

It should be documented but new udev rules or .fdi files should also
go to new files, not to the ones generated by libgphoto2-2.


> Also, please explain what is special about 2.1.6-5.1, used in postinst
> for version comparison.

Well, it was an NMU but I think Julien Blache did it this way so the
symlink is not added back if the user decided to remove it.


Hope it answers your questions,

        Frederic


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to