#288 Allow the use of a custom mock-config
Merged 5 years ago by ngompa. Opened 6 years ago by eclipseo.
Unknown source allow_custom_mock_cfg  into  devel

file modified
+3 -1
@@ -157,7 +157,9 @@

              config = Settings.mock_config

          mockdir = Settings.configdir if Settings.configdir \

              else '/etc/mock'

-         path = os.path.join(mockdir, config + '.cfg')

+         path = os.path.join(mockdir, config + '.cfg') \

+             if not config.endswith('.cfg') \

+             else os.path.join(mockdir, config)

  

          config_opts = {}

          with open(path) as f:

This PR allows the use of a custom mock config instead of only the files in /etc/mock.

For example one can generate a mock config with fedpkg:

fedpkg --release f28 mock-config > mock.cfg

And then use it in fedora-review:

fedora-review --mock-config pwd/mock.cfg -n package

This allows to build directly from the latest Koji packages and thus avoid the need to wait for the next Rawhide compose.

@eclipseo Is this still relevant? If so, could you please rebase this PR?

There seem to be unrelated changes here, but the idea sounds good.

@qulogic it's a bad merge, which is what's causing this problem...

rebased onto 5ebf0db

5 years ago

Rebased. It should be okay now.
I use this with custom mock config for F29-F31 or for COPR based mock config.

Pull-Request has been merged by ngompa

5 years ago
Metadata