@@ -530,6 +530,7 @@ class DejaSource(ExternalLicensesSource):
530
530
"is_deprecated" ,
531
531
"is_exception" ,
532
532
# not yet
533
+ # "notes",
533
534
# "standard_notice",
534
535
)
535
536
non_updatable_attributes = ("notes" ,)
@@ -601,6 +602,8 @@ def build_license(self, mapping, *args, **kwargs):
601
602
key = mapping ["key" ]
602
603
standard_notice = mapping .get ("standard_notice" ) or ""
603
604
standard_notice = clean_text (standard_notice )
605
+ # notes = mapping.get("reference_notes") or ""
606
+ # notes = clean_text(notes)
604
607
605
608
deprecated = not mapping .get ("is_active" )
606
609
spdx_license_key = mapping .get ("spdx_license_key" ) or None
@@ -629,6 +632,7 @@ def build_license(self, mapping, *args, **kwargs):
629
632
is_exception = mapping .get ("is_exception" , False ),
630
633
is_deprecated = deprecated ,
631
634
standard_notice = standard_notice ,
635
+ # notes=notes,
632
636
)
633
637
text = mapping ["full_text" ] or ""
634
638
# normalize EOL to POSIX
@@ -994,6 +998,7 @@ def update_external(_attrib, _sc_val, _ext_val):
994
998
update_scancode (attrib , scancode_value , external_value )
995
999
continue
996
1000
1001
+ # We merge sequences
997
1002
if isinstance (scancode_value , (list , tuple )) and isinstance (external_value , (list , tuple )):
998
1003
normalized_scancode_value = set (s for s in scancode_value if s and s .strip ())
999
1004
normalize_external_value = set (s for s in external_value if s and s .strip ())
@@ -1034,8 +1039,7 @@ def update_external(_attrib, _sc_val, _ext_val):
1034
1039
continue
1035
1040
1036
1041
if isinstance (scancode_value , str ) and isinstance (external_value , str ):
1037
- # keep the stripped and normalized spaces value
1038
- # normalized spaces
1042
+ # make value stripped and with normalized spaces
1039
1043
normalized_scancode_value = " " .join (scancode_value .split ())
1040
1044
normalize_external_value = " " .join (external_value .split ())
1041
1045
@@ -1165,9 +1169,9 @@ def synchronize_licenses(
1165
1169
1166
1170
# the matching key exists on both sides: merge/update both licenses
1167
1171
scancode_updated , external_updated = merge_licenses (
1168
- scancode_license ,
1169
- external_license ,
1170
- external_source .updatable_attributes ,
1172
+ scancode_license = scancode_license ,
1173
+ external_license = external_license ,
1174
+ updatable_attributes = external_source .updatable_attributes ,
1171
1175
from_spdx = use_spdx_key ,
1172
1176
)
1173
1177
0 commit comments