On Jun 10, 2011, at 4:39 PM, Mark Hatle wrote: > I've been trying to reconcile the behavior between rpm and deb packages in the > way their directories are handled. > > In rpm, we can set the directories to "own" in various ways. If there is a > conflict between two packages owning the same directory -- first-in wins and > that's where the permissions/owner/group are selected. (correct me if I'm > wrong) >
That's likely (but based on ancient memories of a performance speed-up to avoid creating already existent directories ... not that mkdir is slow, just that is what was originally implemented like 1997). But that explains first rather than last. I could look at the code: so can you rpm -Uvv --fsmdebug *.rpm should spew every system call performed. > In deb, directories are not owned by any package, they're just created as an > artifact of the package installation. All of the packages in the system are > expected to have directories with the same permissions, owners, group or the > package is broken. I assume this means a similar first-in wins strategy as > well. > > Is there a way in RPM to change this strategy to create a true conflict > (install > failure) to identify these situations? > There's no configurable way ... but changing opens a walloping amount of pain because RPM will *again* have to justify its reliability if change occurs. I plain and simply don't give a hoot unless a sound engineering reason is given for the change. Change for the sake of change isn't a sound reason, nor is consistency with the Debian Borg mind meld, nor is introducing Yet Another Way That RPM Doesn't Install Anything because of lack of vendor QA. > Also, what is the impact to RPM if a lot of packages all own the same > directories (such as /bin, /lib, /usr, etc..)? [or alternatively have no > packages own the directories and fix the owner/group/mode with some type of > scripting] Lemme answer a question with a question: Why are you asking? Are you seeing "impact" or just enquiring? Owning all directories in every package so that rpm -qa | wc -l and rpm -qf / | wc -l are identical is what I think should be done on even days of the month. On odd days of the month, I tend towards the schizoid alterantive POV, that no directory should be in "packages". And on leap days I use dpkg ... > > Any help understanding RPM's behavior in these conditions performance or > otherwise will help me figure out how to reconcile the behaviors.. thanks! > Everything that rpm does while installing is displayable with rpm -Uvv --fsmdebug *.rpm Any "quirks" aren't from the state machine, but rather from foolish fiddle ups for "unowned directory" behavior w SELinux and other insanities. 73 de Jeff
smime.p7s
Description: S/MIME cryptographic signature