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 923731 Details for
Bug 1126117
Mock should accept paths to target definition files
[?]
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]
Add support for target paths to mock
0001-Bug-1126117-Accept-paths-as-arguments-to-root.patch (text/plain), 2.34 KB, created by
Craig Ringer
on 2014-08-04 03:54:16 UTC
(
hide
)
Description:
Add support for target paths to mock
Filename:
MIME Type:
Creator:
Craig Ringer
Created:
2014-08-04 03:54:16 UTC
Size:
2.34 KB
patch
obsolete
>From 75a98a85715edd528fd343d242ee38aada5e98ad Mon Sep 17 00:00:00 2001 >From: Craig Ringer <craig@2ndquadrant.com> >Date: Sat, 2 Aug 2014 09:30:15 +0800 >Subject: [PATCH] Bug 1126117: Accept paths as arguments to --root > >This permits mock target definitions to be stored outside the configdir, which >is useful when working with targets in revision control while still using a >site config file that's in the default configdir. >--- > py/mock.py | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/py/mock.py b/py/mock.py >index 03ee627..ebc3fd8 100755 >--- a/py/mock.py >+++ b/py/mock.py >@@ -125,7 +125,8 @@ def command_parse(config_opts): > > # options > parser.add_option("-r", "--root", action="store", type="string", dest="chroot", >- help="chroot name/config file name default: %default", >+ help="chroot config file name or path. Taken as a path if it ends " >+ "in .cfg, otherwise looked up in the configdir. default: %default", > default='default') > > parser.add_option("--offline", action="store_false", dest="online", >@@ -418,13 +419,21 @@ def main(ret): > config_opts['config_paths'] = [] > > # Read in the config files: default, and then user specified >- for cfg in ( os.path.join(config_path, 'site-defaults.cfg'), '%s/%s.cfg' % (config_path, options.chroot)): >+ for cfgname in ['site-defaults', options.chroot]: >+ if cfgname.endswith('.cfg'): >+ # If the .cfg is explicitly specified we take the root arg to >+ # specify a path, rather than looking it up in the configdir. >+ cfg = cfgname >+ else: >+ # Undecorated chroot names are looked up from the configdir >+ cfg = os.path.join(config_path, cfgname) + ".cfg" > if os.path.exists(cfg): > config_opts['config_paths'].append(cfg) > mockbuild.util.update_config_from_file(config_opts, cfg, uidManager) > else: > log.error("Could not find required config file: %s" % cfg) > if options.chroot == "default": log.error(" Did you forget to specify the chroot to use with '-r'?") >+ if "/" in cfg: log.error(" If you're trying to specify a path, include the .cfg extension, e.g. -r ./target.cfg") > sys.exit(1) > > # Read user specific config file >-- >1.9.0 >
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 1126117
: 923731