Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package.metadata.deb].name should override [package.name] #36

Open
ximon18 opened this issue Jun 23, 2022 · 0 comments
Open

[package.metadata.deb].name should override [package.name] #36

ximon18 opened this issue Jun 23, 2022 · 0 comments

Comments

@ximon18
Copy link
Contributor

ximon18 commented Jun 23, 2022

The README says:

name: The name of the Debian package. If not present, the name of the crate is used.

Yet in the code I see:

name: self.package.name.clone(),

Unlike the lines around it which look like:

deb_name: deb.name.take().unwrap_or_else(|| self.package.name.clone()),

I.e. they take from the cargo deb metadata or fall back, which is what the README says should happen for package name but doesn't seem to. I found this because my systemd unit file named <package>.<unit>.service was not being found because it is looking using the top level package name and not the name override given in the cargo deb metadata.

However, that line of code appears to have been the same since the "initial code drop" 6 years ago, so maybe I'm missing something.

I'm inclined to think it should be:

name: deb.name.clone()

As deb.name is set to the cargo deb metadata name value, or if not present is set to the main package name and so is always set.

I can push a one line PR for this if you concur? I'm wondering however if even if this functionality is not as documented (assuming I'm not confused), are there users of cargo deb out there whose builds depend on the current functionality and so we cannot change it...

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

No branches or pull requests

1 participant