Hello,
----- 元のメッセージ -----
> 差出人: "Vít Ondruch" <vondruch(a)redhat.com>
> 宛先: ruby-sig(a)lists.fedoraproject.org
> 送信済み: 2017年1月12日, 木曜日 18:24:55
> 件名: Re: Ruby 2.4 - Mass rebuild
>
> Hi all,
>
> Seeing commit as this:
>
>
> ```
>
> @@ -44,9 +44,13 @@ gem unpack %{SOURCE0}
> gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
>
> # Remove developer-only files.
> +FREEZE=""
> +%if 0%{?fedora} >= 26
> +FREEZE=".freeze"
> +%endif
> for f in .gitignore Gemfile Rakefile; do
> rm $f
> - sed -i "s|\"$f\",||g" %{gem_name}.gemspec
> + sed -i "s|\"$f\"${FREEZE},||g" %{gem_name}.gemspec
> done
>
> # Skip tests that fail.
>
> ```
>
> (BTW is that sed in the loop?!?)
>
> I just want to remind you, that we have the %gemspec_remove_dep and
> %gemspec_add_dep macros available in all Fedoras. You can see their
> usage here:
>
>
http://pkgs.fedoraproject.org/cgit/rpms/rubygem-scruffy.git/commit/?id=be...
Well, %gemspec_remove_dep is for gem "dependency" (i.e. to change
"Requires: rubygem(foo)" on
rpm side), right? What this do here is to change (remove) file entry
in gem. sed loop is to remove one file by one file, so that afterwards
we just have to modify "$f" list afterwards (perhaps).
You are right of course. This actually removes the files from file list
entries. I was not paying enough attention :(
I should probably spend some time to prepare some macro changing the
file list, since it is the second most common .gemspec modification ....
Well ...
Vít