[mythtv-users] Backup and restore utility - sort bug?

Michael T. Dean mtdean at thirdcontact.com
Sun Oct 19 17:44:42 UTC 2008


On 10/19/2008 01:38 PM, Mike Holden wrote:
> Been trying to use the tool wiki-ed at
> http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore and while
> the utility for restore works in principle, it doesn't seem to pick the
> most recent file for restore.
>
> It looks to me like a bug in the sort, where $0 should be $a, ie replace
>     my @sorted_files = sort { lc($b) cmp lc($0) } @files;
> with
>     my @sorted_files = sort { lc($b) cmp lc($a) } @files;
>
> I can't find any reference to what $0 is supposed to do in Perl sort, but
> maybe I've missed something?
>   
http://svn.mythtv.org/trac/ticket/5649

So, until the patch is applied, either specify a filename (with 
--filename, 
http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore#Full_restore_of_a_specific_backup_file 
) or apply the patch yourself (which, really, you've done with the above 
change you made).

Thanks, though, for asking here, first, rather than just opening a new 
ticket (which would have been a duplicate).  Feedback on the scripts is 
appreciated.

Mike


More information about the mythtv-users mailing list