| 1 |
Descriptionscip-debian debian libconfig-model-perl 2.165-1 libconfig-model-perl/patches/fix-debci#Description.: Fix debci by altering available_models |
| 2 |
Quoting Niko, Config::Model::Lister::available_models() argument needs |
| 3 |
to be different when running under autopkgtest to force looking in @INC |
| 4 |
instead of lib/. Basing it on the AUTOPKGTEST_TMP environment variable is probably |
| 5 |
the best choice. |
| 6 |
. |
| 7 |
So @INC is used when AUTOPKGTEST_TMP is true-ish. Its value is not verified. |
| 8 |
Bug-Debianscip-debian debian libconfig-model-perl 2.165-1 libconfig-model-perl/patches/fix-debci#Bug-Debian.: https://bugs.debian.org/785528scip-debian-bts debian-bts . . 785528: |
| 9 |
Forwardedscip-debian debian libconfig-model-perl 2.165-1 libconfig-model-perl/patches/fix-debci#Forwarded.: NA |
| 10 |
Authorscip-debian debian libconfig-model-perl 2.165-1 libconfig-model-perl/patches/fix-debci#Author.: dod |
| 11 |
--- a/lib/Config/Model/Lister.pmscip-debian debian libconfig-model-perl 2.165-1 libconfig-model-perl/upstream/`lib/Config/Model/Lister.pm`: |
| 12 |
+++ b/lib/Config/Model/Lister.pmscip-debian debian libconfig-model-perl 2.165-1 libconfig-model-perl/upstream/`lib/Config/Model/Lister.pm`: |
| 13 |
@@ -16,7 +16,7 @@ |
| 14 |
sub available_models ($test = 0) { |
| 15 |
my ( %categories, %appli_info, %applications ); |
| 16 |
my %done_cat; |
| 17 |
|
| 18 |
+ my @dir_to_scan = ( $ENV{AUTOPKGTEST_TMP} or not $test ) ? @INC : qw/lib/; |
| 19 |
|
| 20 |
foreach my $dir ( map { glob("$_/Config/Model/*.d") } @dir_to_scan ) { |
| 21 |
my ($cat) = ( $dir =~ m!.*/([\w\-]+)\.d! ); |