[Mageia-dev] unpackaged files lurking in the weeds
luigiwalser at yahoo.com
Fri Jun 15 02:42:22 CEST 2012
So, one of the Mandriva developers pointed out to me a difference between Mageia and Mandriva's rpm package that causes a minor spec incompatibility and possibly some packaging issues for us.
Apparently it was at one time a known issue and there was a flamewar about it. I'm not totally sold on it myself, but I understand the argument. Anyway, here's the issue...
Usually you use %exclude when you have some glob in a %files list, but you want to exclude something from it, because that file or directory is actually in another subpackage.
%exclude can also be used to just not package a file at all, which if that's what you meant to do, is OK IMO. It's possible however, that you use an %exclude, thinking you are just excluding something from one subpackage, but you don't realize it's actually not packaged at all. rpm will catch this and warn you about the unpackaged file, but we patched that out of rpm with this patch:
Personally I don't like that rpm will choke the build if it's what you meant to do, but it does make our specs incompatible with other distros like mdv if we make use of that use of %exclude. It also could be a bigger problem if we have unpackaged files that we aren't aware of, and I've heard other packagers say they even try to go easy on the globs in %files lists because they want to be sure they know what is and isn't packaged. So it seems we usually try to be more careful about this issue than what this patch allows.
Just in case it's not obvious, the way you handle files you actually want to exclude if you can't use %exclude is to either remove them in %install, or patch the Makefiles to not install them in the first place.
So, maybe we should do something about this. My preference would have rpm still complain about unpackaged %excluded files, but not die, just give a warning instead.
More information about the Mageia-dev