[Rpm-ecosystem] file trigger design: opt out of file list?
Colin Walters
walters at verbum.org
Fri Jul 28 16:48:26 UTC 2017
On Fri, Jul 28, 2017, at 10:20 AM, Vít Ondruch wrote:
>
> I don't want go back to this.
Of course, the trigger is better.
> Also, Vagrant would not need to traverse anything, if this was implemented:
I mean doing something like this (I don't really know Ruby, so excuse
my shell-in-ruby):
diff --git a/vagrant.spec b/vagrant.spec
index a957766..0b79b36 100644
--- a/vagrant.spec
+++ b/vagrant.spec
@@ -222,7 +222,7 @@ begin
raise
end
- $stdin.each_line do |gemspec_file|
+ find %{dirname:%{vagrant_plugin_spec}} -type f -name '*.gemspec' | while read gemspec_file; do
next if gemspec_file =~ /\/%{name}-%{version}.gemspec$/
spec = Gem::Specification.load(gemspec_file.strip)
I mean, yes, it's slightly more efficient to update the file with only what
changed, but compared to all of the other I/O going on, I can't imagine
it's even going to be measurable.
One way to think of this is it's really more like a `%posttrans` that happens
to only trigger if it matches a file pattern.
More information about the Rpm-ecosystem
mailing list