Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 636369 Details for
Bug 860368
mock --scrub=chroot fails with IOError: [Errno 2] No such file or directory: '/var/lib/mock/fedora-rawhide-x86_64/result/state.log'
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Simpler patch to handle scrub calls to non-existant chroots
scrub.patch (text/plain), 4.43 KB, created by
Clark Williams
on 2012-10-31 21:35:24 UTC
(
hide
)
Description:
Simpler patch to handle scrub calls to non-existant chroots
Filename:
MIME Type:
Creator:
Clark Williams
Created:
2012-10-31 21:35:24 UTC
Size:
4.43 KB
patch
obsolete
>commit 001836e13b9a0aa2c17c6f880534e6ad8f870725 >Author: Clark Williams <williams@redhat.com> >Date: Tue Oct 2 14:50:35 2012 -0500 > > modify scrub to handle non-existant chroots [BZ# 860368] > > Handle being passed a config that has not been initialized or > has had its directory removed. > Put body of scrub ito a try except and pass IOError as ok. Issue a > warning when handling IOError though. > > Signed-off-by: Clark Williams <williams@redhat.com> > >diff --git a/py/mockbuild/backend.py b/py/mockbuild/backend.py >index a7a866d..46069a4 100644 >--- a/py/mockbuild/backend.py >+++ b/py/mockbuild/backend.py >@@ -206,32 +206,39 @@ class Root(object): > self.tryLockBuildRoot() > statestr = "scrub %s" % scrub_opts > self.start(statestr) >- self._resetLogging() >- self._callHooks('clean') >- for scrub in scrub_opts: >- if scrub == 'all': >- self.root_log.info("scrubbing everything for %s" % self.config_name) >- self._unlock_and_rm_chroot() >- self.chrootWasCleaned = True >- mockbuild.util.rmtree(self.cachedir, selinux=self.selinux) >- elif scrub == 'chroot': >- self.root_log.info("scrubbing chroot for %s" % self.config_name) >- self._unlock_and_rm_chroot() >- self.chrootWasCleaned = True >- elif scrub == 'cache': >- self.root_log.info("scrubbing cache for %s" % self.config_name) >- mockbuild.util.rmtree(self.cachedir, selinux=self.selinux) >- elif scrub == 'c-cache': >- self.root_log.info("scrubbing c-cache for %s" % self.config_name) >- mockbuild.util.rmtree(os.path.join(self.cachedir, 'ccache'), selinux=self.selinux) >- elif scrub == 'root-cache': >- self.root_log.info("scrubbing root-cache for %s" % self.config_name) >- mockbuild.util.rmtree(os.path.join(self.cachedir, 'root_cache'), selinux=self.selinux) >- elif scrub == 'yum-cache': >- self.root_log.info("scrubbing yum-cache for %s" % self.config_name) >- mockbuild.util.rmtree(os.path.join(self.cachedir, 'yum_cache'), selinux=self.selinux) >- self.unlockBuildRoot() >- self.finish(statestr) >+ try: >+ self._resetLogging() >+ self._callHooks('clean') >+ for scrub in scrub_opts: >+ if scrub == 'all': >+ self.root_log.info("scrubbing everything for %s" % self.config_name) >+ self._unlock_and_rm_chroot() >+ self.chrootWasCleaned = True >+ mockbuild.util.rmtree(self.cachedir, selinux=self.selinux) >+ elif scrub == 'chroot': >+ self.root_log.info("scrubbing chroot for %s" % self.config_name) >+ self._unlock_and_rm_chroot() >+ self.chrootWasCleaned = True >+ elif scrub == 'cache': >+ self.root_log.info("scrubbing cache for %s" % self.config_name) >+ mockbuild.util.rmtree(self.cachedir, selinux=self.selinux) >+ elif scrub == 'c-cache': >+ self.root_log.info("scrubbing c-cache for %s" % self.config_name) >+ mockbuild.util.rmtree(os.path.join(self.cachedir, 'ccache'), selinux=self.selinux) >+ elif scrub == 'root-cache': >+ self.root_log.info("scrubbing root-cache for %s" % self.config_name) >+ mockbuild.util.rmtree(os.path.join(self.cachedir, 'root_cache'), selinux=self.selinux) >+ elif scrub == 'yum-cache': >+ self.root_log.info("scrubbing yum-cache for %s" % self.config_name) >+ mockbuild.util.rmtree(os.path.join(self.cachedir, 'yum_cache'), selinux=self.selinux) >+ except IOError, e: >+ getLog().warn("parts of chroot do not exist: %s" % e ) >+ pass >+ finally: >+ print "finishing: %s" % statestr >+ self.finish(statestr) >+ print "unlocking buildroot" >+ self.unlockBuildRoot() > > decorate(traceLog()) > def tryLockBuildRoot(self): >@@ -245,7 +252,6 @@ class Root(object): > fcntl.lockf(self.buildrootLock.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB) > except IOError, e: > raise mockbuild.exception.BuildRootLocked, "Build root is locked by another process." >- > return 1 > > decorate(traceLog())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 860368
:
620488
| 636369