-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the permissions for (re)created resultdir #1468
Fix the permissions for (re)created resultdir #1468
Conversation
This is already handled by the preceding resetLogging() call. Relates: rpm-software-management#1467
48217f1
to
d690bca
Compare
To make the fix possible, we needed to make the result directory creation method public. Fixes: rpm-software-management#1467
d690bca
to
a0155c5
Compare
I plan to merge this early and wrap the release (once the CI gets green). Please comment ASAP. |
@@ -477,7 +477,6 @@ def chain(self, args, options, buildroot): | |||
resultdir = os.path.join(self.config['local_repo_dir'], pdn) | |||
self.buildroot.resultdir = resultdir | |||
self.buildroot.resetLogging(force=True) | |||
file_util.mkdirIfAbsent(resultdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uff. I'm not sure about this. But yeah, in theory it should not be needed. Let be brave and do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mock/mock/py/mockbuild/buildroot.py
Lines 627 to 632 in 8122bda
# ensure we dont attach the handlers multiple times. | |
if self.logging_initialized and not force: | |
return | |
self.logging_initialized = True | |
self._setup_result_dir() |
This is the force=True case, I think we are safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -56,7 +56,7 @@ def __scanChroot(self): | |||
regexstr = "|".join(self.scan_opts['regexes']) | |||
regex = re.compile(regexstr) | |||
chroot = self.buildroot.make_chroot_path() | |||
file_util.mkdirIfAbsent(self.resultdir) | |||
self.buildroot.create_resultdir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh! While it was causing issues before, now it is broken even more -> because self.resultdir
is not serl.buildroot.resultdir
, nah. chroot_scan is broken in 5.7
Fixes: #1467