qulogic / FedoraReview

Forked from FedoraReview 5 years ago
Clone

535dba7 Properly propagate mock options to all calls

2 files Authored by frostyx 2 years ago, Committed by ngompa 2 years ago,
    Properly propagate mock options to all calls
    
    AFAIK there is no upstream issue for this but `fedora-review` doesn't
    work with Mock Tmpfs plugin enabled. To reproduce the issue, simply
    edit `/etc/mock/site-defaults.cfg` and insert the following line
    
         config_opts['plugin_conf']['tmpfs_enable'] = True
    
    And then run whatever `fedora-review` command. It is going to fail on
    something like this
    
        DEBUG: Running: mock -r fedora-33-x86_64 -qn --enable-network shell dnf repoquery -C -l filesystem
        /bin/sh: dnf: command not found
    
    The problem is that within `fedora-review` run, we call mock several
    times to install some tooling, run checks, etc. Each mock call expect
    the changes from the previous one to be present. Tmpfs plugin violates
    this because it makes buildroots not persistent anymore and discart
    all the changes. You can find more about the Tmpfs plugin here
    
    https://github.com/rpm-software-management/mock/wiki/Plugin-Tmpfs
    
    I think `fedora-review` shouldn't be concerned about all possible
    plugins and making sure it works with them. Instead, we should allow
    users to disable them with
    
    	fedora-review ... --mock-options='--disable-plugin=tmpfs'
    
    Unforunatelly this doesn't work because `fedora-review` doesn't
    propagate the mock options to all mock calls (only to some of
    them). This commit tries to fix that.
    
        
file modified
+19 -1
file modified
+3 -3