Re: changing directory with %patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/23/05, Tim Mooney <mooney@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> In regard to: changing directory with %patch, Marten Lehmann said (at...:
>
> > as I have two source .tar.gz's each in its own directory and rpmbuild is
> > switching to the first of them, I need to change the directory before
> > applying a patch for the second .tar.gz.
>
> > %patch1 -p0 --directory=..
> >
> > or
> >
> > %patch1 -p0 -d $RPM_BUILD_DIR/..
>
> It's easier than you think.
>
> cd ../foo-2.0
> %patch -p1 -P 0
> cd ../bar-2.1
> %patch -p1 -P 2
>
Also, the reason applying the arbitrary args to %patch did not work is
that the macro %patch and the command patch are not one and the same. 
%patch is a macro that helps immensly by hiding some of the issues of
the just where the build dir is and things like that, and though it
ultimately calls patch it does not support every option that patch can
take, but a subset of those options (and IMHO the most useful subset).

Cheers...james

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux