diff options
author | Andy Fiddaman <illumos@fiddaman.net> | 2022-09-11 19:00:07 +0000 |
---|---|---|
committer | Andy Fiddaman <illumos@fiddaman.net> | 2022-09-20 23:49:37 +0000 |
commit | bf2b3a2a0b16c017abff41fdb4f8c82e2aef82fd (patch) | |
tree | ee3cc616fded431b9ebf9b23de7214d70cff0cd6 | |
parent | 73ef486937f03be7d079065dda822f13cc8f6470 (diff) | |
download | illumos-gate-bf2b3a2a0b16c017abff41fdb4f8c82e2aef82fd.tar.gz |
14961 validate_pkg crashes with bad manifest
Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
-rw-r--r-- | usr/src/tools/scripts/validate_pkg.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/tools/scripts/validate_pkg.py b/usr/src/tools/scripts/validate_pkg.py index 18a2c0cc77..058a8f6542 100644 --- a/usr/src/tools/scripts/validate_pkg.py +++ b/usr/src/tools/scripts/validate_pkg.py @@ -25,7 +25,7 @@ # Use is subject to license terms. # -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. # # Compare the content generated by a build to a set of manifests @@ -34,6 +34,8 @@ import getopt +import gettext +import locale import os import stat import sys @@ -41,7 +43,6 @@ import sys from pkg import actions from pkg import manifest - # # Dictionary used to map action names to output format. Each entry is # indexed by action name, and consists of a list of tuples that map @@ -889,6 +890,10 @@ def main(argv): trees[0].compare(trees[1]) if __name__ == '__main__': + locale.setlocale(locale.LC_ALL, "") + gettext.install("pkg", "/usr/share/locale", + codeset=locale.getpreferredencoding()) + try: main(sys.argv[1:]) except KeyboardInterrupt: |