Skip to content

Add a generic --output argument to udevadm hwdb#263

Merged
bbonev merged 2 commits intomasterfrom
unknown repository
Sep 30, 2023
Merged

Add a generic --output argument to udevadm hwdb#263
bbonev merged 2 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Sep 27, 2023

Dear eudev developers,

In Guix, every package is installed in a separate "/usr" prefix. For instance, eudev is installed in "/usr-a/" and upower in "/usr-b/" (except it’s actually "/gnu/store/xxx-eudev-version" and "/gnu/store/yyy-upower-version", whatever). If I want to compile the hwdb database and write it to "/usr-b/lib/udev/hwdb.bin" (with "--usr"), the "--root" argument is insufficient. If I compile with --root=/usr-b, I will end up with "/usr-b/usr-a/lib/udev/hwdb.bin".

I think it would be better to let udevadm hwdb write to an arbitrary file.

What do you think?

Best regards,

Vivien

vivien35af and others added 2 commits September 30, 2023 19:38
Instead of always writing /etc/udev/hwdb.bin or UDEV_LIBEXEC_DIR
/hwdb.bin, let the user specify a full file name.

* src/udev/udevadm-hwdb.c (adm_hwdb): New option "output". Construct
hwdb_bin when processing options, and prepend root after processing
options.
* man/udev.xml: Mention --output.
* man/udevadm.xml: Document --output.
* man/udev.7: Regenerate.
* man/udevadm.8: Same.
@bbonev
Copy link
Member

bbonev commented Sep 30, 2023

I somehow dislike the wording in the man page, e.g. if you want ship the compiled, but that does not come from your commit.

I will merge and fix that afterwards.

@bbonev bbonev merged commit 0c8f002 into eudev-project:master Sep 30, 2023
@bbonev bbonev mentioned this pull request Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants