Skip to content

Commit

Permalink
vsdownload: Filter packages based on their arch information
Browse files Browse the repository at this point in the history
  • Loading branch information
huangqinjin committed Oct 8, 2024
1 parent 716ad4f commit 0e42e7c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions vsdownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,19 @@ def matchPackageHostArch(p, host):
if "host" + a in id:
return a == host

matches = 0
mismatches = 0
for k in ["chip", "machineArch", "productArch"]:
a = p.get(k, "neutral").lower()
if a == "neutral":
continue
if a == host:
matches += 1
else:
mismatches += 1
if matches == 0 and mismatches > 0:
return False

return True

def printDepends(packages, target, constraints, indent, args):
Expand Down

0 comments on commit 0e42e7c

Please sign in to comment.