[mythtv-users] Broken Perl bindings

Michael T. Dean mtdean at thirdcontact.com
Fri Apr 25 14:16:52 UTC 2008


On 04/25/2008 07:30 AM, Tom Dexter wrote:

>  On Thu, Apr 24, 2008 at 6:03 PM, Mike Perkins wrote:
>
> > Michael T. Dean wrote:
> >
> >> On 04/24/2008 03:04 PM, Tom Dexter wrote:
> >>
> >>> Just to be clear that it's not a perl issue...if I set my HOME
> >>> to /, I can reproduce what I'm assuming is the error you're
> >>> getting:
> >>>
> >>> mythback root # export HOME=/
> >>> mythback root # perl /usr/share/mythtv/contrib/optimize_mythdb.pl
> >>> Net::UPnP::ControlPoint is not installed!
> >>> Please install Net::UPnP or copy ~/.mythtv/config.xml
> >>> from a working MythTV installation to //.mythtv/config.xml.
> >>> Compilation failed in require at
> >>> /usr/share/mythtv/contrib/optimize_mythdb.pl line 15.
> >>> BEGIN failed--compilation aborted at
> >>> /usr/share/mythtv/contrib/optimize_mythdb.pl line 15.
> >>
> >> And, really, you should install both Net::UPnP::ControlPoint and
> >> Net::UPnP::QueryResponse. (I.e. if from CPAN, use "install
> >> Net::UPnP " followed by "install Net::UPnP::QueryResponse").
> >
> > Yeah. I would have assumed that those would have been picked up by
> > the packager who built the Mythtv packages for Mandriva. I may
> > mention it there tomorrow.
> >
> > Could also explain why I get nothing out from my uPnP tests.
>
>  Apparently Gentoo doesn't pick it up either.  One thing throws me
>  however...how would that help if MythTV can't find that database
>  login information?

In theory, once you've installed the Perl UPnP prereq's, the script 
would automatically find the backend on the network, then connect to the 
backend, then ask it for the database information (hostname, port, 
username, password, etc.).  (Though I can't guarantee that it would 
actually work at this point as I don't think either the bindings or the 
"common" scripts support prompting for a PIN, so the UPnP connection 
would fail.)

>  I also just reallized that that that error is a bit misleading as it
>  says "or copy ~/.mythtv/config.xml from a working MythTV installation
>  to //.mythtv/config.xml", when in fact MythContext doesn't allow
>  HOME to be set to / even if .mythtv/config.xml exists there.

Yeah, MythTV was updated to require users to specify a valid HOME 
directory, but the Perl bindings haven't been updated.  I'm pretty sure 
they would actually allow HOME=/ as long as the config.xml actually 
exists in /.mythtv/ (just tested--they do on mine for both mythrename.pl 
and optimize_mythdb.pl).  In the above test, the file 
/.mythtv/config.xml must not exist or the directory /.mythtv must not be 
readable or executable for the user running the script.

So, the error message is basically telling you how to get the bindings 
to work (though the "fix" wouldn't work with the rest of Myth and, 
really, the right fix is to fix the HOME environment variable).

Mike


More information about the mythtv-users mailing list