There seems to be uncertainty when to use an external foo.patch file
plus %patch and when to use %{l_shtool} subst. Sometimes it really
depends on subtle factors, but here are at least some rules to remember:

o we use only a single patch and generic named file for each package:
  foo.patch. This is comitted side-by-side to foo.spec. The reason for
  the generic name is that this way CVS is not "trashed" with many files
  going in and out and that all patches required in the life-time of
  a package (especially on different branches) can all be seen in the
  history of a single file.

o we use patching with a patch-file if the patching cannot be done
  easily (or at all) with line-based regex substitutions. We usually
  never use a patch-file for patching _generated_ files like
  "configure". This is a nightmair on upgrades. So, for generated
  files or for a mass-patching of many files (e.g. multiple Makefiles)
  or if the change is very minimal we use "%{l_shtool} subst".

In case you're uncertain think especially about two major goals for
OpenPKG: 1. the packaging has to be kept small, clean, concise and
less intrusive and 2. patching should survive or at least easily be
upgradable on package version updates. At least these are the factors
which I use for deciding whether to use a patch-file or a substitution
command...
                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to