mirror of
https://github.com/taoky/shadowmire.git
synced 2025-07-08 09:12:43 +00:00
Change --not-remove-not-in-local to --remove-not-in-local
This commit is contained in:
parent
baef090078
commit
5585de30ce
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ venv/
|
||||
packages/
|
||||
json/
|
||||
config.toml
|
||||
remote_excluded.json
|
||||
|
@ -78,7 +78,7 @@ If you already have a pypi repo, use `genlocal` first to generate a local db:
|
||||
|
||||
Verify command could be used if you believe that something is wrong (inconsistent). It would:
|
||||
|
||||
1. remove packages NOT in local db
|
||||
1. remove packages NOT in local db (skip by default, it would only print package names without `--remove-not-in-local`)
|
||||
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
|
||||
|
||||
|
@ -1008,7 +1008,7 @@ def genlocal(ctx: click.Context) -> None:
|
||||
)
|
||||
@click.pass_context
|
||||
@sync_shared_args
|
||||
@click.option("--no-remove-not-in-local", is_flag=True, help="Skip step 1")
|
||||
@click.option("--remove-not-in-local", is_flag=True, help="Do step 1 instead of skipping")
|
||||
@click.option(
|
||||
"--compare-size",
|
||||
is_flag=True,
|
||||
@ -1020,7 +1020,7 @@ def verify(
|
||||
shadowmire_upstream: Optional[str],
|
||||
exclude: tuple[str],
|
||||
prerelease_exclude: tuple[str],
|
||||
no_remove_not_in_local: bool,
|
||||
remove_not_in_local: bool,
|
||||
compare_size: bool,
|
||||
) -> None:
|
||||
basedir: Path = ctx.obj["basedir"]
|
||||
@ -1036,7 +1036,7 @@ def verify(
|
||||
logger.info("%s packages NOT in local db", len(not_in_local))
|
||||
for package_name in not_in_local:
|
||||
logger.debug("package %s not in local db", package_name)
|
||||
if not no_remove_not_in_local:
|
||||
if remove_not_in_local:
|
||||
syncer.do_remove(package_name)
|
||||
|
||||
logger.info("remove packages NOT in remote")
|
||||
|
Loading…
x
Reference in New Issue
Block a user