Code review request: 8011402: Move blacklisting certificate logic from hard code to data

Weijun Wang weijun.wang at oracle.com
Wed Sep 11 12:18:53 UTC 2013



On 9/11/13 7:25 PM, Erik Joelsson wrote:
>
> On 2013-09-10 07:01, Weijun Wang wrote:
>> Hi Eric
>>
>> The creation of the blacklisted.certs file looks like this now:
>>
>> $(BLACKLISTED_CERTS_DST): $(BLACKLISTED_CERTS_SRC)
>>     $(MKDIR) -p $(@D)
>>     $(CAT) $^ | $(SED) '/^$$/d' | $(SORT) | $(UNIQ) > $@.tmp
>>     $(GREP) -i Algorithm $@.tmp > $@
>>     $(GREP) -iv Algorithm $@.tmp >> $@
>>
>> As you can see, I use 2 greps to make sure the output always starts
>> with "Algorithm=something" and entries followed ordered. Is there a
>> better way to do it?
>>
>> I also want to add a check before the last line to make sure there is
>> only one line of "Algorithm" in $@ since there is a possibility that
>> the algorithm value is different in different sources. How can I do that?
> Would this be considered an error or do you expect one would like to
> override the other? I would probably do something along the lines of:
>
> if test `grep -i Algorithm $@ | wc | awk '{ print $1 }'` != 1; then \
>    echo "Some message" && false \
> fi

This is an error.

How do I write the lines above inside CopyFiles.gmk?

Thanks
Max

>
> But there are probably simpler ways of handling it.
>
> /Erik
>>
>> Thanks
>> Max
>



More information about the build-dev mailing list