When I run yum install <X> where <X> has already been installed, yum exits with a return status of 1 and prints "Error: Nothing to do".
Aside from checking for this string in the output (which seems like a very shaky thing to base my script on), is there some way I can test whether the package already exists? Clearly, yum knows whether or not it already exists, since it's throwing that error, but how can I access that knowledge?
To add to this, some of the packages are downloaded by way of URLs, not package names, so checking yum list installed doesn't work.