[pkg-php-pear] Package naming problem (php-codesniffer vs. php-squizlabs-php-codesniffer)

Robin Gustafsson robin at rgson.se
Thu Aug 4 20:12:28 BST 2022


Hi Katharina,

On Thu, Aug 4, 2022 at 12:41 PM Katharina Drexel
<katharina.drexel at bfh.ch> wrote:
>
> When building and installing a package I got the error:
> -----%<---------
> php-laravel-mail-auto-embed depends on php-squizlabs-php-codesniffer (>= 3.5); however:
>   Package php-squizlabs-php-codesniffer is not installed.
> ----->%--------
> The package exists but with the name "php-codesniffer" (https://tracker.debian.org/pkg/php-codesniffer).
>
> For getting out of troubles I workarounded that with a meta-package
> "php-squizlabs-php-codesniffer" that traces the package "php-codesniffer" as
> dependency (https://salsa.debian.org/php-team/pear/php-squizlabs-php-codesniffer/), but there might be more elegant approaches (of course I could adopt the composer.json or control file in the newly built package, but there will be other people and packages that will run into the same problem I guess).
> Did anybody make a similar experience and/or has a sustainable solution for that?

There's indeed already a solution to this: debian/pkg-php-tools-overrides.

    echo 'squizlabs php_codesniffer php-codesniffer' >
debian/pkg-php-tools-overrides

See the man pages for dh_phpcomposer and dh_phppear for details.

Regards,
Robin



More information about the pkg-php-pear mailing list