Re: [PATCH 1/2] perl: Add option to prevent COMPLEMENTARY_GLOB from ignoring perl-modules

Lyu, William
2024-01-19T18:11:25Z

[-- Attachment #1: Type: text/plain, Size: 5876 bytes --]

Following your suggestions and iteratively adding packages based on error message, I am finally able to come up with quite a long list of perl-module-* packages that fix the dependencies of openssl-ptest.

However, I am worried about if the list I came up with is truly comprehensive in the sense that this list covers all dependencies for other architectures and other OSes. I see that a lot of openssl-ptest subtests are marked as "skipped". I am not sure if these dependencies will be sufficient if these subtests are not skipped. Also, I am not sure if the packages I added are arch or OS specific.

The following is the list of perl-module-* I found.

This first portion is identified by following your suggestion of using grep "^\s*use".
perl-module-extutils-makemaker \
perl-module-file-find \
perl-module-if \
perl-module-pod-checker \
perl-module-tap-harness \
perl-module-tap-parser-aggregator \
perl-module-tap-parser-source \
perl-module-tap-parser-sourcehandler-perl \
perl-module-text-parsewords \
perl-module-carp \
perl-module-cwd \
perl-module-data-dumper \
perl-module-digest-sha \
perl-module-encode \
perl-module-errno \
perl-module-exporter \
perl-module-fcntl \
perl-module-feature \
perl-module-file-basename \
perl-module-file-compare \
perl-module-file-copy \
perl-module-file-glob \
perl-module-filehandle \
perl-module-file-path \
perl-module-file-spec \
perl-module-file-spec-functions \
perl-module-file-temp \
perl-module-findbin \
perl-module-getopt-long \
perl-module-getopt-std \
perl-module-io-select \
perl-module-io-socket \
perl-module-ipc-cmd \
perl-module-ipc-open2 \
perl-module-lib \
perl-module-list-util \
perl-module-math-bigint \
perl-module-mime-base64 \
perl-module-pod-html \
perl-module-posix \
perl-module-scalar-util \
perl-module-storable \
perl-module-test-harness \
perl-module-test-more \
perl-module-time-local \
perl-module-utf8 \
perl-module-vars \
\

The following are added iteratively based on error reports from actually running the test.
perl-module-pod-text \
perl-module-encode-encoding \
perl-module-metadata \
perl-module-locale \
\

The following are added due to internal dependencies between different TAP modules. I added a few iteratively, and there are still some errors. So, I just grepped and added all tap modules.
perl-module-tap-base \
perl-module-tap-formatter-base \
perl-module-tap-formatter-color \
perl-module-tap-formatter-console \
perl-module-tap-formatter-console-parallelsession \
perl-module-tap-formatter-console-session \
perl-module-tap-formatter-file \
perl-module-tap-formatter-file-session \
perl-module-tap-formatter-session \
perl-module-tap-harness \
perl-module-tap-harness-env \
perl-module-tap-object \
perl-module-tap-parser \
perl-module-tap-parser-aggregator \
perl-module-tap-parser-grammar \
perl-module-tap-parser-iterator \
perl-module-tap-parser-iterator-array \
perl-module-tap-parser-iteratorfactory \
perl-module-tap-parser-iterator-process \
perl-module-tap-parser-iterator-stream \
perl-module-tap-parser-multiplexer \
perl-module-tap-parser-result \
perl-module-tap-parser-result-bailout \
perl-module-tap-parser-result-comment \
perl-module-tap-parser-resultfactory \
perl-module-tap-parser-result-plan \
perl-module-tap-parser-result-pragma \
perl-module-tap-parser-result-test \
perl-module-tap-parser-result-unknown \
perl-module-tap-parser-result-version \
perl-module-tap-parser-result-yaml \
perl-module-tap-parser-scheduler \
perl-module-tap-parser-scheduler-job \
perl-module-tap-parser-scheduler-spinner \
perl-module-tap-parser-source \
perl-module-tap-parser-sourcehandler \
perl-module-tap-parser-sourcehandler-executable \
perl-module-tap-parser-sourcehandler-file \
perl-module-tap-parser-sourcehandler-handle \
perl-module-tap-parser-sourcehandler-perl \
perl-module-tap-parser-sourcehandler-rawtap \
perl-module-tap-parser-yamlish-reader \
perl-module-tap-parser-yamlish-writer \
\

Only perl-module-extutils-mm-unix was requested. However, I noticed that the suffix has "unix", so I assumed that this module is OS dependant. In case openssl-ptest needs to be built for other OSes, I added all perl-module-extutils-mm*.
perl-module-extutils-mm \
perl-module-extutils-mm-aix \
perl-module-extutils-mm-any \
perl-module-extutils-mm-beos \
perl-module-extutils-mm-cygwin \
perl-module-extutils-mm-darwin \
perl-module-extutils-mm-dos \
perl-module-extutils-mm-macos \
perl-module-extutils-mm-nw5 \
perl-module-extutils-mm-os2 \
perl-module-extutils-mm-os390 \
perl-module-extutils-mm-qnx \
perl-module-extutils-mm-unix \
perl-module-extutils-mm-uwin \
perl-module-extutils-mm-vms \
perl-module-extutils-mm-vos \
perl-module-extutils-mm-win32 \
perl-module-extutils-mm-win95 \

===== APPENDIX: Commands I Used to Identify the Potential List of Packages Needed =====
These are details and can be ignored.

Under "{build directory}/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/rootfs/usr/lib/openssl/ptest", I executed the following command to convert all imported modules using "use" statements into "perl-module-*":
$ grep -r -n -I "^\s*use " | sed -E 's/.*:[0-9]+://' | sed -E 's/;/\n/g' | sed -E 's/^ *use *//' | sed -E 's/ /\n/g' | awk '!/^\s*$/' | tr '[:upper:]' '[:lower:]' | sed -E 's/::/-/g' | sed -E 's/^/perl-module-/' | sort | uniq

I saved the above list into a file "PARSED_USE". Then, I listed all directories under "tmp/work/core2-64-poky-linux/perl/5.38.2/packages-split" and saved this list as a list of valid perl-module-* into a file "VALID_MODULE".

I used the following command to determine which line in file "PARSED_USE" is a valid perl-module-* based on "VALID_MODULE" using the following command:
$ cat PARSED_USE VALID_MODULE | sort | uniq -c | sort -nk1,1 | grep -E '^ *2'

[-- Attachment #2: Type: text/html, Size: 8931 bytes --]