Updates from latest attempt to make ID list

This commit is contained in:
gerv@gerv.net 2007-05-17 07:55:53 -07:00
parent 169e12a7c6
commit 1ee5ef1364
2 changed files with 46 additions and 26 deletions

View File

@ -20,11 +20,16 @@ my %equivalents = (
"a mozilla.org contributor" => "Mozilla Foundation",
"Mozilla" => "Mozilla Foundation",
"Mozilla.com" => "Mozilla Corporation",
"The Mozilla Foundation" => "Mozilla Foundation",
"the Mozilla Foundation" => "Mozilla Foundation",
"Mozilla.org" => "Mozilla Foundation",
"the Mozilla Organization" => "Mozilla Foundation",
"Mozilla Organization" => "Mozilla Foundation",
"mozilla.org" => "Mozilla Foundation",
"mozilla.org SeaMonkey project" => "Mozilla Foundation",
"SeaMonkey project" => "Mozilla Foundation",
"SeaMonkey project at mozilla.org" => "Mozilla Foundation",
"Mozilla Calendar Squad" => "Mozilla Foundation",
"Mozilla Corp" => "Mozilla Corporation",
"Netscape" => "Netscape Communications Corporation",
"Netscape Corp" => "Netscape Communications Corporation",
@ -36,7 +41,8 @@ my %equivalents = (
"Novell" => "Novell Inc",
"Novell, Inc" => "Novell Inc",
"Novell Corporation" => "Novell Inc",
"Red Hat Software" => "Red Hat Inc",
"Red Hat" => "Red Hat Inc",
"Red Hat, Inc" => "Red Hat Inc",
@ -54,11 +60,25 @@ my %equivalents = (
"davel\@mozilla.com" => "Dave Liebreich",
"Digital Creations 2" => "Digital Creations 2 Inc",
"Douglas F. Turner II" => "Doug Turner",
"Kenneth Herron" => "Ken Herron",
"sqlite3", "Sqlite Project",
"University Of Queensland" => "University of Queensland",
"OEOne Corporation" => "OEone Corporation",
"Paul Kocher of Cryptography Research" => "Paul Kocher",
"QUALCOMM incorporated" => "Qualcomm Inc",
"Simdesk Technologies" => "Simdesk Technologies Inc",
"Google" => "Google Inc",
"Telephone Corporation)" => "NTT",
"Frank Schoenheit" => "Frank Schönheit",
"HÃ¥kan Waara" => "Håkan Waara",
"Kenneth Herron" => "Ken Herron",
"sqlite3", "The sqlite Project",
"The University Of Queensland" => "The University of Queensland",
"Karsten Düsterloh" => "Karsten Düsterloh",
"Simon Bünzli" => "Simon Bünzli",
"Vincent Béron" => "Vincent Béron",
"Tomas Mšller" => "Tomas Müller",
"person recorded in the version control logs" => "Mozilla Foundation",
"None" => "Mozilla Foundation"
);
# 'indevs' == "Initial Developers"
@ -72,7 +92,9 @@ while (<>)
{
# Chop off email addresses and suchlike
$indev =~ s/[<,\(].*$//;
$indev =~ s/^The\s*//i;
# Trim whitespace
$indev =~ s/^\s*//;
$indev =~ s/\s*$//;
@ -83,3 +105,4 @@ while (<>)
# Print out the list in a form suitable for pasting into about:licence.
print join (",\n", sort {lc $a cmp lc $b} keys %indevs);
print ".\n";

View File

@ -66,7 +66,8 @@
-A, --add Add a license to files that do not appear to
have one.
-I, --initial-developers
Display initial developer for each file.
Display initial developer for each file (-s is
suggested).
General Options:
-h, --help dump this help and exit
@ -144,8 +145,6 @@ except ImportError:
log = logging.getLogger("relic")
#---- globals
_version_ = (0, 7, 2)
@ -208,7 +207,6 @@ _g_skip_files = [
"intl/uconv/tools/parse-mozilla-encoding-table.pl",
"intl/uconv/tools/gen-big5hkscs-2001-mozilla.pl",
"js2/missing",
"tools/buildbot",
# Files which the script doesn't handle well. All have been relicensed
# manually.
@ -244,6 +242,7 @@ _g_skip_files = [
"security/svrcore/ltmain.sh",
"security/svrcore/missing",
"security/svrcore/depcomp",
"security/svrcore/aclocal.m4",
# Public domain or equivalent
"nsprpub/config/nspr.m4",
@ -277,7 +276,7 @@ _g_skip_dirs = [
"apache", # Obsolete mod_gzip code
"cck", # mkaply's baby; not core code anyway.
"dbm",
"directory/java-sdk", # Java LDAP SDK
# "directory/java-sdk", # Java LDAP SDK
"directory/perldap", # Perl LDAP SDK
"ef", # Multi-platform Java JIT
"grendel", # Mail client in Java
@ -302,6 +301,9 @@ _g_skip_dirs = [
"gc/boehm",
"other-licenses",
# Copy of GPLed tool
"tools/buildbot",
# Other directories we want to exclude
"embedding/tests", # Agreed as BSD
"calendar/libical", # LGPL/MPL
@ -377,7 +379,7 @@ _g_basename_to_comment_info = {
}
_g_ext_to_comment_info = {
".txt": (["##", "#", ]),
".txt": (["##", "#", ], ["#"]),
".TXT": (["##", "#", ]),
".doc": (["", ]),
@ -1294,17 +1296,6 @@ def _get_license_info(filename, show_initial=0, quick=0):
initial_developer = match.group("developer")
initial_copyright_date = match.group("date")
lic_info["initial_developer"] = initial_developer
###########################################################################
# XXX GRM - Temporary code to print out Initial Developer list for MPL
# section 3.3 compliance in about:licence.
# 0) Uncomment the two lines below.
# 1) /usr/src/relic/relic -s -f . > init-devs.txt
# 2) Edit init-devs.txt to remove the trailing summary text.
# 3) /usr/src/relic/make-id-list < init-devs.txt > list.txt
###########################################################################
if (show_initial):
print initial_developer
lic_info["initial_copyright_date"] = initial_copyright_date
log.info("initial developer paragraph: %r", paragraph)
log.info("initial developer: %r", initial_developer)
@ -1400,6 +1391,8 @@ def _get_license_info(filename, show_initial=0, quick=0):
def _report_on_file(path, (results, switch_to_mpl, show_initial, quick, _errors)):
log.debug("_report_on_file(path='%s', results)", path)
output = path + "\n"
lic_info = {}
if _is_binary(path):
output += "... binary, skipping this file\n"
else:
@ -1450,8 +1443,12 @@ def _report_on_file(path, (results, switch_to_mpl, show_initial, quick, _errors)
if lic_info.get("unindented_contributor_lines"):
output += "... one or more contributor lines were not indented properly"\
+ "\n"
print output;
if show_initial:
if "initial_developer" in lic_info:
print lic_info["initial_developer"]
else:
print output;
def _gather_info_on_file(path, (results, _errors)):
log.debug("_gather_info_on_file(path='%s', results)", path)
@ -1830,7 +1827,7 @@ def _add_license_to_file(original_path,
original_path, _errors)
try:
lic_info = _get_license_info(original_path, show_initial)
lic_info = _get_license_info(original_path, 0)
except RelicError, ex:
return _relicensing_error(ex, original_path, _errors)