Re: [htdig] Daft Question - How to Apply patch under Solaris - Bit off

Subject: Re: [htdig] Daft Question - How to Apply patch under Solaris - Bit off
From: Gilles Detillieux (
Date: Fri Dec 08 2000 - 09:58:01 PST

According to Duncan Brannen:
> I'm trying to apply the aarmstrong URL rewite patch to htdig-3.1.5
> I assumed I use
> >patch -i htdig.diff
> under Solaris (8)
> however, I assumed it would pick up the file names to be patched since
> they're in there but nope - I have to specify the names then I get
> > patch -i htdig.diff
> Looks like a new-style context diff.
> File to patch: htdig/
> Malformed patch at line 16:
> patch: Line must begin with '+ ', ' ', or '! '.
> (This is where the next diff line starts)
> If I chop the file up into separate diffs and apply them individually it
> all works fine
> The man file for Path really sounds like it should read the file and work
> it out
> for itself. Am I missing something?

Yes, whenever you want to patch files in subdirectories, or use patch files
with pathnames in the filenames, you need to use the -p option to tell the
patch command how the pathnames are supposed to line up on your filesystem.
In this case, you should go into the main htdig-3.1.5 source directory and
use "patch -p1 < htdig.diff". The -p1 tells patch to strip off the first
pathname component from file names in the patch file. See "man patch".
I'm not sure what the -i option is for. The GNU version of this command
doesn't seem to have a -i.

The error message you got at line 16 is a bit worrisome, as this does seem
to be a properly formed patch, so I don't know why it's expecting a bigger
hunk of diff code than it's getting. You may need to switch to the GNU
version, or apply the patch by hand (it consists of fairly simple additions).

Gilles R. Detillieux              E-mail: <>
Spinal Cord Research Centre       WWW:
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to You will receive a message to confirm this. List archives: <> FAQ: <>

This archive was generated by hypermail 2b28 : Fri Dec 08 2000 - 10:07:32 PST