tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
sub-pakage to replace a file in the main package
Hello.
I need a subpackage (sysutils/ups-nut-usb) to effectively overwrite a file (libexec/nut/nutdrv_qx) provided by the main package (sysutils/ups-nut). wiz@ suggested to use pkg_alternatives for this, but at a first glance, it doesn't seem to be the best solution.
NUT (Network UPS Tools) is, in pkgsrc, divided into sysutils/ups-nut, which provides the serial UPS drivers, and sysutils/ups-nut-{usb,snmp}, which provide the USB and SNMP drivers.
Most USB drivers are called foo_usb by upstream with a serial foo or foo_ser driver (e.g. there's bcmxcp and bcmxcp_usb, blazer_ser and blazer_usb), but the Q* meta-driver is simply nutdrv_qx and has USB support baked in or not.
Presently, sysutils/ups-nut provides a serial-only nutdrv_qx, and sysutils/ups-nut-usb, provides, ehm, no Q* driver at all (it's lacking a few other drivers, but that's simple).
I locally worked around this by making sysutils/ups-nut-usb install what should be nutdrv_qx as nutdrv_qx_usb, but that would force people to write
driver nutdrv_qx_usb
into their ups.conf file where they'd expect (from the docs) to use
driver nutdrv_qx
or their USB UPSen wouldn't connect.
How to deal with this? Make sysutils/ups-nut install nutdrv_qx as nutdrv_qx_ser and link it to nutdrv_qx with sysutils/ups-nut/usb, in its INSTALL/DEINSTALL script, change the link to nutdrv_qx_usb and revert it back?
Any prior art on this?
Home |
Main Index |
Thread Index |
Old Index