Pseudo code style..
yum list install gimp [1]
if yum found gimp
- ask to look for updates and install them if the user answers "y"
else
- install gimp
[1] I noticed that yum wants to update his local repository here as
well. I think it's better to get that behaviour out yum and only
update it's local repo if there is none available or a update command
is given or a install command is given.
Hope that explains it better.