Protect the embedded libraries when updating copyrights - we shouldn't be overwriting their copyrights with our own
bot:notest Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
7762c21c23
Коммит
2f0aec709a
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||||
# Copyright (c) 2016 Intel, Inc. All rights reserved.
|
# Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -67,6 +67,9 @@ my $HELP = 0;
|
|||||||
my $my_search_name = "Cisco";
|
my $my_search_name = "Cisco";
|
||||||
my $my_formal_name = "Cisco Systems, Inc. All rights reserved.";
|
my $my_formal_name = "Cisco Systems, Inc. All rights reserved.";
|
||||||
|
|
||||||
|
# Protected directories
|
||||||
|
my @protected = qw(pmi2x/pmix/ hwloc1113/hwloc/ libevent2022/libevent/);
|
||||||
|
|
||||||
# Override the defaults if some values are set in the environment
|
# Override the defaults if some values are set in the environment
|
||||||
$my_search_name = $ENV{OMPI_COPYRIGHT_SEARCH_NAME}
|
$my_search_name = $ENV{OMPI_COPYRIGHT_SEARCH_NAME}
|
||||||
if (defined($ENV{OMPI_COPYRIGHT_SEARCH_NAME}));
|
if (defined($ENV{OMPI_COPYRIGHT_SEARCH_NAME}));
|
||||||
@ -145,6 +148,22 @@ if ($#files < 0) {
|
|||||||
|
|
||||||
# Examine each of the files and see if they need an updated copyright
|
# Examine each of the files and see if they need an updated copyright
|
||||||
foreach my $f (@files) {
|
foreach my $f (@files) {
|
||||||
|
|
||||||
|
# ignore embedded copies of external codes as we shouldn't
|
||||||
|
# be overwriting their copyrights - if someone actually
|
||||||
|
# modified any of those files, they can manually update
|
||||||
|
# the copyright
|
||||||
|
my $ignore = 0;
|
||||||
|
foreach my $p (@protected) {
|
||||||
|
if (index($f, $p) != -1) {
|
||||||
|
quiet_print "Ignoring protected file $f\n";
|
||||||
|
$ignore = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (1 == $ignore) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
quiet_print "Processing added/changed file: $f\n";
|
quiet_print "Processing added/changed file: $f\n";
|
||||||
open(FILE, $f) || die "Can't open file: $f";
|
open(FILE, $f) || die "Can't open file: $f";
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user