开发者

How can I force Anaconda to install my package after coreutils?

I have a customized RPM that builds a set of subpackages. Each subpackage has a %post script in the spec file that is used to copy some symlinks to another folder:

%post server
echo "Copying symlinks..." >> /tmp/mystuff.log
pwd >> /tmp/mystuff.log
cp -av /etc/mystuff/symlinks/server/current /etc/mystuff/ >> /tmp/splashtheme.log 2>开发者_如何学JAVA;&1

When I install one of the subpackage RPMs on a running system, it works fine. When I install it via Anaconda (as part of a Kickstart package list), the RPM's post-install scripts do not seem to run.

Edit: As it turns out, they actually do run, but I'm getting an error that says:

/var/tmp/rpm-tmp.48901: line 3: cp: command not found

Apparently, Anaconda is attempting to install my RPM before it installs coreutils, even though I specify coreutils as a dependency in Requires:.

So, my revised question is the title: How can I force my package to be installed after coreutils?


@Justin, you're being lucky that that works as anaconda could still install them in a different order if its in the same transaction. What you need is:

Requires: coreutils
Requires(post): coreutils

That way anaconda/rpm will ensure that core utils is installed prior to your %post being run.


I had an error in my specfile. I had specified the Requires: line in the preamble instead of in the %package section. This fixed it:

%package server
Summary: Server component
Group: Extras
Requires: coreutils
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜