-
Notifications
You must be signed in to change notification settings - Fork 25
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
Clean hotfix directory before patching the srpm contents #537
Conversation
2f9eebd
to
80eb3c1
Compare
@@ -64,6 +65,11 @@ def update_spec | |||
File.write(rpm_spec, spec_text) | |||
end | |||
|
|||
def clean_hotfix_directory | |||
files = Dir.glob("*").reject {|path| path.end_with?("src.rpm") } |
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.
Minor
files = Dir.glob("*").reject {|path| path.end_with?("src.rpm") } | |
files = Dir.glob("*").reject { |path| path.end_with?("src.rpm") } |
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.
If we're not using the glob part of Dir.glob would Dir.children(".") work?
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.
Even better:
files = Dir.glob("*").reject {|path| path.end_with?("src.rpm") } | |
files = Dir.glob("*[!.src.rpm]") |
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.
haha, I had glob negation at first but thought this looked more obvious considering performance isn't going to matter on a handful of file. I can change it if you also liked 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.
I personally think it reads better :D
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.
haha, ship it... just verifying 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.
ok, testing looks fine
For those of us who don't patch the srpm contents correctly the first or even second time, we should do something like make clean before we extract the srpm, patch things, and attempt to rpmbuild.
80eb3c1
to
8894d25
Compare
For those of us who don't patch the srpm contents correctly the first or
even second time, we should do something like make clean before we extract
the srpm, patch things, and attempt to rpmbuild.