How to fix source files

I am trying to install dmenu with the files presented here: http://aur.archlinux.org/packages.php?ID=27334

I donโ€™t know how to do this, I read what patch file-to-patch the-patch should do, but the fix provides more than one file. I tried the fix manually, but I failed, it will not compile.

+4
source share
1 answer

Actually, this is patch < the_patch or cat the_patch | patch cat the_patch | patch .

You may need to use the -p<n> parameter, which is used to highlight path segments stored in the patch. For example, if a patch was created from one level above the source tree (for example, you distinguished one tree from another), and you want to apply the patch from the source tree, you need -p .

Another useful option is --dry-run . This will act as an application, but will not modify any files. Itโ€™s good to check if the -p option is set correctly, and see if the patch will be applied cleanly.

What I usually do is change the root of the source tree and then run cat <file> | patch -p1 --dry-run cat <file> | patch -p1 --dry-run . If I get errors about files not found, I will switch to -p0 . As soon as any of these works, I --dry-run and do it for real.

+3
source

Source: https://habr.com/ru/post/1305616/


All Articles