clalancette / oz

Automated installation for guest images
GNU Lesser General Public License v2.1
310 stars 129 forks source link

Missing Packages Ignored On Yum Install #225

Open ndonegan opened 8 years ago

ndonegan commented 8 years ago

There's an unfortunate edge case in yum where if multiple packages are installed, yum will happily return 0 even if some a subset of packages are missing. The yum output will state that the package is not available, but that's easily missed.

The only reliable way to actually check for this seems to be use yum info to individually check each package and see if it exists.

PR will be forthcoming shortly.

clalancette commented 8 years ago

Ug, that sucks. Do you know if dnf is affected by this as well?

ndonegan commented 8 years ago

I've not tested with DNF, only Yum Centos 6 and 7. I've got a fix ready to rumble which simply does a yum info for each package before attempting the install, and will throw an OzException listing any missing packages if necessary.

There is an added fringe benefit that more info on each package getting installed appears in the log, however it does have the disadvantage that an extra connection has to be initiated for each package getting installed. Personally, I feel that the small bit extra time for the connections is worth it to be sure that the packages are actually going to be installed!