Regrettably, rpm does not return an exit status as do most commands (more correctly it seems to always return zero). This might be because it's too complex to simply decide "yes" or "no".
So one solution is to look at the output. We can do a compare very similar to the way you did, but checking for a string match, rather than strict equality, which can cause problems because of whitespace, among other things.
Here's an example:
Producing a success:
And a failure:
You can look a the output from rpm on file t1. Both forms of the "if" seemed to work for me, and you can look through man bash or a tutorial to see the details on the "if" ... cheers, drl
Hey,
I've a problem installing a package. rpm -ivh brings the errors:
libjvm.so is needed by
libverify.so is needed by
But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them.
I have also... (2 Replies)
Hi,
i'm designing a unix script and i want to know if there is a shell command or a way to see if perl is installed in the system.
thanks in advance! (5 Replies)
Hi All,
I want to check if the perl DBI package is already installed my AIX unix machine. is there any command to check this? Please help.
Thanks,
Am (2 Replies)
Hi,
I have a query in linux and please find the details of it
I have a command in linux and i want to know which rpm has provided that command.
ie: if we take ifconfig command ,i want to know what is the rpm package used to get that command.
Regards
Arun.Kakarla (3 Replies)
How to make RPM not write to RPM database if RPM fails to deploy?
IE I create an rpm spec file that contains the following
if
then
exit 1
fi
My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Hey there,
i run 1: on my server (RHEL 6) and getting response that the libodbc is not installed. If i use yum for installation, it tells me, there is no package like this ( 2: ). Since in the description of Definiens is mentioned that the Run-time dependency is unixODBC (libodbc.so.1), I assume... (2 Replies)
Hello,
i have installed a package by using the command
sudo rpm -i filepackage.rpm
package filepackage is already installed
when i try to remove it, i get an error saying "is not installed":
sudo rpm -e filepackage.rpm
error: package filepackage is not installed
How can... (4 Replies)
i would like to package up an rpm from pre-installed files, say i have a program called "widget" installed under "/opt/widget"
/opt/widget/bin/*
/opt/widget/lib/*
/opt/widget/etc/*
/opt/widget/log/*
and i want to create an rpm from those already installed files, what would the spec file... (2 Replies)
How can I check if "Autosys" is installed on my Linux and Solaris servers ?
I prefer Autosys instead of Crontab. (4 Replies)
Discussion started by: mohtashims
4 Replies
LEARN ABOUT CENTOS
makedeltarpm
MAKEDELTARPM(8) System Manager's Manual MAKEDELTARPM(8)NAME
makedeltarpm - create a deltarpm from two rpms
SYNOPSIS
makedeltarpm [-v] [-V version] [-z compression] [-m mbytes] [-s seqfile] [-r] [-u] oldrpm newrpm deltarpm
makedeltarpm [-v] [-V version] [-z compression] [-s seqfile] [-u] -p oldrpmprint oldpatchrpm oldrpm newrpm deltarpm
DESCRIPTION
makedeltarpm creates a deltarpm from two rpms. The deltarpm can later be used to recreate the new rpm from either filesystem data or the
old rpm. Use the -v option to make makedeltarpm more verbose about its work (use it twice to make it even more verbose).
If you want to create a smaller and faster to combine "rpm-only" deltarpm which does not work with filesystem data, specify the -r option.
makedeltarpm normally produces a V3 format deltarpm, use the -V option to specify a different version if desired. The -z option can be used
to specify a different compression method, the default is to use the same compression method as used in the new rpm.
The -s option makes makedeltarpm write out the sequence id to the specified file seqfile.
If you also use patch rpms you should use the -p option to specify the rpm-print of oldrpm and the created patch rpm. This option tells
makedeltarpm to exclude the files that were not included in the patch rpm but are not byteswise identical to the ones in oldrpm.
makedeltarpm can also create an "identity" deltarpm by adding the -u switch. In this case only one rpm has to be specified. An identity
deltarpm can be useful to just replace the signature header of a rpm or to reconstruct a rpm from the filesystem.
MEMORY CONSIDERATIONS
makedeltarpm normally needs about three to four times the size of the rpm's uncompressed payload. You can use the -m option to enable a
sliding block algorithm that needs mbytes megabytes of memory. This trades memory usage with the size of the created deltarpm. Furthermore,
the uncompressed deltarpm payload is currently also stored in memory when this option is used, but it tends to be small in most cases.
SEE ALSO applydeltarpm(8)combinedeltarpm(8)AUTHOR
Michael Schroeder <mls@suse.de>
Jul 2010 MAKEDELTARPM(8)