Upon entering the chroot env, after receiving the error once, I cleaned the remnant initrd file.
The I modified the postinst script inserting a set -x, set GL to be provided by MESA and reconfigured the package. No errors.
Then I configured nvidia for GL and reconfigured again the package. Errors are shown in the log.
Finally I edited the postinst again, insterted the above check and reconfigured the package. No errors.
Attaching the transcript of the debug session.
Upon entering the chroot env, after receiving the error once, I cleaned the remnant initrd file.
The I modified the postinst script inserting a set -x, set GL to be provided by MESA and reconfigured the package. No errors.
Then I configured nvidia for GL and reconfigured again the package. Errors are shown in the log.
Finally I edited the postinst again, insterted the above check and reconfigured the package. No errors.