Opened 13 years ago

Closed 13 years ago

#9986 closed Bug Report - General (fixed)

OSX Fetch Channels from listing source broken

Reported by: Jeff Gibbons <mythtv@…> Owned by: Nigel
Priority: minor Milestone: 0.25
Component: MythTV - Mythtv-setup Version: 0.24-fixes
Severity: low Keywords: OSX fetch
Cc: Ticket locked: no

Description

For OSX, MythTv?-Setup.app:InputConnections:Fetch channels from listings source is broken. Fetch tries to run mythfilldabase under sh but no such program is found. There is no mythfilldatabase in the MythTv?-Setup.app bundle (as there is in MythBackend?.app) and the binary in MythFillDatabase?.app is named MythFillDatabase? (note different case). And anyway it would not be found on any executable path when run from the MythTv?-Setup.app. The current code is shown below.

Fetch runs from libs/libmythtv/sourceutil.cpp

bool SourceUtil::UpdateChannelsFromListings(uint sourceid, QString cardtype) 
{ 
    QString cmd = "mythfilldatabase --only-update-channels "; 
    if (sourceid) 
        cmd += QString("--sourceid %1 ").arg(sourceid); 
    if (!cardtype.isEmpty()) 
        cmd += QString("--cardtype %1 ").arg(cardtype); 

    myth_system(cmd); 

    return true; 
}

Change History (7)

comment:1 Changed 13 years ago by Nigel

Owner: changed from danielk to Nigel
Status: newassigned

comment:2 Changed 13 years ago by Raymond Wagner

Status: assignedinfoneeded

Could you provide some actual logs? I'm curious as to whether it is failing to find mythfilldatabase due to improper casing, or if it's deeper and failing to find 'sh' itself.

comment:3 Changed 13 years ago by Nigel

Not a huge problem, but copying one more binary is easy enough. Something like this (untested) should package up mythfilldatabase:

% git diff          
diff --git a/OSX/build/osx-packager.pl b/OSX/build/osx-packager.pl
index f606d6b..be82ab1 100755
--- a/OSX/build/osx-packager.pl
+++ b/OSX/build/osx-packager.pl
@@ -1227,6 +1227,21 @@ if ( $backend && grep(m/MythBackend/, @targets) )
     &AddFakeBinDir($BE);
 }
 
+if ( $backend && grep(m/MythTV-Setup/, @targets) )
+{
+    my $SET = "$SCRIPTDIR/MythTV-Setup.app";
+    my $SRC  = "$PREFIX/bin/mythfilldatabase";
+    if ( -e $SRC )
+    {
+        &Verbose("Installing $SRC into $SET");
+        &Syscall([ '/bin/cp', $SRC, "$SET/Contents/MacOS" ]) or die;
+
+        &Verbose("Updating lib paths of $SET/Contents/MacOS/$binary");
+        &Syscall([ @bundler, "$SET/Contents/MacOS/$binary" ]) or die;
+    }
+    &AddFakeBinDir($SET);
+}
+
 if ( $jobtools )
 {
     # JobQueue also gets some binaries it might call:
macaque% 

comment:4 in reply to:  2 Changed 13 years ago by Jeff Gibbons <mythtv@…>

Replying to wagnerrp:

Could you provide some actual logs? I'm curious as to whether it is failing to find mythfilldatabase due to improper casing, or if it's deeper and failing to find 'sh' itself.

I first found the problem in the following Console message:

8/11/11 3:34:11 PM   [0x0-0x240240].org.osx-bundler.MythTV-Setup[42375]   sh: mythfilldatabase: command not found

I believe the problem is mythfilldatabase, not sh. There is no reason for mythfilldatabase to be found.

comment:5 in reply to:  3 ; Changed 13 years ago by Jeff Gibbons <mythtv@…>

Replying to nigel:

Not a huge problem, but copying one more binary is easy enough. Something like this (untested) should package up mythfilldatabase:

% git diff          
diff --git a/OSX/build/osx-packager.pl b/OSX/build/osx-packager.pl
index f606d6b..be82ab1 100755
--- a/OSX/build/osx-packager.pl
+++ b/OSX/build/osx-packager.pl
@@ -1227,6 +1227,21 @@ if ( $backend && grep(m/MythBackend/, @targets) )
     &AddFakeBinDir($BE);
 }
 
+if ( $backend && grep(m/MythTV-Setup/, @targets) )
+{
+    my $SET = "$SCRIPTDIR/MythTV-Setup.app";
+    my $SRC  = "$PREFIX/bin/mythfilldatabase";
+    if ( -e $SRC )
+    {
+        &Verbose("Installing $SRC into $SET");
+        &Syscall([ '/bin/cp', $SRC, "$SET/Contents/MacOS" ]) or die;
+
+        &Verbose("Updating lib paths of $SET/Contents/MacOS/$binary");
+        &Syscall([ @bundler, "$SET/Contents/MacOS/$binary" ]) or die;
+    }
+    &AddFakeBinDir($SET);
+}
+
 if ( $jobtools )
 {
     # JobQueue also gets some binaries it might call:
macaque% 

Looks OK except for in the 2nd Verbose and Syscall, $binary should be replaced by mythfilldatabase as $binary in the code you copied from was set by a foreach statement. So the lines should be

+        &Verbose("Updating lib paths of $SET/Contents/MacOS/mythfilldatabase");
+        &Syscall([ @bundler, "$SET/Contents/MacOS/mythfilldatabase" ]) or die;

comment:6 in reply to:  5 Changed 13 years ago by Jeff Gibbons <mythtv@…>

Replying to Jeff Gibbons <mythtv@…>:

Looks OK except for in the 2nd Verbose and Syscall, $binary should be replaced by mythfilldatabase as $binary in the code you copied from was set by a foreach statement. So the lines should be

+        &Verbose("Updating lib paths of $SET/Contents/MacOS/mythfilldatabase");
+        &Syscall([ @bundler, "$SET/Contents/MacOS/mythfilldatabase" ]) or die;

I tried to simulate this. I copied mythfilldatabase to MythTV-Setup.app/Contents/MacOS and I created the symbolic link from Resources/bin to ../MacOS.

Sadly I got the same error as before. I did not do the libs part but if that were the problem I would expect a different error.

comment:7 Changed 13 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: infoneededclosed

Invoke mythfilldatabase from correct path in "Fetch channels from listing src"

Only a problem if MythTV binaries/libs aren't installed, like if using Mac OS X standalone .app bundles. Closes #9986. Note also that the listings grabber will also need to be in the users' path (mythtv-setup doesn't check that).

Branch: master Changeset: ce7731aa040bf8c4d87c3059ea0a7a49e5fa1437

See also: d7f009e14ab91b3e972ad5666995d7e57427d7b6

Last edited 13 years ago by Nigel (previous) (diff)
Note: See TracTickets for help on using tickets.