Hi Ralph, Grégoire, On 24/10/15 11:12, Ralph Corderoy wrote: > Hi Grégoire, > > Keith wrote: >>> OK, I reinstalled groff-base 1.22.3-1 and groff 1.22.3-1 with dpkg >>> -i. >> >> Those are binary packages. >> >>> The patch is made for /contrib/glilypond/glilypond.pl The new groff >>> works fine, but now, I cannot find the /contrib directory: >> >> You need the source package; looks like you didn't install it. > > What is your end goal? Are you trying to submit a patch and want to > check it works? Or patch your distribution's package and re-build?
I'm guessing, but from earlier in the thread, it seems that Grégoire is trying to correct a typo in the glilypond.pl installed with the binary packages, (and presumably still present in the reinstalled packages), by applying a patch against the source version of that file, rather than against its installed counterpart. There are two possible ways, (and potentially a hybrid third way), to achieve this: 1) Grab the full source distribution, patch it, rebuild, and install the rebuilt image. 2) Identify the installed location of the defective file, make it current working directory, and apply the patch with the "-p" option adjusted to exclude *all* directories from the file path recorded in the patch file. The first method is the more robust, but involves more effort; the second kind of assumes that the patch affects only the one file, its installed image is a verbatim copy of the source, and the user has write permission in the directory where it is installed. A hybrid of the two is also feasible: 3) Grab the source, and patch it, then rather than rebuild and install, copy the patched glilypond.pl to overwrite the defective version which was installed by the binary package; again, this requires the installed file to be a verbatim copy of the source, and write permission in the installation directory. In either of cases (2) and (3), it may also be necessary to chmod the installed file copy, to make it executable.