[mythtv-users] mythlink.pl [resolved]

Nick Morrott knowledgejunkie at gmail.com
Mon Jun 11 00:31:18 UTC 2018


On 10 June 2018 at 18:51, Klaus Becker <colonius at free.fr> wrote:
>
> I found the error:
>
> In ~/.mythtv/config.xml, I had 2 passwords, one for the old password, the
> other for the new one I created manually.
>
> The old one was commented with "#" as I am used to by bash scripts.
>
> This was not a problem for mythtv frontend and setup, but it seems to be for
> perl script.
>
> Now both scripts mythlink.pl and link.sh work.

Klaus,

Thanks for the follow up post and details of the problem and solution.

Looking at the source, MythTV.pm (used to get the DB connection
details from confix.xml) does not treat the configuration file as
structured XML, but rather as plain text [1], and simply searches the
text for string that look like XML:

[1] https://github.com/MythTV/mythtv/blob/529d3c6c281352a441f1a58dadf86890f422ac0b/mythtv/bindings/perl/MythTV.pm#L280

The Perl bindings should treat the configuration file as XML, and
parse it accordingly. This would allow for XML elements to be
commented out (using the valid <!-- ... --> XML notation, rather than
using a shell comment) and still return the intended values. It would
also permit the configuration file to be validated against a suitable
DTD/Schema.

I'll create a ticket and add it to my TODO list.

Thanks,
Nick


More information about the mythtv-users mailing list