check_whence.py: ban link-to-a-link
Using link-to-a-link reduces legibility and changes to the root link, also changes the leafs. Where the latter may be undesired and in some cases just wrong. We have a couple of instances in-tree, so fix them up and ban the combination. One particularly good example, why we'd want this is: https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/272 In there we have the following: File: ti/tas2781/TAS2XXX1EB30.bin [snip] Link: TAS2XXX1EB3.bin -> ti/tas2781/TAS2XXX1EB3.bin Link: ti/tas2781/TAS2XXX1EB3.bin -> TAS2XXX1EB30.bin Link: TAS2XXX1EB30.bin -> ti/tas2781/TAS2XXX1EB30.bin Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
981b1ab776
commit
8a507494f3
14
WHENCE
14
WHENCE
|
@ -3699,7 +3699,7 @@ File: ath10k/WCN3990/hw1.0/qcm2290/wlanmdsp.mbn
|
||||||
Version: WLAN.HL.3.3.7.c2-00931-QCAHLSWMTPLZ-1
|
Version: WLAN.HL.3.3.7.c2-00931-QCAHLSWMTPLZ-1
|
||||||
Link: ath10k/WCN3990/hw1.0/qrb4210/wlanmdsp.mbn -> ../qcm2290/wlanmdsp.mbn
|
Link: ath10k/WCN3990/hw1.0/qrb4210/wlanmdsp.mbn -> ../qcm2290/wlanmdsp.mbn
|
||||||
Link: qcom/qcm2290/wlanmdsp.mbn -> ../../ath10k/WCN3990/hw1.0/qcm2290/wlanmdsp.mbn
|
Link: qcom/qcm2290/wlanmdsp.mbn -> ../../ath10k/WCN3990/hw1.0/qcm2290/wlanmdsp.mbn
|
||||||
Link: qcom/qrb4210/wlanmdsp.mbn -> ../../ath10k/WCN3990/hw1.0/qrb4210/wlanmdsp.mbn
|
Link: qcom/qrb4210/wlanmdsp.mbn -> ../../ath10k/WCN3990/hw1.0/qcm2290/wlanmdsp.mbn
|
||||||
File: ath10k/WCN3990/hw1.0/qcm2290/firmware-5.bin
|
File: ath10k/WCN3990/hw1.0/qcm2290/firmware-5.bin
|
||||||
Link: ath10k/WCN3990/hw1.0/qrb4210/firmware-5.bin -> ../qcm2290/firmware-5.bin
|
Link: ath10k/WCN3990/hw1.0/qrb4210/firmware-5.bin -> ../qcm2290/firmware-5.bin
|
||||||
|
|
||||||
|
@ -5227,11 +5227,11 @@ Link: nvidia/gp104/acr/bl.bin -> ../../gp102/acr/bl.bin
|
||||||
Link: nvidia/gp104/acr/ucode_load.bin -> ../../gp102/acr/ucode_load.bin
|
Link: nvidia/gp104/acr/ucode_load.bin -> ../../gp102/acr/ucode_load.bin
|
||||||
Link: nvidia/gp104/acr/ucode_unload.bin -> ../../gp102/acr/ucode_unload.bin
|
Link: nvidia/gp104/acr/ucode_unload.bin -> ../../gp102/acr/ucode_unload.bin
|
||||||
Link: nvidia/gp104/acr/unload_bl.bin -> ../../gp102/acr/unload_bl.bin
|
Link: nvidia/gp104/acr/unload_bl.bin -> ../../gp102/acr/unload_bl.bin
|
||||||
Link: nvidia/gp104/gr/fecs_bl.bin -> ../../gp102/gr/fecs_bl.bin
|
Link: nvidia/gp104/gr/fecs_bl.bin -> ../../gm200/gr/fecs_bl.bin
|
||||||
File: nvidia/gp104/gr/fecs_data.bin
|
File: nvidia/gp104/gr/fecs_data.bin
|
||||||
File: nvidia/gp104/gr/fecs_inst.bin
|
File: nvidia/gp104/gr/fecs_inst.bin
|
||||||
File: nvidia/gp104/gr/fecs_sig.bin
|
File: nvidia/gp104/gr/fecs_sig.bin
|
||||||
Link: nvidia/gp104/gr/gpccs_bl.bin -> ../../gp102/gr/gpccs_bl.bin
|
Link: nvidia/gp104/gr/gpccs_bl.bin -> ../../gm200/gr/gpccs_bl.bin
|
||||||
File: nvidia/gp104/gr/gpccs_data.bin
|
File: nvidia/gp104/gr/gpccs_data.bin
|
||||||
File: nvidia/gp104/gr/gpccs_inst.bin
|
File: nvidia/gp104/gr/gpccs_inst.bin
|
||||||
File: nvidia/gp104/gr/gpccs_sig.bin
|
File: nvidia/gp104/gr/gpccs_sig.bin
|
||||||
|
@ -5250,11 +5250,11 @@ Link: nvidia/gp106/acr/bl.bin -> ../../gp102/acr/bl.bin
|
||||||
Link: nvidia/gp106/acr/ucode_load.bin -> ../../gp102/acr/ucode_load.bin
|
Link: nvidia/gp106/acr/ucode_load.bin -> ../../gp102/acr/ucode_load.bin
|
||||||
Link: nvidia/gp106/acr/ucode_unload.bin -> ../../gp102/acr/ucode_unload.bin
|
Link: nvidia/gp106/acr/ucode_unload.bin -> ../../gp102/acr/ucode_unload.bin
|
||||||
Link: nvidia/gp106/acr/unload_bl.bin -> ../../gp102/acr/unload_bl.bin
|
Link: nvidia/gp106/acr/unload_bl.bin -> ../../gp102/acr/unload_bl.bin
|
||||||
Link: nvidia/gp106/gr/fecs_bl.bin -> ../../gp102/gr/fecs_bl.bin
|
Link: nvidia/gp106/gr/fecs_bl.bin -> ../../gm200/gr/fecs_bl.bin
|
||||||
File: nvidia/gp106/gr/fecs_data.bin
|
File: nvidia/gp106/gr/fecs_data.bin
|
||||||
Link: nvidia/gp106/gr/fecs_inst.bin -> ../../gp102/gr/fecs_inst.bin
|
Link: nvidia/gp106/gr/fecs_inst.bin -> ../../gp102/gr/fecs_inst.bin
|
||||||
File: nvidia/gp106/gr/fecs_sig.bin
|
File: nvidia/gp106/gr/fecs_sig.bin
|
||||||
Link: nvidia/gp106/gr/gpccs_bl.bin -> ../../gp102/gr/gpccs_bl.bin
|
Link: nvidia/gp106/gr/gpccs_bl.bin -> ../../gm200/gr/gpccs_bl.bin
|
||||||
File: nvidia/gp106/gr/gpccs_data.bin
|
File: nvidia/gp106/gr/gpccs_data.bin
|
||||||
Link: nvidia/gp106/gr/gpccs_inst.bin -> ../../gp102/gr/gpccs_inst.bin
|
Link: nvidia/gp106/gr/gpccs_inst.bin -> ../../gp102/gr/gpccs_inst.bin
|
||||||
File: nvidia/gp106/gr/gpccs_sig.bin
|
File: nvidia/gp106/gr/gpccs_sig.bin
|
||||||
|
@ -5998,10 +5998,10 @@ File: netronome/flower/nic_AMDA0096.nffw
|
||||||
File: netronome/flower/nic_AMDA0097.nffw
|
File: netronome/flower/nic_AMDA0097.nffw
|
||||||
File: netronome/flower/nic_AMDA0058.nffw
|
File: netronome/flower/nic_AMDA0058.nffw
|
||||||
Link: netronome/flower/nic_AMDA0081.nffw -> nic_AMDA0097.nffw
|
Link: netronome/flower/nic_AMDA0081.nffw -> nic_AMDA0097.nffw
|
||||||
Link: netronome/flower/nic_AMDA0081-0001_1x40.nffw -> nic_AMDA0081.nffw
|
Link: netronome/flower/nic_AMDA0081-0001_1x40.nffw -> nic_AMDA0097.nffw
|
||||||
Link: netronome/flower/nic_AMDA0097-0001_2x40.nffw -> nic_AMDA0097.nffw
|
Link: netronome/flower/nic_AMDA0097-0001_2x40.nffw -> nic_AMDA0097.nffw
|
||||||
Link: netronome/flower/nic_AMDA0099-0001_2x10.nffw -> nic_AMDA0099.nffw
|
Link: netronome/flower/nic_AMDA0099-0001_2x10.nffw -> nic_AMDA0099.nffw
|
||||||
Link: netronome/flower/nic_AMDA0081-0001_4x10.nffw -> nic_AMDA0081.nffw
|
Link: netronome/flower/nic_AMDA0081-0001_4x10.nffw -> nic_AMDA0097.nffw
|
||||||
Link: netronome/flower/nic_AMDA0097-0001_4x10_1x40.nffw -> nic_AMDA0097.nffw
|
Link: netronome/flower/nic_AMDA0097-0001_4x10_1x40.nffw -> nic_AMDA0097.nffw
|
||||||
Link: netronome/flower/nic_AMDA0099-0001_2x25.nffw -> nic_AMDA0099.nffw
|
Link: netronome/flower/nic_AMDA0099-0001_2x25.nffw -> nic_AMDA0099.nffw
|
||||||
Link: netronome/flower/nic_AMDA0096-0001_2x10.nffw -> nic_AMDA0096.nffw
|
Link: netronome/flower/nic_AMDA0096-0001_2x10.nffw -> nic_AMDA0096.nffw
|
||||||
|
|
|
@ -115,12 +115,20 @@ def main():
|
||||||
sys.stderr.write("E: %s listed in WHENCE as Link, is in tree\n" % name)
|
sys.stderr.write("E: %s listed in WHENCE as Link, is in tree\n" % name)
|
||||||
ret = 1
|
ret = 1
|
||||||
|
|
||||||
|
invalid_targets = set(link[0] for link in links_list)
|
||||||
|
for link, target in sorted(links_list):
|
||||||
|
if target in invalid_targets:
|
||||||
|
sys.stderr.write(
|
||||||
|
"E: target %s of link %s is also a link\n" % (target, link)
|
||||||
|
)
|
||||||
|
ret = 1
|
||||||
|
|
||||||
for name in sorted(list(known_files - git_files)):
|
for name in sorted(list(known_files - git_files)):
|
||||||
sys.stderr.write("E: %s listed in WHENCE does not exist\n" % name)
|
sys.stderr.write("E: %s listed in WHENCE does not exist\n" % name)
|
||||||
ret = 1
|
ret = 1
|
||||||
|
|
||||||
# A link can point to another link, or to a file...
|
# A link can point to a file...
|
||||||
valid_targets = set(link[0] for link in links_list) | git_files
|
valid_targets = set(git_files)
|
||||||
|
|
||||||
# ... or to a directory
|
# ... or to a directory
|
||||||
for target in set(valid_targets):
|
for target in set(valid_targets):
|
||||||
|
|
Loading…
Reference in New Issue