Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Oct 2004 23:01:36 -0700
From:      Joshua Tinnin <krinklyfig@spymac.com>
To:        freebsd-questions@freebsd.org
Cc:        Ion-Mihai Tetcu <itetcu@apropo.ro>
Subject:   Re: How to remove a patch from a port?
Message-ID:  <200410202301.36882.krinklyfig@spymac.com>
In-Reply-To: <20041020153045.1b8db4c3@it.buh.cameradicommercio.ro>
References:  <200410181506.55316.krinklyfig@spymac.com> <200410200445.51835.krinklyfig@spymac.com> <20041020153045.1b8db4c3@it.buh.cameradicommercio.ro>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 20 October 2004 05:30 am, Ion-Mihai Tetcu 
<itetcu@apropo.ro> wrote:
> On Wed, 20 Oct 2004 04:45:51 -0700
> Joshua Tinnin <krinklyfig@spymac.com> wrote:
> > On Wednesday 20 October 2004 04:10 am, Ion-Mihai Tetcu
> > <itetcu@apropo.ro> wrote:
>
>  [ ... ]
>
> > > > Sorry, let me explain a bit better. Someone posted a patch to
> > > > -ports to upgrade xfce4 to the latest version, and I was
> > > > helping test it. The patch covered several ports, and it had a
> > > > few problems and was updated by the patch author, but I wasn't
> > > > quite sure how to back out of it and retest an updated patch
> > > > without having to cvsup my ports tree and start over. But like
> > > > I said, maybe there isn't some other method I'm missing, and
> > > > this is the way it's done ...
> > >
> > > Exactly where did you put this patch ? How did you applied it? it
> > > was a patch to the Makefile of the port or a patch for the source
> > > of the port ?
> >
> > It's a patch for the Makefiles of several ports in the xfce4
> > metaport, so as to upgrade to the latest version. I patched it
> > through (essentially):
> >
> > cd /usr/ports && patch -E < /localpath/to/patch
>
> If you don't cvsup "quick" (cvsup -s) you shouldn't need to remove
> the Makefile, as cvsup will see the file has been changed; this is
> not true if you _add_ a file that is not in the cvs in a port_dir and
> it's not guaranteed to work if you use cvsup's -s switch.
>
> Usually when I have to test Makefile patches I:
> cp Makefile Makefile.cvs
> patch .. < /path/to/patch
> cp Makefile Makefile.patched
>
> Which enables me to restore the "official" Makefle or add my own
> diff's.

Excellent. This is exactly the sort of advice I was hoping to get. I 
guess it's sort of obvious how to do this now that I think about it, 
but I thought maybe the reverse option (-r) had something to do with 
this, and I was missing something. For my purposes, I'll probably just 
write a script to copy backups of the affected Makefiles and another to 
copy them back in case I need to restore them, as there are several. 
Thanks!

- jt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410202301.36882.krinklyfig>