common/scripts/xbps-cycles.py: add -Q and -K options for dependencies

This commit is contained in:
Gonzalo Tornaría 2023-12-26 10:38:49 -03:00 committed by Đoàn Trần Công Danh
parent f7a6688401
commit d8c079c8df
1 changed files with 7 additions and 0 deletions

View File

@ -101,6 +101,10 @@ if __name__ == '__main__':
help='Directory used to cache build dependencies (must exist)')
parser.add_argument('-d', '--directory',
default=None, help='Path to void-packages repo')
parser.add_argument('-Q', dest='check_pkgs', action='store_const',
const='yes', help='Use build dependencies for check -Q')
parser.add_argument('-K', dest='check_pkgs', action='store_const',
const='full', help='Use build dependencies for check -K')
args = parser.parse_args()
@ -108,6 +112,9 @@ if __name__ == '__main__':
try: args.directory = os.environ['XBPS_DISTDIR']
except KeyError: args.directory = '.'
if args.check_pkgs:
os.environ['XBPS_CHECK_PKGS'] = args.check_pkgs
pool = multiprocessing.Pool(processes = args.jobs)
pattern = os.path.join(args.directory, 'srcpkgs', '*')