# HG changeset patch # User Paul Issott # Date 1549199305 0 # Node ID 1a7427f778aeb92d8ad6056159994b54eecd1c1d # Parent 6867a12b73aa01833b3c02e4cfca09b74c374e63 Tiny edits diff -r 6867a12b73aa -r 1a7427f778ae doc/general-questions.md --- a/doc/general-questions.md Sat Feb 02 13:36:54 2019 +0200 +++ b/doc/general-questions.md Sun Feb 03 13:08:25 2019 +0000 @@ -3,21 +3,21 @@ ## `sed` or patches? Sometimes I come across cases where `sed` is used to change some values in the -source code, or to add / remove / change some parts of the source code. +source code or to add / remove / change some parts of the source code. It may look like a good idea for a one-time job, but you will encounter problems in the future when you upgrade the package. -`sed` works quietly, and it is impossible to understand whether it found what -was needed to be found, whether he replaced what we wanted? Maybe this change -is already in the new sources, and we no longer need `sed` command? +`sed` works quietly and it is impossible to understand whether it found what +was needed to be found, whether it replaced what we wanted? Maybe this change +is already in the new sources and we no longer need `sed` command? If we consider only the updated sources, sometimes it is impossible to understand the essence of the `sed` changes. And then you have to download and analyze the old sources. Feel free to use patches. The `patch` is smart enough to find the necessary -lines in the new sources, and also it will signal to you if your changes have -already been made in the sources, or if the sources has changed so much that +lines in the new sources and also it will signal to you if your changes have +already been made in the sources or if the sources has changed so much that your intervention is required. Go from `sed` to `patch` is easy. You must use the `-o.backup` option (value diff -r 6867a12b73aa -r 1a7427f778ae modules/compressor --- a/modules/compressor Sat Feb 02 13:36:54 2019 +0200 +++ b/modules/compressor Sun Feb 03 13:08:25 2019 +0000 @@ -701,7 +701,7 @@ # 64 bytes is the length of prologue added by awk script (here ~ is $'\n'): # msgid ""~msgstr ""~"Content-Type: text/plain; charset=UTF-8\n"~~ - # If size is 64 bit then file have no content, we'll remove it with + # If size is 64 bit then files have no content, we'll remove it with # all empty uplevel directories. # For example, look at libbytesize package. if [ "$(stat -c%s "$tmpfile.awk")" -eq 64 ]; then