olofk / serv

SERV - The SErial RISC-V CPU
ISC License
1.36k stars 178 forks source link

fusesoc library add does not detect duplicates #85

Open gojimmypi opened 2 years ago

gojimmypi commented 2 years ago

My fusesoc library list seemed somewhat short. Ok, I didn't know how long it should be, I suppose I was expecting to see a list of boards.

Running fusesoc library add as noted in the instructions just added a duplicate fusesoc-cores for me. (see below)

Perhaps it would be good if it stated [name] was already installed?

C:\workspace\myfusesoc>fusesoc library list
Name          : Location                        : Sync type : Sync URI                                 : Auto sync
fusesoc_cores : fusesoc_libraries\fusesoc_cores : git       : https://github.com/fusesoc/fusesoc-cores : y
serv          : fusesoc_libraries\serv          : git       : https://github.com/olofk/serv            : y

C:\workspace\myfusesoc>fusesoc library add fusesoc-cores https://github.com/fusesoc/fusesoc-cores
←[1;37mINFO: Cloning library into fusesoc_libraries\fusesoc-cores←[0m
Cloning into 'fusesoc_libraries\fusesoc-cores'...
remote: Enumerating objects: 678, done.
remote: Counting objects: 100% (101/101), done.
remote: Compressing objects: 100% (26/26), done.
Receiving objects:  89% (604
Receiving objects: 100% (678/678), 141.02 KiB | 2.61 MiB/s, done.
Resolving deltas: 100% (265/265), done.

C:\workspace\myfusesoc>fusesoc library list
Name          : Location                        : Sync type : Sync URI                                 : Auto sync
fusesoc_cores : fusesoc_libraries\fusesoc_cores : git       : https://github.com/fusesoc/fusesoc-cores : y
serv          : fusesoc_libraries\serv          : git       : https://github.com/olofk/serv            : y
fusesoc-cores : fusesoc_libraries\fusesoc-cores : git       : https://github.com/fusesoc/fusesoc-cores : y
olofk commented 2 years ago

Definitely. It should not allow two libraries with the saem sync URI. There are other places where the library management is a bit rough around the edges. As you have probably seen by now, there is for example no way to unregister a library other than edit fusesoc.conf in the workspace