[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: RPM difference between -I and -U



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OK, the last time I tried that, I got an error that the RPM database was 
already being used.  This led me to believe that you cannot call RPM 
recursively.

On Tuesday 29 January 2002 11:03 am, you wrote:
> This is the easiest way. I chose bind as my example RPM, but obviously you
> need to change it to yours....
>
> if [ `rpm -q bfind 2>/dev/null | wc -l` -gt 0 ] ; then echo "already
> exists" ; else echo "new install" ; fi
>
> Obviously you can replace the two echo statements with your rpm commands
> and anything else you want to do.
>
>
> Robin
>
> At 11:16 AM 29/01/02 -0500, you wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >OK, here's our problem.  We have a software package installed at some
> >customers sites.  We send them new releases every now and then.  During
> > the setup for the new release we need to do:
> >
> >if (this is an upgrade)
> >         Do some stuff
> >elseif (this is a new install)
> >         Do some other stuff
> >endif
> >
> >How can I do this with RPM.  $1 is always 1, because the package name is
> > the same when we do a new relase, the versions just change.  How can I do
> > this? Can we tell if RPM was called with -I or -U, or is there a better
> > way?
> >
> >Mike.
> >- --
> >*********************************
> >* Mike Baranski                 *
> >* Security Managment Consulting *
> >* 919-788-9200 Phone            *
> >* 919-510-0037 Fax              *
> >* mike@secmgmt.com              *
> >*********************************
> >
> >GPG Key located on:
> >http://www.keyserver.net/en/
> >-----BEGIN PGP SIGNATURE-----
> >Version: GnuPG v1.0.6 (GNU/Linux)
> >Comment: For info see http://www.gnupg.org
> >
> >iD8DBQE8VsrFn0XmoxBj3PwRAhkJAJ46iXmmsWtzl+4cRKregehooa4fCgCcDmy9
> >50U4ld1cqQsAmpA9oMyxfOE=
> >=TiuO
> >-----END PGP SIGNATURE-----
> >
> >
> >
> >_______________________________________________
> >Rpm-list mailing list
> >Rpm-list@redhat.com
> >https://listman.redhat.com/mailman/listinfo/rpm-list
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/rpm-list

- -- 
*********************************
* Mike Baranski                 *
* Security Managment Consulting *
* 919-788-9200 Phone            *
* 919-510-0037 Fax              *
* mike@secmgmt.com              *
*********************************

GPG Key located on:
http://www.keyserver.net/en/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8VtFan0XmoxBj3PwRApoAAJwNoEv3K4iuPY1TJy5wftt6rbHTawCcDz2f
O0P7MrJtOzGhaAWq4Ok/dWg=
=gA5i
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []