Warning: RPMDB altered outside of yum hangs on rpm install

May 2024 ยท 1 minute read

I just created rpm package which contains few shell scripts and My rpm executes those shell scripts in post installation step ( i.e %post section). My RPM is created successfully and when I run rpm -ivh myrpmfile.rpm RPM able to find my shell scripts and running them properly. Those scripts also install few other packages with yum so when yum try to install those packages it hangs with the following error

Warning: RPMDB altered outside of yum

Sometimes it hangs at the following state.

0

1 Answer

You can't call yum from your %post because the database is locked. If you need other packages installed, you set them as Required. If your RPM also installs the yum repo files, then you need to make them into two RPMs.

That warning is just because you used rpm directly "behind its back" and most likely is a red herring.

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJoa2loZGZ%2Bd32OsJirppmjtG6%2Bz6abm2WRocGmvsSdZKitpKi2pbGMqJ1msaWieqmtzaCqZqeeYr%2BxuYyipayskaG5