[mythtv] [PATCH] Stop make install from overwriting mysql.txt

Gavin Hurlbut gjhurlbu+mythtv-dev at beirdo.ca
Mon Oct 4 18:39:43 UTC 2004


I'm sure I'm not the only one who hates this.  Every time I make install, it
blows away my config in mysql.txt.  There's no good reason I can think of to
overwrite config files.  Anyways, I fought with qmake for a bit, and here is
a patch that will prevent it from happening.  Not the most elegant way to fix
it, but is effective.

This is a patch against current CVS

--------------------  patch follows (apply in the programs/mythfrontend dir)

Index: mythfrontend.pro
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/mythfrontend.pro,v
retrieving revision 1.52
diff -U5 -r1.52 mythfrontend.pro
--- mythfrontend.pro	20 Aug 2004 23:39:27 -0000	1.52
+++ mythfrontend.pro	4 Oct 2004 18:15:01 -0000
@@ -12,19 +12,22 @@
 TARGET = mythfrontend
 target.path = $${PREFIX}/bin
 INSTALLS = target
 
 setting.path = $${PREFIX}/share/mythtv/
-setting.files += theme.txt mysql.txt
+setting.files += theme.txt
 setting.files += info_menu.xml mainmenu.xml media_settings.xml tv_schedule.xml
 setting.files += util_menu.xml info_settings.xml main_settings.xml
 setting.files += recpriorities_settings.xml tv_search.xml tv_lists.xml
 setting.files += library.xml manage_recordings.xml optical_menu.xml tvmenu.xml
 setting.files += tv_settings.xml
 setting.extra = -ldconfig
 
-INSTALLS += setting
+mysqlsetting.path = $${PREFIX}/share/mythtv
+setting.extra = -if [ ! -f $$mysqlsetting.path/mysql.txt ] ; then $(INSTALL_FILE) mysql.txt $$mysqlsetting.path/ ; fi
+
+INSTALLS += setting mysqlsetting
 
 LIBS += -lmythtv-$$LIBVERSION -lmythavformat-$$LIBVERSION
 LIBS += -lmythavcodec-$$LIBVERSION -lmyth-$$LIBVERSION $$EXTRA_LIBS
 
 # Input



More information about the mythtv-dev mailing list