softwarefactory-project / DLRN

DO NOT send Pull Requests here, send reviews to
https://softwarefactory-project.io/r/#/q/project:DLRN
Apache License 2.0
28 stars 24 forks source link

Any way not to delete /var/lib/mock/dlrn-xxx directory? #35

Closed MichaelXoXo closed 5 years ago

MichaelXoXo commented 5 years ago

I need to save the "/var/lib/mock/dlrn-fedora-x86_64/" directory after use dlrn to package, I find "mock --rebuild" will delete the "/var/lib/mock/dlrn-fedora-x86_64/" directory automatically.

javierpena commented 5 years ago

You may want to try setting the following options in the /etc/mock/site-defaults.cfg file:

config_opts['cleanup_on_success'] = 0 config_opts['cleanup_on_failure'] = 0

Their default value is 1, which means mock will cleanup its directory after each successful or failed build.

MichaelXoXo commented 5 years ago

Thank , I use the --no-cleanup-after option when I mock --rebuild to build rpm,this is the same effect as to setting the cfg :

config_opts['cleanup_on_success'] = 0
config_opts['cleanup_on_failure'] = 0

The chroot directory will not be deleted, but I also can't get the all the rpm info which defined as "build-requires" in the spec file. I want to get the list of build require rpm in the process of building package in the mock environment.

javierpena commented 5 years ago

The build requirements will be fetched from whatever YUM repo is specified in the mock configuration, so they are not part of the buildroot (it can be part of /var/cache on the machine where DLRN is running). The complete list of build requirements can be fetched from the build log.