1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

add support for testing package resolution by distro and distro version

Summary:
Add support for overriding os, distro and distro version to command line when inspecting system packages so one can requested see ubuntu 18.04 package from other OS.  Makes testing easier

Used shlex to shell unquote the value to be tested in the getdeps expression evaluator. getdeps expression parser didn't tolerate 18.04 as . is special char to getdeps expressions, needed to be "18.04"

Reviewed By: quark-zju

Differential Revision: D33741323

fbshipit-source-id: d83397c7fb5180a4d985d0d8ae7b3ff33b72f828
This commit is contained in:
Alex Hornby
2022-01-25 01:33:41 -08:00
committed by Facebook GitHub Bot
parent c498ba88eb
commit 88622ecbf1
2 changed files with 46 additions and 11 deletions

View File

@@ -139,7 +139,9 @@ class Parser(object):
if op == "=":
if name not in self.valid_variables:
raise Exception("unknown variable %r in expression" % (name,))
return EqualExpr(name, self.lex.get_token())
# remove shell quote from value so can test things with period in them, e.g "18.04"
unquoted = " ".join(shlex.split(self.lex.get_token()))
return EqualExpr(name, unquoted)
raise Exception(
"Unexpected token sequence '%s %s' in %s" % (name, op, self.text)