Bug 14071

Summary: Preserve changes on XSLT files over upgrades
Product: Koha Reporter: Pablo AB <pablo.bianchi>
Component: PackagingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, mtj
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Pablo AB 2015-04-28 14:45:38 UTC
We have made some customizations to ​/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl
They are silently overwritten on every upgrade, which I avoid with dpkg-divert.
Since there is more than 30 XSLTs on that folder a syspref solution might be hard. An easy solution maybe is, instead of overwriting ask the user what to do (stop the upgrade and wait the answer): 

Configuration file `/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
[...]
*** MARC21slim2OAIDC.xsl (Y/I/N/O/D/Z) [default=N] ? 

Marking them as conffiles as the others (dpkg --status koha-common).

Or even always preserve conffiles. User can always overwrite with dpkg-reconfigure or sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall koha-common

BTW, I don't know why this XSLT is on a LANG folder, since always use «en» (bugs 4403 and 10292).