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 310167 Details for
Bug 452730
RFE: Allow mock chroot's location to be configurable
[?]
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]
Patch that lets the user specify the mock chroot location
mockpatch (text/plain), 2.11 KB, created by
Waseem Daher
on 2008-06-24 17:25:29 UTC
(
hide
)
Description:
Patch that lets the user specify the mock chroot location
Filename:
MIME Type:
Creator:
Waseem Daher
Created:
2008-06-24 17:25:29 UTC
Size:
2.11 KB
patch
obsolete
>commit 54e80c7814c6fe97b404cf3d8478768bc2ea8117 >Author: Waseem Daher <wdaher@mit.edu> >Date: Tue Jun 24 12:38:00 2008 -0400 > > Allow the chroot's location to be configurable > > Can be specified on the commandline with --rootdir=DIRECTORY > or in the config file. This makes life easier for people > who want to use mock similarly to the way one would use > debootstrap. > >diff --git a/py/mock.py b/py/mock.py >index d04c859..486a55a 100755 >--- a/py/mock.py >+++ b/py/mock.py >@@ -139,6 +139,8 @@ def command_parse(config_opts): > help="disable configure option for build (may be used more than once)") > parser.add_option("--resultdir", action="store", type="string", > default=None, help="path for resulting files to be put") >+ parser.add_option("--rootdir", action="store", type="string", >+ default=None, help="path for where the chroot should be built") > parser.add_option("--uniqueext", action="store", type="string", > default=None, > help="Arbitrary, unique extension to append to buildroot" >@@ -298,6 +300,8 @@ def set_config_opts_per_cmdline(config_opts, options, args): > > if options.resultdir: > config_opts['resultdir'] = os.path.expanduser(options.resultdir) >+ if options.rootdir: >+ config_opts['rootdir'] = os.path.expanduser(options.rootdir) > if options.uniqueext: > config_opts['unique-ext'] = options.uniqueext > if options.rpmbuild_timeout is not None: >diff --git a/py/mock/backend.py b/py/mock/backend.py >index 3cc0a9f..db47ad7 100644 >--- a/py/mock/backend.py >+++ b/py/mock/backend.py >@@ -38,7 +38,10 @@ class Root(object): > > self.basedir = os.path.join(config['basedir'], config['root']) > self.rpmbuild_arch = config['rpmbuild_arch'] >- self._rootdir = os.path.join(self.basedir, 'root') >+ if config['rootdir']: >+ self._rootdir = config['rootdir'] >+ else: >+ self._rootdir = os.path.join(self.basedir, 'root') > self.homedir = config['chroothome'] > self.builddir = os.path.join(self.homedir, 'build') >
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 452730
: 310167