Closed datapythonista closed 4 months ago
Files listed in assets are always overwriting.
Files listed in assets are always overwriting.
Thanks for the information. I tried removing the config file from assets and to add this but doesn't seem to work:
conf-files = [
["config.toml", "etc/doc-previewer/", "644"],
]
I don't understand how a configuration file that is not overwritten needs to be specified then.
Sorry, I was mistaken. The file needs to be listed in assets, since conf-files won't imply inclusion. Unfortunately, I don't know why it's not behaving as expected.
Thank you for clarifying and for your help. Knowing that it is expected to preserve the config file when updating I'll have a look and try to understand where is the problem. I'll post here any finding. Thanks!
Please document conf-files properly. Which string should I put into conf-files???
Edit: figured out it should be target file path
Now the conffiles is generated automatically for all assets in etc/
My understanding when reading this doc linked in cargo-deb documentation for
conf-files
is that anything under/etc
will automatically not be overwritten when a package is upgraded.But given this
Cargo.toml
section:And installing a new version of my package with
sudo dpkg -i doc-previewer_0.1.1-1_amd64.deb
, theconfig.toml
configuration file is indeed overwritten by the new version one.Also, after using the
conf-files
option like this:or this:
It will also overwrite the file.
Am I doing something wrong? Or is this not working as expected? I'm happy to open a PR to clarify the docs if it's something I'm doing wrong.
Thanks for the amazing work with this btw, I build .deb packages in the past, and I couldn't be happier that this tool exist. :)