pykms: replace logging patch
The logging "sed-patch" that was introduced for version 20190611 worked poorly: it was too intrusive (breaking the --logfile option), and it didn't prevent using in-store file for logging by default. The new logging patch (an actual "diff-patch") is less intrusive: it just changes the default log file's location to be the current directory instead of the executable's directory.
This commit is contained in:
@@ -44,16 +44,14 @@ in buildPythonApplication rec {
|
||||
|
||||
propagatedBuildInputs = [ systemd pytz tzlocal ];
|
||||
|
||||
# Fix https://github.com/SystemRage/py-kms/issues/64 :
|
||||
patches = [ ./log-to-current-directory-by-default.patch ];
|
||||
|
||||
postPatch = ''
|
||||
siteDir=$out/${python3.sitePackages}
|
||||
|
||||
substituteInPlace pykms_DB2Dict.py \
|
||||
--replace "'KmsDataBase.xml'" "'$siteDir/KmsDataBase.xml'"
|
||||
|
||||
# we are logging to journal
|
||||
sed -i pykms_Misc.py \
|
||||
-e '6ifrom systemd import journal' \
|
||||
-e 's/log_obj.addHandler(log_handler)/log_obj.addHandler(journal.JournalHandler())/'
|
||||
'';
|
||||
|
||||
format = "other";
|
||||
|
||||
Reference in New Issue
Block a user