Skip to content

Commit

Permalink
oops: wrongly added
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Oct 24, 2024
1 parent 273b0eb commit db20d39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packaging/MSWindows/BUILD.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,18 +918,18 @@ def get_package(path: str) -> tuple[str, str]:
filename = find_source(path)
if not filename:
debug(f"failed to locate source path for {path!r}")
return "", "", {}
return "", ""
cmd = command_args(["pacman", "-Qo", filename])
r, output = getstatusoutput(cmd)
if r:
debug(f"pacman failed for {filename!r} and returned {r}")
return "", "", {}
return "", ""
# ie: "/usr/bin/msys-2.0.dll is owned by msys2-runtime 3.5.4-2" ->
# ["/usr/bin/msys-2.0.dll", "msys2-runtime 3.5.4-2"]
parts = output.split("\n")[0].split("is owned by ")
if len(parts) != 2:
debug(f"unable to parse pacman output: {output!r}")
return "", "", {}
return "", ""
# ie: "msys2-runtime 3.5.4-2" -> ["msys2-runtime", "3.5.4-2"]
package, version = parts[1].split(" ", 1)
return package, version
Expand Down

0 comments on commit db20d39

Please sign in to comment.