MDL-60041 dml: MOODLELIB sql file must have Unix line endings

If the file does not have Unix line endings then the regular expression
in oci_native_moodle_database::attempt_oci_package_install() does
not split it correctly.

This leads to an invalid package being created in Oracle.

The .gitattribute file changes for oci_native_moodle_package.sql
force it to have Unix style line endings when the branch is checked
out and the file does not already exist.

The file has been modified so that the Unix style line endings are
applied even if the file already exists, for example when pulling in
this change to an existing branch.
This commit is contained in:
Neill Magill 2017-09-06 15:04:39 +01:00
parent 109aa07648
commit 61fad215f1
2 changed files with 3 additions and 0 deletions

1
.gitattributes vendored
View File

@ -1,4 +1,5 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
theme/bootstrapbase/style/editor.css -diff
theme/bootstrapbase/style/moodle.css -diff

View File

@ -30,6 +30,8 @@
* - bit ops: To provide cross-db bitwise operations to be used by the
* sql_bitXXX() helper functions
* - one space hacks: One space empty string substitute hacks.
*
* Moodle will not parse this file correctly if it uses Windows line endings.
*/
CREATE OR REPLACE PACKAGE MOODLELIB AS