rpm -- cleaning up conflicting stray files in %pre ineffective?

Martin Langhoff martin.langhoff at gmail.com
Tue Aug 19 22:36:42 UTC 2008


On Tue, Aug 19, 2008 at 8:35 PM, Bill Crawford
<billcrawford1970 at gmail.com> wrote:
> 2008/8/19 Martin Langhoff <martin.langhoff at gmail.com>:
>
>> I suspect that at install/upgrade time rpm computes the conflicts
>> _before_ %pre runs.
>
> Well, it has to, doesn't it? It needs to be able to bail out before
> changing anything.

Sounds reasonable. I'm not familiar enough with the RPM internals to
understand when each hook is called, and that key steps are happening
between... is this explained anywhere - short if reading the src?

> Your options look to me like:
>
>  - make a new package that has files in /here.go.files/ but does not
> symlink them, and have that remove the symlinks in %post
>
> - remove the symlinks and rename the .rpmnew files in %post

I'll probably do this. Thanks for the hint...

> - declare the symlinks as being config (and they should become
> .rpmsave, rather than your new ones becoming .rpmnew, I think;
> hopefully someone will correct me if I'm wrong).

I cannot :-/ Part of the problem is that this is a package that was
clobbering other packages' conffiles in %post . Evil spawn.

The new-and-improved version I have is much saner, but still ends up
clobbering a couple of conffiles. As you can imagine - it's not for
inclusion in Fedora proper.

(Wherever possible it uses conf.d type facilities. And several of the
files being clobbered are the /etc/sysconfig/<service> files to point
the daemon to an alternative config file. Still, somewhat ugly.)

On Tue, Aug 19, 2008 at 11:01 PM, Panu Matilainen
<pmatilai at laiskiainen.org> wrote:
> %pretrans runs before the conflicts calculations(...) embedded Lua

Wow! Now that's an interesting tidbit. Hmmm, Lua...

cheers,



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff




More information about the devel mailing list