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 853438 Details for
Bug 1056271
Spec files that depend on macros cannot be built from SCM
[?]
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 fixes the problem
0001-make-scm-plugin-use-user-defined-RPM-macros.patch (text/plain), 1.95 KB, created by
Rodrigo Dias Cruz
on 2014-01-21 20:39:07 UTC
(
hide
)
Description:
Patch that fixes the problem
Filename:
MIME Type:
Creator:
Rodrigo Dias Cruz
Created:
2014-01-21 20:39:07 UTC
Size:
1.95 KB
patch
obsolete
>From a5aee67ba695cc1e04e2f079be3e4832d0e8864e Mon Sep 17 00:00:00 2001 >From: Rodrigo Dias Cruz <rodrigodc@gmail.com> >Date: Tue, 21 Jan 2014 18:01:05 -0200 >Subject: [PATCH] make scm plugin use user-defined RPM macros > >Command line options --define="MACRO EXPR" were ignored by scm plugin >and spec files that depended on them could not be built directly from >SCM. Fix this to allow those spec files to be built. >--- > py/mock.py | 2 +- > py/mockbuild/scm.py | 8 +++++++- > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/py/mock.py b/py/mock.py >index 283fef2..c17f346 100755 >--- a/py/mock.py >+++ b/py/mock.py >@@ -503,7 +503,7 @@ def main(ret): > > # Fetch and prepare sources from SCM > if config_opts['scm']: >- scmWorker = mockbuild.scm.scmWorker(log, config_opts['scm_opts']) >+ scmWorker = mockbuild.scm.scmWorker(log, config_opts['scm_opts'], config_opts['macros']) > scmWorker.get_sources() > (options.sources, options.spec) = scmWorker.prepare_sources() > >diff --git a/py/mockbuild/scm.py b/py/mockbuild/scm.py >index 9d130b7..6c4ee51 100644 >--- a/py/mockbuild/scm.py >+++ b/py/mockbuild/scm.py >@@ -20,10 +20,12 @@ import mockbuild.util > class scmWorker(object): > """Build RPMs from SCM""" > decorate(traceLog()) >- def __init__(self, log, opts): >+ def __init__(self, log, opts, macros): > self.log = log > self.log.debug("Initializing SCM integration...") > >+ self.macros = macros >+ > self.method = opts['method'] > if self.method == "cvs": > self.get = opts['cvs_get'] >@@ -122,6 +124,10 @@ class scmWorker(object): > sys.exit(5) > self.spec = sf > >+ # Add passed RPM macros before parsing spec file >+ for macro, expression in self.macros.iteritems(): >+ rpm.addMacro(macro.lstrip('%'), expression) >+ > # Dig out some basic information from the spec file > self.sources = [] > self.name = self.version = None >-- >1.8.1.2 >
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 1056271
: 853438