Using patchfiles while overriding patch

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using patchfiles while overriding patch

Ned Konz-2
I'm trying to come up with a new Portfile for avr-binutils and avr-gcc.

Both of these have overridden the patch command to do special things.

However, I also have a set of patch files that I'd like to apply.

Because the patch command has been overridden, the usual patching  
using patchfiles doesn't happen.

How should I do the file patching from a custom patch{} block?

I have tried this:


patchfiles  file1 file2 file3

patch {
        patch_main
        # other stuff...
}


and it seems to do the patching, but I'm not sure that it's the right  
way to do this. For instance, I'm not sure if the environment or  
error handling would work right.


Is this it or should I do something else?

Thanks,
--
Ned Konz
[hidden email]


_______________________________________________
Darwinports mailing list
[hidden email]
http://www.opendarwin.org/mailman/listinfo/darwinports
Reply | Threaded
Open this post in threaded view
|

Re: Using patchfiles while overriding patch

James Berry-3

On Mar 29, 2006, at 7:32 AM, Ned Konz wrote:

> I'm trying to come up with a new Portfile for avr-binutils and avr-
> gcc.
>
> Both of these have overridden the patch command to do special things.
>
> However, I also have a set of patch files that I'd like to apply.

I would suggest moving the stuff that's currently in "patch" into  
either "pre-patch" or "post-patch", which is probably where it should  
have been in the first place. The regular patch can then do the  
default thing of handling the patch files.

James.

>
> Because the patch command has been overridden, the usual patching  
> using patchfiles doesn't happen.
>
> How should I do the file patching from a custom patch{} block?
>
> I have tried this:
>
>
> patchfiles  file1 file2 file3
>
> patch {
> patch_main
> # other stuff...
> }
>
>
> and it seems to do the patching, but I'm not sure that it's the  
> right way to do this. For instance, I'm not sure if the environment  
> or error handling would work right.
>
>
> Is this it or should I do something else?
>
> Thanks,
> --
> Ned Konz
> [hidden email]
>
>
> _______________________________________________
> Darwinports mailing list
> [hidden email]
> http://www.opendarwin.org/mailman/listinfo/darwinports

_______________________________________________
Darwinports mailing list
[hidden email]
http://www.opendarwin.org/mailman/listinfo/darwinports
Reply | Threaded
Open this post in threaded view
|

Re: Using patchfiles while overriding patch

Salvatore Domenick Desiano
In reply to this post by Ned Konz-2
Unless there is some strong reason to *override* the default patching
action, these files should probably be changed to use pre-patch and
post-patch. You can then use patchfiles to your heart's content. In some
cases, I could see turning off or overrding a default action (configure
or destroot, for example), but the default patch behavior can be stopped
my not having a patchfiles line.

-- Sal
smile.




On Wed, 29 Mar 2006, Ned Konz wrote:

o I'm trying to come up with a new Portfile for avr-binutils and avr-gcc.
o
o Both of these have overridden the patch command to do special things.
o
o However, I also have a set of patch files that I'd like to apply.
o
o Because the patch command has been overridden, the usual patching
o using patchfiles doesn't happen.
o
o How should I do the file patching from a custom patch{} block?
o
o I have tried this:
o
o
o patchfiles  file1 file2 file3
o
o patch {
o patch_main
o # other stuff...
o }
o
o
o and it seems to do the patching, but I'm not sure that it's the right
o way to do this. For instance, I'm not sure if the environment or
o error handling would work right.
o
o
o Is this it or should I do something else?
o
o Thanks,
o --
o Ned Konz
o [hidden email]
o
o
o _______________________________________________
o Darwinports mailing list
o [hidden email]
o http://www.opendarwin.org/mailman/listinfo/darwinports
o
o

--------------
  Salvatore Domenick Desiano
    Research Scientist
      Intelligent Systems Division (QSS Group, Inc.)
        Explorations Technology Directorate
          NASA Ames Research Center

_______________________________________________
Darwinports mailing list
[hidden email]
http://www.opendarwin.org/mailman/listinfo/darwinports