Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts/sphinx-pre-install: allow checking for multiple missing files

The current implementation take a simple file as first argument, this
change allows to take a list as a first argument.

Some file could have a different path according distribution version

Signed-off-by: Jeremy MAURO <j.mauro@criteo.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Jeremy MAURO and committed by
Jonathan Corbet
ff8fdb36 bdd68860

+11 -9
+11 -9
scripts/sphinx-pre-install
··· 124 124 125 125 sub check_missing_file($$$) 126 126 { 127 - my $file = shift; 127 + my $files = shift; 128 128 my $package = shift; 129 129 my $is_optional = shift; 130 130 131 - return if(-e $file); 131 + for (@$files) { 132 + return if(-e $_); 133 + } 132 134 133 135 add_package($package, $is_optional); 134 136 } ··· 345 343 ); 346 344 347 345 if ($pdf) { 348 - check_missing_file("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 346 + check_missing_file(["/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"], 349 347 "fonts-dejavu", 2); 350 348 351 - check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", 349 + check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"], 352 350 "fonts-noto-cjk", 2); 353 351 } 354 352 ··· 415 413 } 416 414 417 415 if ($pdf) { 418 - check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", 416 + check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"], 419 417 "google-noto-sans-cjk-ttc-fonts", 2); 420 418 } 421 419 ··· 500 498 $map{"latexmk"} = "texlive-collection-basic"; 501 499 502 500 if ($pdf) { 503 - check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", 501 + check_missing_file(["/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc"], 504 502 "google-noto-sans-cjk-ttc-fonts", 2); 505 503 } 506 504 ··· 530 528 check_pacman_missing(\@archlinux_tex_pkgs, 2) if ($pdf); 531 529 532 530 if ($pdf) { 533 - check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", 531 + check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"], 534 532 "noto-fonts-cjk", 2); 535 533 } 536 534 ··· 551 549 "rsvg-convert" => "gnome-base/librsvg", 552 550 ); 553 551 554 - check_missing_file("/usr/share/fonts/dejavu/DejaVuSans.ttf", 552 + check_missing_file(["/usr/share/fonts/dejavu/DejaVuSans.ttf"], 555 553 "media-fonts/dejavu", 2) if ($pdf); 556 554 557 555 if ($pdf) { 558 - check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf", 556 + check_missing_file(["/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf"], 559 557 "media-fonts/noto-cjk", 2); 560 558 } 561 559