FOSSology  4.4.0
Open Source License Compliance by Open Source Software
dbmigrate_4.2-4.3.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2022 Siemens AG
4  SPDX-FileContributor: Gaurav Mishra <mishra.gaurav@siemens.com>
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
14 require_once("$LIBEXECDIR/fo_mapping_license.php");
15 
20 function Migrate_42_43(bool $verbose): void
21 {
22  $shortname_array = array(
23  /* old_shortname => new_shortname */
24  "GPL-1.0" => "GPL-1.0-only",
25  "GPL-1.0+" => "GPL-1.0-or-later",
26  "GPL-2.0" => "GPL-2.0-only",
27  "GPL-2.0+" => "GPL-2.0-or-later",
28  "GPL-3.0" => "GPL-3.0-only",
29  "GPL-3.0+" => "GPL-3.0-or-later",
30  "GPL-3.0-possibility" => "GPL-3.0-only-possibility",
31  "GPL-2.0+KDEupgradeClause" => "GPL-2.0-or-laterKDEupgradeClause",
32  "LGPL-1.0" => "LGPL-1.0-only",
33  "LGPL-1.0+" => "LGPL-1.0-or-later",
34  "LGPL-2.0" => "LGPL-2.0-only",
35  "LGPL-2.0+" => "LGPL-2.0-or-later",
36  "LGPL-2.1" => "LGPL-2.1-only",
37  "LGPL-2.1+" => "LGPL-2.1-or-later",
38  "LGPL-3.0" => "LGPL-3.0-only",
39  "LGPL-3.0+" => "LGPL-3.0-or-later",
40  "LGPL-3.0-possibility" => "LGPL-3.0-only-possibility",
41  "LGPL-2.1+-KDE-exception" => "LGPL-2.1-or-later-KDE-exception",
42  "AGPL-1.0" => "AGPL-1.0-only",
43  "AGPL-1.0+" => "AGPL-1.0-or-later",
44  "AGPL-3.0" => "AGPL-3.0-only",
45  "AGPL-3.0+" => "AGPL-3.0-or-later",
46  "GFDL-1.1" => "GFDL-1.1-only",
47  "GFDL-1.1+" => "GFDL-1.1-or-later",
48  "GFDL-1.2" => "GFDL-1.2-only",
49  "GFDL-1.2+" => "GFDL-1.2-or-later",
50  "GFDL-1.3" => "GFDL-1.3-only",
51  "GFDL-1.3+" => "GFDL-1.3-or-later",
52  "GFDL-1.1-invariants+" => "GFDL-1.1-invariants-or-later",
53  "GFDL-1.2-invariants+" => "GFDL-1.2-invariants-or-later",
54  "GFDL-1.2-no-invariants+" => "GFDL-1.2-no-invariants-or-later"
55  );
56  renameLicenses($shortname_array, $verbose);
57 }
Migrate_42_43(bool $verbose)
renameLicenses($shortname_array, $Verbose)
Rename old shortname to new shortname.