mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
sstate-cache-management: add dry-run argument
(From OE-Core rev: 98be0514b9dcb77b7520f5b6a9edef7a7a7859ac) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
34c1fcbce6
commit
603ec78ec4
|
@ -267,6 +267,10 @@ def parse_arguments():
|
||||||
# help="Remove both the symbol link and the destination file, default: no.",
|
# help="Remove both the symbol link and the destination file, default: no.",
|
||||||
# )
|
# )
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"-n", "--dry-run", action="store_true", help="Don't execute, just go through the motions."
|
||||||
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-y",
|
"-y",
|
||||||
"--yes",
|
"--yes",
|
||||||
|
@ -314,6 +318,9 @@ def main():
|
||||||
if args.debug >= 1:
|
if args.debug >= 1:
|
||||||
print("\n".join([str(p.path) for p in remove]))
|
print("\n".join([str(p.path) for p in remove]))
|
||||||
print(f"{len(remove)} out of {len(paths)} files will be removed!")
|
print(f"{len(remove)} out of {len(paths)} files will be removed!")
|
||||||
|
if args.dry_run:
|
||||||
|
return 0
|
||||||
|
|
||||||
if not args.yes:
|
if not args.yes:
|
||||||
print("Do you want to continue (y/n)?")
|
print("Do you want to continue (y/n)?")
|
||||||
confirm = input() in ("y", "Y")
|
confirm = input() in ("y", "Y")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user