-
Notifications
You must be signed in to change notification settings - Fork 355
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
RPM shows warning about including file twice when using %doc #336
Comments
I don't see how you'd get duplicate warnings in that scenario. An actual reproducer would help. |
from build.log:
|
@pmatilai obviously I made typo, it is supposed to be |
…included In Rust packaging there is need to have some files (license, doc) in special location (where the rest of package is) and there is no point in duplicating files. Fixes: rpm-software-management#336 Signed-off-by: Igor Gnatenko <[email protected]>
This is quite a common pattern in packaging where you have a package owned "top" directory and then you'd want that one (or two...) file/directory inside that to differ from the defaults. Whether for file ownership / permission bits or virtual attributes. Not specific to %doc or %license at all. The warning is there to point out possible packaging bugs, so what's needed is a way to tell rpm what you actually mean here. One possibility is simply making the pattern legitimate and try to be more clever about the complaints, generally something like: if one entry is using defaults and the other has non-default values then just let the non-default win silently, but if both are using non-default values then both can't be right and a warning should be issued. And I suppose a warning should be issued for identical entries too - it might be entirely harmless but it's almost certainly a packaging mistake anyway. |
@pmatilai I think that would work in my case (I mean your proposal about non-default-vs-default values). Are you going to implement it yourself or should I? Is it only about comparing uids, filemodes and so or there are some other worms inside? |
Working on this is not in my plans. But then (too) much of my work isn't exactly planned... See the "Merge duplicate entries" code for the things that need comparing, figure out the right thing to do for each:
|
Thanks, @pmatilai for finding the duplicate! Indeed this has been problem for a while, as the pattern is quite common. |
Well, all it takes is somebody to sit down, apply reality to my outline above and code it up 😁 Lifting to Todo-stage in the project may also help - this appears a relatively straightforward case. |
Sounds good! Anything I can do to get it to the TODO-stage? 😃 |
Already moved it there 😃 |
I think such construction
should just mark examples directory as %doc and not warn about double-inclusion. I've tried to use %exclude but it just excludes thing completely.
Let me know if I can provide more details
The text was updated successfully, but these errors were encountered: