[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian website build error of not finding Local/VCS.pm: any better solutions?



On Sun, Jun 03, 2018 at 12:32:34AM +0800, Boyuan Yang wrote:
>Dear debian-www list,
>
>I was monitoring current website rebuild log [1] and noticed 
>many errors like this:
>
>==========================================
>make -C 2002 install
>make[5]: Entering directory '/srv/www.debian.org/webwml/
>english/devel/debian-med/News/2002'
>[...]
>wml -q -D CUR_YEAR=2018 -o UNDEFuEN:20020528.en.html@g+w   
>20020528.wml
>ePerl:Error: Perl parsing error (interpreter rc=2)
>
>
>---- Contents of STDERR channel: ---------
>Can't locate Local/VCS.pm in @INC (you may need to install 
>the Local::VCS module) (@INC contains: ../../../../Perl 
>./../../Perl ../../Perl ../Perl Perl /usr/lib/wml/perl/lib /
>usr/lib/wml/perl/lib/x86_64-linux-gnu-thread-multi /etc/perl 
>/usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/
>perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/
>perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/
>5.24 /usr/local/lib/site_perl) at /tmp/wml.n8LYVj/wml.
>22229.tmp1.wml line 1975.
>BEGIN failed--compilation aborted at /tmp/wml.n8LYVj/wml.
>22229.tmp1.wml line 1975.
>------------------------------------------
>** WML:Break: Error in Pass 3 (rc=1).
>Makefile:17: recipe for target '20020528.en.html' failed
>make[5]: *** [20020528.en.html] Error 1
>make[5]: Leaving directory '/srv/www.debian.org/webwml/
>english/devel/debian-med/News/2002'
>./../../../Makefile.common:71: recipe for target '2002-
>install' failed
>make[4]: [2002-install] Error 2 (ignored)
>
>===============================================
>
>It seems that the problem is caused by an incomplete fix 
>committed as ed4a6cc2378cdf3d589ca8c95ca534c4504c48e8 in 
>english/template/debian/translation-check.wml:
>
>https://salsa.debian.org/webmaster-team/webwml/commit/
>ed4a6cc2378cdf3d589ca8c95ca534c4504c48e8#c146cd51b09e4b1b937a505fb5edf01278a497f3_55_62
>
>================================
># Grotty, but it works...
>use lib "Perl";
>use lib "../Perl";
>use lib "../../Perl";
>use lib "../../../Perl";
>use lib "../../../../Perl";
>use Local::VCS ':all';
>================================
>
>..and 4 layers are obviously not enough for some deep 
>directories.
>
>I'm not really familiar in Perl but there might be some 
>better solutions than adding more layers of "use lib".

Unfortunately for the "use lib" stuff, that's evaluated at compile
time before we can easily work things out cleanly - see
http://www.perlmonks.org/?node_id=285370 for more on this. There's
even code further down to work out directory locations. I've just
tried that and it doesn't help, because of the ordering. If we were
running in a normal perl script, we could use FindBin. But that
doesn't work for me in the embedded perl-inside-wml world. :-(

I've just committed an extra couple of directory levels of "../" now,
to get to a depth of 6. The deepest I can see in the webwml tree is 5
at the moment.

I'd love to hear better suggestions if anybody has any!

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
Welcome my son, welcome to the machine.


Reply to: