Skip to content

Commit

Permalink
dbremove: remove multiple packages at once
Browse files Browse the repository at this point in the history
makes things faster
  • Loading branch information
lazka committed Dec 17, 2023
1 parent 1e0c4cb commit 422c29e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion msys2-dbremove-api
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ def remove_all(args):
print("Aborting")
return

grouped = {}
for repo, name in to_remove:
grouped.setdefault(repo, []).append(name)

for repo, names in grouped.items():
subprocess.check_call([
shutil.which("bash"), os.path.join(DIR, "msys2-dbremove"), repo, name])
shutil.which("bash"), os.path.join(DIR, "msys2-dbremove"), repo, *names])


def main(argv):
Expand Down

0 comments on commit 422c29e

Please sign in to comment.