Adjust verify behavior

Verifying is heavily network-bound if we need to update EVERY package, so let's just check if local is consist instead of making sure everything is up-to-date.
This commit is contained in:
taoky
2024-08-05 22:04:33 +08:00
parent 804fba55cb
commit 2aa8c9ae97
2 changed files with 55 additions and 10 deletions

View File

@ -71,7 +71,14 @@ If you already have a pypi repo, use `genlocal` first to generate a local db:
./shadowmire.py genlocal
```
Verify command could be used if you believe that something is wrong. It would remove packages NOT in local db, update all local packages, and delete unreferenced files in `packages` folder:
Verify command could be used if you believe that something is wrong (inconsistent). It would:
1. remove packages NOT in local db
2. remove packages NOT in remote (with consideration of `--exclude`)
3. make sure all local indexes are valid, and (if --sync-packages) have valid local package files
(`--prerelease-exclude` would be ignored)
4. delete unreferenced files in `packages` folder
```shell
./shadowmire.py verify --sync-packages