Comments (9)
What if add_local_repo()
generated my_mock_config
using include()
statement too, instead of copy-paste-and-edit the config_opts['config_file']
?
from mock.
Would you be kind enough to create a patch I could test?
from mock.
@belegdol I'd like to (once the time permits), but I bet someone with higher motivation will be faster..? :)
from mock.
I'm running into this issue as well trying to do test chain builds for RPM Fusion. Since the site-defaults.cfg file specifically states this should work I would hope it would be more of a priority...
# It's possible to use include statement in order to make one config included to another:
# include('/path/to/included/config.cfg')
from mock.
In the case this is useful for one of the core team, while it probably is not the right solution (it includes the included config, rather than generating my_mock_config file with the copied include statement(s)), this at least seems to sort of work as a temporary workaround (code adapted from existing mock support for include support) for my simple test cases.
--- /usr/bin/mockchain 2017-09-15 21:32:30.000000000 +0000
+++ /tmp/mockchain 2017-10-22 23:51:15.440611984 +0000
@@ -127,6 +127,20 @@
REPOS_ID.append(repoid)
return repoid
+def include(config_file):
+ global config_opts
+ if os.path.exists(config_file):
+ if config_file in config_opts['config_paths']:
+ """ Skip multiple inclusion of config_file """
+ return
+ config_opts['config_paths'].append(config_file)
+ with open(config_file) as f:
+ code = compile(f.read(), config_file, 'exec')
+ # pylint: disable=exec-used
+ exec(code)
+ else:
+ print("Could not find included config file: %s" % config_file)
+ sys.exit(1)
def add_local_repo(infile, destfile, baseurl, repoid=None):
"""take a mock chroot config and add a repo to it's yum.conf
from mock.
And I arrive here from here: https://pagure.io/FedoraReview/issue/286#comment-488571, fedora-review also breaks with includes ...
from mock.
The code that includes "include" is here [1] and here [2] is the minimum code that I could do to support the include .
[1] 2f147d0
[2] filename.py.txt
from mock.
can you test sergiomb2@5b4f37a ? please .
In your machine , is just edit /usr/bin/mockchain and replace the code .
Thanks
from mock.
I marked mockchain as obsoleted. Starting from next version, you should use
mock --chain
where this issue will not happen.
from mock.
Related Issues (20)
- Let's have a release 5.1 HOT 1
- Specifying `module_enable` config option via the command line errors HOT 3
- Exit code >0 when a build with --postinstall fails to install the resulting package HOT 1
- Please make new version of mock-core-configs HOT 1
- mock 5.0 fails to build for Fedora 39 with podman containers by default HOT 1
- mock tries to use mknod(), which fails in Podman container HOT 4
- Install Fedora 40+ chroots with dnf5 HOT 5
- Mock RPM does not provides python3dist(mockbuild) HOT 1
- mock with systemd-nspawn failing intermittently: Failed to mount /proc/sys HOT 1
- Release Mock 5.2 HOT 1
- ELN builds failing on copr HOT 13
- Mock fails for opensuse-leap-15.5 on Fedora 38 HOT 1
- Better CPU/MEM monitoring during the build (sampling?) HOT 4
- New release of mock-core-configs HOT 1
- It is possible to generate a BuildRequires which is not used during the build HOT 27
- Error: Unable to find a match: python3-dnf python3-dnf-plugins-core HOT 3
- upgrade to mock-5.x breaks `csmock` HOT 12
- Setup automatic beaker/behave testing after each merge HOT 2
- Include FS type in hw_info.log HOT 2
- Mock Release v5.3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mock.