[Debian-l10n-devel] Bug#805378: Bug#805378: Undefined subroutine errors (spider-bts) Was: [Help] Re: dl10n-check: Can't locate Debian/Pkg/DebSrc.pm in @INC

Ed . ej_zg at hotmail.com
Tue Nov 19 17:33:13 GMT 2024


Hurray!

Also, phew! Sorry for the inconvenience.

I will note that this "package" is, as already said, not really a package but a collection of scripts, and doesn't have any tests. It's also a bit odd in having its modules not have the packages match the full pathnames.

However, it's rare that "proper" module tests actually test scripts, so that strategy wouldn't have caught this here. It's probably worth noting at the top of the README that the mode of use isn't via a Debian package, but something that gets git pulled and just used; the usual packaging apparatus gives a false sense of security that things will get checked before affecting production.

Best regards,
Ed

________________________________
From: Laura Arjona Reina <larjona at debian.org>
Sent: 19 November 2024 5:26 PM
To: Ed . <ej_zg at hotmail.com>; 805378 at bugs.debian.org <805378 at bugs.debian.org>; Holger Wansing <hwansing at mailbox.org>; Andreas Tille <tille at debian.org>; Damyan Ivanov <dmn at debian.org>; debian-perl at lists.debian.org <debian-perl at lists.debian.org>; Package Salvaging Team <team+salvage at tracker.debian.org>; Debian l10n development team <debian-l10n-devel at lists.alioth.debian.org>
Subject: Re: [Debian-l10n-devel] Bug#805378: Undefined subroutine errors (spider-bts) Was: [Help] Re: dl10n-check: Can't locate Debian/Pkg/DebSrc.pm in @INC

Hello Ed

El 19/11/24 a las 18:14, Ed . escribió:
> Hi all,
>
> Unfortunately it was me that broke it in commit a985438ed248ff54383a9998bd7fd6293c628584 - https://salsa.debian.org/l10n-team/dl10n/-/merge_requests/10 fixes it.
> [https://salsa.debian.org/assets/twitter_card-570ddb06edf56a2312253c5872489847a0f385112ddbcd71ccfa1570febab5d2.jpg]<https://salsa.debian.org/l10n-team/dl10n/-/merge_requests/10>
> Fix the =encoding commenting/disabling the `package` statement (!10) · Merge requests · Debian i18n and l10n team / dl10n · GitLab<https://salsa.debian.org/l10n-team/dl10n/-/merge_requests/10>
> Debian i18n - l10n development - dl10n robots
> salsa.debian.org

Thanks. I was going commit by commit and found out this was the
responsible and was comparing Html.pm with Utils.pm to try to fix it
when your mail arrived.

> Explanation: I added the =encoding line, and didn't notice that in Html.pm (unlike the other two .pm files) there was substantive code (a package statement) instead of immediately a POD statement (=head1). I have fixed this more long-term by moving that package statement to below all the POD, as in the other two.
>
> You can check this locally by doing perl -Ilib dl10n-html with/without the change: without, you'll see the error Laura reported, with, you'll see it gets further, saying it can't find data.

I've reviewed the MR and just merged it, ran a "git pull" in tye.d.o and
the spiderbts scripts works again, thanks!

Kind regards


> ________________________________
> From: Laura Arjona Reina <larjona at debian.org>
> Sent: 19 November 2024 2:38 PM
> To: Holger Wansing <hwansing at mailbox.org>; Andreas Tille <tille at debian.org>; Damyan Ivanov <dmn at debian.org>; debian-perl at lists.debian.org <debian-perl at lists.debian.org>; Package Salvaging Team <team+salvage at tracker.debian.org>; 805378 at bugs.debian.org <805378 at bugs.debian.org>; Debian l10n development team <debian-l10n-devel at lists.alioth.debian.org>
> Subject: Re: Undefined subroutine errors (spider-bts) Was: [Debian-l10n-devel] [Help] Re: dl10n-check: Can't locate Debian/Pkg/DebSrc.pm in @INC
>
>
> Hello
>
> Thanks for the quick answer.
>
> El 19/11/24 a las 15:16, gregor herrmann escribió:
>
> On Tue, 19 Nov 2024 15:01:27 +0100, Laura Arjona Reina wrote:
>
>
>
> Looking at the log, it says:
>
> Undefined subroutine &Html::html called at
> /srv/i18n.debian.org//dl10n/git/dl10n-html line 140.
>
> We have the file in dl10n/git/lib/Debian/L10n/Html.pm that includes the
> subroutine hmtl() and it was working without issues. I think that now Perl
> in tye.d.o cannot find it but I don't know why, because the cron job (script https://salsa.debian.org/l10n-team/dl10n/-/blob/master/cron/spiderbts?ref_type=heads
> ) gets the configuration from file dl10n.conf as the other scripts.
>
>
>
> Was perl upgraded?
>
> No AFAIK, we have 11.11 in tye, and perl 5.32.1-4+deb11u4
>
>
>
>
> Anyway, looks indeed like
> ./dl10n-html
> doesn't find
> ./lib
>
> <guess>
> I'd try to add
>      use lib '.';
> at the top of dl10n-html, e.g. after "use POSIX qw(strftime);"
> in https://salsa.debian.org/l10n-team/dl10n/-/blob/master/dl10n-html?ref_type=heads#L32
>
>
> I tried this (manually editing the file in tye.debian.org) and got the same error, also tried to write the line more on top, in L5, with no changes.
>
>
> or call dl10n-html from the cronjob as "perl -I<full path to the
> lib/directory>, e.g.
>      PERL -I$DL10NDIR/lib $DL10NDIR/dl10n-html --sdb …
> in https://salsa.debian.org/l10n-team/dl10n/-/blob/master/cron/spiderbts?ref_type=heads#L46
> </guess>
>
>
> I also tried this, editing the spiderbts file in tye.debian.org (used "perl" instead of PERL) obtaining the same error:
>
> Undefined subroutine &Debian::L10n::Html::html called at /srv/i18n.debian.org//dl10n/git/dl10n-html line 140.
>
> (I also changed the message written in the .log file to be sure that the system was running my modified script).
>
> Kind regards,
>
> --
> Laura Arjona Reina
> https://wiki.debian.org/LauraArjona
>
>
> _______________________________________________
> Debian-l10n-devel mailing list
> Debian-l10n-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-l10n-devel

--
Laura Arjona Reina
https://wiki.debian.org/LauraArjona

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-l10n-devel/attachments/20241119/0144d4c4/attachment-0003.htm>


More information about the Debian-l10n-devel mailing list