How do I tell rpm to run through the install and not do anything, just
tell me exactly what it is *going* to do to what and where so I can
sanity check it first? You know, like the "make -n" option?
I can't believe I can't find this option in the help info-- such a
fundamental feature of any sane package manager. I presume it's there
but just using unfamiliar terminology...
Thanks,
--
KD
>I'm considering installing a binary package on a system that is an .rpm
>package. I have the rpm package manager on the machine (it's not Red
>Hat though, nor even Linux, it's an AIX box).
OK - is the man page there?
>How do I tell rpm to run through the install and not do anything, just
>tell me exactly what it is *going* to do to what and where so I can
>sanity check it first? You know, like the "make -n" option?
man rpm look for the --test option
rpm -i --test /path/to/whatever-1.2.3-aix.rpm
>I can't believe I can't find this option in the help info-- such a
>fundamental feature of any sane package manager. I presume it's there
>but just using unfamiliar terminology...
Perhaps, though
[compton ~]$ rpm | grep test
rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]
rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]
[compton ~]$
Old guy
Actually, no. Will look it up on the web though.
>man rpm look for the --test option
>rpm -i --test /path/to/whatever-1.2.3-aix.rpm
Test says that it will "report potential conflicts", or "tell if it
will work or not." But that's not what I'm looking for. I want to
know what it is going to *do* in advance, not simply if it thinks it's
an OK package or not. It is not completely qualified to decide what OK
is in this context.
I can run "rpm -vv -i --test" and find out what files it will copy, but
I see no way to find out what else it will do-- this particular
package installs a daemon, and I need to know exactly how it's going to
go about it. What it looks like I need to do is the above, AND a '-q
-i --scripts --triggers' on a package that is NOT already installed, as
it doesn't look like the -q options work on an uninstalled package (or
at least, that's what the error I get leads me to believe). Looks like
I have to install it first on an expendable and quarantined system
first, so I can run the query. Works, but really ugly...
--
KD
You can use any of the -q options on an RPM file by using the -p option.
--
========================================================================
Ian Pilcher i.pi...@comcast.net
========================================================================
You want to use "-qp"
/dan
>Actually, no. Will look it up on the web though.
You might want to mention what version of rpm you are using. There have
been changes over the 9 years of existence.
>Test says that it will "report potential conflicts", or "tell if it
>will work or not." But that's not what I'm looking for. I want to
>know what it is going to *do* in advance, not simply if it thinks it's
>an OK package or not. It is not completely qualified to decide what OK
>is in this context.
OK, for that, you want to use the query options.
rpm -qpl /path/to/whatever-1.2.3-aix.rpm
will list all of the files the new package contains.
rpm -qp --triggers /path/to/whatever-1.2.3-aix.rpm
Display the trigger scripts, if any, which are contained in the package. I
don't know how that differs from
rpm -qp --triggerscripts /path/to/whatever-1.2.3-aix.rpm
Shows all the trigger scripts for the selected packages. and
rpm -qp --scripts /path/to/whatever-1.2.3-aix.rpm
List the package specific shell scripts that are used as part of the
installation and uninstallation processes, if there are any. I'd
recommend trying each of these options to see if they provide the
information you desire. I suspect they have to be run separately,
though you might be able to try
rpm -qp --triggers --triggerscripts --scripts /path/to/whatever-1.2.3-aix.rpm
to see if this reports all the scripts at once. rpm is actually able to
do a bit more than what the man page or Usage messages imply. For
example, I use 'rpm -Vf /etc/poobah' to have rpm do a security check of
the package that '/etc/poobah' belongs to. I've also used 'rpm -e --test
whatever' to see if removing the 'whatever' package is going to cause
grief. Neither combination is implied in the man page, but it works.
>it doesn't look like the -q options work on an uninstalled package (or
>at least, that's what the error I get leads me to believe). Looks like
>I have to install it first on an expendable and quarantined system
>first, so I can run the query.
No, that's what the -p flag is for. There are other combinations if you
are doing this over the net (FTP install) as well.
I understand that there probably aren't that many packages supplied by
IBM. Most of the time, users just blindly install stuff, a result of their
windoze heritage. More experienced users only install packages that are
supplied by their distribution source (Red Hat, Mandriva, SuSE, what-ever).
The more paranoid don't install the binary rpms, but instead build their
own binaries from source rpms. This allows them to audit the source code,
and would permit 'make -n' for example. Additionally, t<E8>ey audit the
<mumble>.spec file that is part of the source rpm - that has the
instructions to rpm or rpm-build that are used to tweak the build, and
to provide those installation instructions.
Old guy
--
KD