[mythtv-commits] Ticket #12253: Patch - Use random temporary filename for schedules direct downloaded data

MythTV noreply at mythtv.org
Sun Aug 24 18:51:53 UTC 2014


#12253: Patch - Use random temporary filename for schedules direct downloaded data
-------------------------------------------------+-------------------------
     Reporter:  Gary Buhrmaster                  |      Owner:  stuartm
  <gary.buhrmaster@…>                            |     Status:  new
         Type:  Patch - Bug Fix                  |  Milestone:  unknown
     Priority:  minor                            |    Version:  Master Head
    Component:  MythTV - Mythfilldatabase        |   Keywords:
     Severity:  medium                           |
Ticket locked:  0                                |
-------------------------------------------------+-------------------------
 Reports on the mythtv-users list indicated that there were cases where if
 users incorrectly used multiple different usernames while running
 mythfilldatabase (directly, or indirectly), there were conditions where
 the schedules direct download data file was not properly cleaned up,
 resulting in not updating the program schedules.

 It appears that while a unique temporary directory is created for
 schedules direct data is created, it is not used for the mythtv_ddp_data
 file in some cases (non-shared lineups).

 This patch adddresses the use of static filename in this case by using
 both the random temporary directory prefix, and using a random file name
 (there are code paths where a temporary directory might not be created).

 It seems that this code should be refactored, but since all this code
 would (ideally) be eliminated with a move to using a xmltv feed, this
 patch seems like a minimal fix, duplicating existing methods for temporary
 files and directories in the library.

 Ticket #12251 (which should be applied before this patch) provides
 additional logging to report various errors, and is a prereq for this
 patch, although (it is hoped) that this patch makes it far less likely
 that the errors causing the issues would be encountered to be
 reported/logged.

 *NOTE* that there is a missing part to the this patch.  The patch (as
 provided) does not bump the ABI version. Since this ticket may remain
 under review for some time, I did not want to end up accidentally
 colliding with some later patch, or make it harder to apply at some
 future point. This results in a requirement for the developer who commits
 the patches to create a ABI bump patch.

 github ref:
 https://github.com/garybuhrmaster/mythtv/commit/e5812009ed89e19c2565a96db314f822d78ae455
 github git-am ref:
 https://github.com/garybuhrmaster/mythtv/commit/e5812009ed89e19c2565a96db314f822d78ae455.patch

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12253>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list