yum changed to using an exclusive lock on the history database file, causing use of yum in %post to fail because anaconda wasn't closing out access to yum before running the kickstart %post scripts.
complete now closes the ts objects, the ayum object and deletes the rpm database.
Note that running yum from %post is not encouraged, it is better to include the repositories and packages in the kickstart. --- yuminstall.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/yuminstall.py b/yuminstall.py index 82923ae..9e3c24f 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1324,6 +1324,12 @@ debuglevel=6 if not anaconda.mediaDevice and os.path.ismount(self.ayum.tree): isys.umount(self.ayum.tree)
+ # Attempt to clean up Yum so that running yum in post will work (#1110148) + self.ayum.closeRpmDB() + del self.ayum.tsInfo + del self.ayum.ts + self.ayum.close() + # clean up rpmdb locks so that kickstart %post scripts aren't # unhappy (#496961) iutil.resetRpmDb(anaconda.rootPath)
On Wed, Jun 18, 2014 at 09:14:26AM -0700, Brian C. Lane wrote:
yum changed to using an exclusive lock on the history database file, causing use of yum in %post to fail because anaconda wasn't closing out access to yum before running the kickstart %post scripts.
complete now closes the ts objects, the ayum object and deletes the rpm database.
^^ should say database locks.
Tested it out, and it works for me, so ack. Thanks!
On Wed, Jun 18, 2014 at 09:14:26AM -0700, Brian C. Lane wrote:
yum changed to using an exclusive lock on the history database file, causing use of yum in %post to fail because anaconda wasn't closing out access to yum before running the kickstart %post scripts.
complete now closes the ts objects, the ayum object and deletes the rpm database.
Note that running yum from %post is not encouraged, it is better to include the repositories and packages in the kickstart.
yuminstall.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/yuminstall.py b/yuminstall.py index 82923ae..9e3c24f 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1324,6 +1324,12 @@ debuglevel=6 if not anaconda.mediaDevice and os.path.ismount(self.ayum.tree): isys.umount(self.ayum.tree)
# Attempt to clean up Yum so that running yum in post will work (#1110148)
self.ayum.closeRpmDB()
del self.ayum.tsInfo
del self.ayum.ts
self.ayum.close()
# clean up rpmdb locks so that kickstart %post scripts aren't # unhappy (#496961) iutil.resetRpmDb(anaconda.rootPath)
-- 1.9.3
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches@lists.fedorahosted.org