Thanks for all the information. Most of what you've said below will
help us adopt rpm5 better !
I think that based on the lessons learned from you, we'll be able to
put together a "migrating to rpm5" document which other distros can
then make use of :)
On Mon, Jan 3, 2011 at 1:25 AM, Jeff Johnson <email@example.com> wrote:
> On Jan 2, 2011, at 2:12 PM, Sriram Narayanan wrote:
>> On Mon, Jan 3, 2011 at 12:22 AM, Jeff Johnson <firstname.lastname@example.org> wrote:
>>> What I recommend instead of disabling or changing default behavior is to
>>> configure orphan directory/linkto paths instead:
>>> mkdir -p /etc/rpm/sysinfo
>>> echo "/usr/local/bin" >> /etc/rpm/sysinfo/Dirnames
>>> This is what I do; the drudgery isn't _THAT_ painful imho, ymmv.
>> Thanks, this helped.
>> I was just wondering, wouldn't we need to do this for every forseeable
>> folder structure then ?
> Depends on your packaging policy.
> The goal(s) with parentdir/linkto dependencies are:
> 1) stricter/mandatory packaging rules. E.g. even though
> rpm WILL create every component in the path in order
> to install a file, the "orphandirs" will not be removed
> by rpm --erase. There's other issues with metadata like
> mode/owner/group (and SELinux tags) with "orphandirs"
> because RPM has to guess what is intended for those values.
> 2) using parentidr dependencies to supply additional ordering hints
> Ordering packages is based on a "partial order" from the
> dependency assertions. So the ordering is as good/bad/ugly
> as the package metadata is (which is pretty bad/ugly in many cases).
> By using parentdir depdnencies, additional (and quite reliable
> in the case of parentdir dependencies) relations reduce
> "partial ordering" indedeterminancy, thereby increasing
> install/upgrade/erase ordering reliability.
> But while parentdir dependencies are being phased in, there are additional
> topological sort relations being introduced, that leads to MORE frustration
> dealing with package dependency LOOP's etc etc. Can't be helped imho, I'm
> quite sure that parentdir dependencies are more reliable than the random
> bad/ugly dependencies being added that are creating dependency LOOP's
> all over the place.
> It's mathematically impossible to order with LOOP's. Yes LOOP's can be removed
> by conventional rule's: that's a different issue (imho) than whether additional relations
> using parentdir dependencies create Yet More LOOP's.
>> Assume that some package needs /var/local/lib and we don't have it in
>> /etc/rpm/sysinfo/Dirnames. What is the recommended way of dealing with
>> such a situation ?
> Usually there's a filesystem package carrying a directory skeleton.
> Hint: What is annoying is the .../LC_MESSAGES directories from other packages
> that create new parentdir dependencies. Easily 50% of the issues with
> parentdir dependencies are from parents of new locales with LC_MESSAGES.
> One solution used in RHEL6 (which I don't recommend because there's gazillions
> of directories in the package) is to add ever possible locale directory.
> But "works" w/o question. I'd suggest a separate filesystem-i18n package
> instead because filesystem has _THE_ directory structure for a distro,
> and the separate filesystem-i18n package is easier to maintain and distribute.
>>> There is also (as you proceed, you likely don't have many
>>> packages installed) this POPT alias to list all missing parentdirs
>>> mkdir -p /etc/rpm/sysinfo
>>> rpm -Va --nofiles --orphandirs | sort -u >> /etc/rpm/sysinfo/Dirnames
>> I'm getting the output of the "set" command when I run
>> rpm -Va --nofiles --orphandirs
>> What's happening here ?
> Just I cannot remember/type all possible RPM options any more, sigh.
> All that the --orphandirs POPT alias does is this (from memory)
> rpm -Va --nofiles | grep '^/'
> See /usr/lib/rpm/rpmpopt for the ctual POPT alias.
> 73 de Jeff
> RPM Package Manager http://rpm5.org
> User Communication List email@example.com
Received on Sun Jan 2 21:09:49 2011