Bug 525297 - yum-3.2.24-5.fc12 seems to break livecd composes
Summary: yum-3.2.24-5.fc12 seems to break livecd composes
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F12Beta, F12BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2009-09-23 20:20 UTC by Kevin Fenzi
Modified: 2014-01-21 23:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-24 17:48:43 UTC


Attachments (Terms of Use)

Description Kevin Fenzi 2009-09-23 20:20:17 UTC
With yum-3.2.24-5.f12, livecd composes fail with: 

  Installing: xorg-x11-drv-rendition       ################### [1076/1077] 
  Installing: xorg-x11-drivers             ################### [1077/1077]{'force': True, 'verbose': None, 'selinux': 'enforcing', 'list_services': None, 'custom_rules': None, 'trust': None, 'add_module': None, 'block_icmp': [], 'forward_port': None, 'filename': None, 'version': None, 'list_icmp_types': None, 'update': None, 'remove_module': None, 'services': [], 'nostart': True, 'selinuxtype': None, 'default': None, 'enabled': True, 'quiet': True, 'converted': False, 'masq': None, 'ports': None}
{'force': True, 'verbose': None, 'selinux': None, 'list_services': None, 'custom_rules': None, 'trust': None, 'add_module': None, 'block_icmp': [], 'forward_port': None, 'filename': None, 'version': None, 'list_icmp_types': None, 'update': None, 'remove_module': None, 'services': ['mdns'], 'nostart': True, 'selinuxtype': None, 'default': None, 'enabled': True, 'quiet': True, 'converted': False, 'masq': None, 'ports': None}
Removing password for user root.
passwd: Success
umount: /var/tmp/imgcreate-vaozyY/install_root: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
/usr/lib/python2.6/site-packages/imgcreate/errors.py:45: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  return unicode(self.message)
Error creating Live CD : Unable to unmount filesystem at /var/tmp/imgcreate-vaozyY/install_root
umount: /var/tmp/imgcreate-vaozyY/install_root: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
 

Traceback (most recent call last):
  File "/usr/bin/livecd-creator", line 140, in <module>
    sys.exit(main())
  File "/usr/bin/livecd-creator", line 135, in main
    creator.cleanup()
  File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 578, in cleanup
    self.unmount()
  File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 556, in unmount
    self._unmount_instroot()
  File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 191, in _unmount_instroot
    LoopImageCreator._unmount_instroot(self)
  File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 943, in _unmount_instroot
    self.__instloop.cleanup()
  File "/usr/lib/python2.6/site-packages/imgcreate/fs.py", line 346, in cleanup
    Mount.cleanup(self)
  File "/usr/lib/python2.6/site-packages/imgcreate/fs.py", line 325, in cleanup
    self.unmount()
  File "/usr/lib/python2.6/site-packages/imgcreate/fs.py", line 356, in unmount
    raise MountError("Unable to unmount filesystem at %s" % self.mountdir)
imgcreate.errors.MountError/usr/lib/python2.6/site-packages/imgcreate/errors.py:40: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  return str(self.message)
: Unable to unmount filesystem at /var/tmp/imgcreate-vaozyY/install_root
umount: /var/tmp/imgcreate-vaozyY/install_root: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
Exception imgcreate.errors.MountError: MountError('Unable to unmount filesystem at /var/tmp/imgcreate-vaozyY/install_root',) in <bound method x86LiveImageCreator.__del__ of <imgcreate.live.x86LiveImageCreator object at 0x1970b10>> ignored

With the exact same setup/kickstart/etc and 3.2.24-4, everything works fine.

Comment 1 James Antill 2009-09-23 20:34:11 UTC
Can you test this patch:

    Explicitly close the sqlite handle, adds .close() and calls it on delete

diff --git a/yum/history.py b/yum/history.py
index ea3a464..482587e 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -215,6 +215,9 @@ class YumHistory:
         if self._db_file is None:
             self._create_db_file()
 
+    def __del__(self):
+        self.close()
+
     def _get_cursor(self):
         if self._conn is None:
             self._conn = sqlite.connect(self._db_file)
@@ -222,6 +225,11 @@ class YumHistory:
     def _commit(self):
         return self._conn.commit()
 
+    def close(self):
+        if self._conn is not None:
+            self._conn.close()
+            self._conn = None
+
     def _pkgtup2pid(self, pkgtup, checksum=None):
         cur = self._get_cursor()
         executeSQL(cur, """SELECT pkgtupid, checksum FROM pkgtups


...I'm not sure if I need to hook something up in the YumBase() del/close too.

Comment 2 James Antill 2009-09-23 21:03:14 UTC
 Looks like it, this does the close explicitly:

http://james.fedorapeople.org/yum/patches/history-close.patch

Comment 3 Kevin Fenzi 2009-09-24 17:48:43 UTC
Yep. 

yum-3.2.24-6.fc12.noarch works here (which I assume has this patch in it ;)


Note You need to log in before you can comment on or make changes to this bug.