bsd.port.mk: make update-patches depend on patch

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

bsd.port.mk: make update-patches depend on patch

Klemens Nanni-2
Logically obvious to me; any reasons not to do it?

Basically, I expected this dependency when updating a port but was
mistaken:

        $ make extract
        [...]
        $ make update-patches
        WRKDIST=/usr/ports/pobj/git-2.22.0/git-2.22.0 does not exist
        *** Error 1 in /usr/ports/devel/git (/usr/ports/infrastructure/mk/bsd.port.mk:2467 'update-patches': @toedit=`WRKDIST=/usr/ports/pobj/git-2....)

Feedback? OK?

Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1471
diff -u -p -r1.1471 bsd.port.mk
--- bsd.port.mk 16 Jun 2019 14:27:42 -0000 1.1471
+++ bsd.port.mk 24 Jun 2019 21:51:25 -0000
@@ -2457,7 +2457,7 @@ _internal-plist _internal-update-plist:
  @${_MAKE} _internal-generate-readmes
  @${_update_plist}
 
-update-patches:
+update-patches: ${_PATCH_COOKIE}
  @toedit=`WRKDIST=${WRKDIST} PATCHDIR=${PATCHDIR} \
  PATCH_LIST='${PATCH_LIST}' DIFF_ARGS='${DIFF_ARGS}' \
  DISTORIG=${DISTORIG} PATCHORIG=${PATCHORIG} \

Reply | Threaded
Open this post in threaded view
|

Re: bsd.port.mk: make update-patches depend on patch

Stuart Henderson
On 2019/06/25 00:06, Klemens Nanni wrote:
> Logically obvious to me; any reasons not to do it?

Yes - "make patch" may have failed but you still want to update files
for whichever of the patches *did* manage to get applied.

> Basically, I expected this dependency when updating a port but was
> mistaken:
>
> $ make extract
> [...]
> $ make update-patches
> WRKDIST=/usr/ports/pobj/git-2.22.0/git-2.22.0 does not exist
> *** Error 1 in /usr/ports/devel/git (/usr/ports/infrastructure/mk/bsd.port.mk:2467 'update-patches': @toedit=`WRKDIST=/usr/ports/pobj/git-2....)
>
> Feedback? OK?
>
> Index: bsd.port.mk
> ===================================================================
> RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
> retrieving revision 1.1471
> diff -u -p -r1.1471 bsd.port.mk
> --- bsd.port.mk 16 Jun 2019 14:27:42 -0000 1.1471
> +++ bsd.port.mk 24 Jun 2019 21:51:25 -0000
> @@ -2457,7 +2457,7 @@ _internal-plist _internal-update-plist:
>   @${_MAKE} _internal-generate-readmes
>   @${_update_plist}
>  
> -update-patches:
> +update-patches: ${_PATCH_COOKIE}
>   @toedit=`WRKDIST=${WRKDIST} PATCHDIR=${PATCHDIR} \
>   PATCH_LIST='${PATCH_LIST}' DIFF_ARGS='${DIFF_ARGS}' \
>   DISTORIG=${DISTORIG} PATCHORIG=${PATCHORIG} \
>

Reply | Threaded
Open this post in threaded view
|

Re: bsd.port.mk: make update-patches depend on patch

Stuart Henderson
On 2019/06/24 23:29, Stuart Henderson wrote:

> On 2019/06/25 00:06, Klemens Nanni wrote:
> > Logically obvious to me; any reasons not to do it?
>
> Yes - "make patch" may have failed but you still want to update files
> for whichever of the patches *did* manage to get applied.
>
> > Basically, I expected this dependency when updating a port but was
> > mistaken:
> >
> > $ make extract
> > [...]
> > $ make update-patches
> > WRKDIST=/usr/ports/pobj/git-2.22.0/git-2.22.0 does not exist
> > *** Error 1 in /usr/ports/devel/git (/usr/ports/infrastructure/mk/bsd.port.mk:2467 'update-patches': @toedit=`WRKDIST=/usr/ports/pobj/git-2....)
> >
> > Feedback? OK?
> >
> > Index: bsd.port.mk
> > ===================================================================
> > RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
> > retrieving revision 1.1471
> > diff -u -p -r1.1471 bsd.port.mk
> > --- bsd.port.mk 16 Jun 2019 14:27:42 -0000 1.1471
> > +++ bsd.port.mk 24 Jun 2019 21:51:25 -0000
> > @@ -2457,7 +2457,7 @@ _internal-plist _internal-update-plist:
> >   @${_MAKE} _internal-generate-readmes
> >   @${_update_plist}
> >  
> > -update-patches:
> > +update-patches: ${_PATCH_COOKIE}
> >   @toedit=`WRKDIST=${WRKDIST} PATCHDIR=${PATCHDIR} \
> >   PATCH_LIST='${PATCH_LIST}' DIFF_ARGS='${DIFF_ARGS}' \
> >   DISTORIG=${DISTORIG} PATCHORIG=${PATCHORIG} \
> >
>

PS, I find this alias useful:

$ alias mup
mup='make makesum && make patch && make update-patches'


Reply | Threaded
Open this post in threaded view
|

Re: bsd.port.mk: make update-patches depend on patch

Klemens Nanni-2
In reply to this post by Stuart Henderson
On Mon, Jun 24, 2019 at 11:29:37PM +0100, Stuart Henderson wrote:
> On 2019/06/25 00:06, Klemens Nanni wrote:
> > Logically obvious to me; any reasons not to do it?
>
> Yes - "make patch" may have failed but you still want to update files
> for whichever of the patches *did* manage to get applied.
Fair enough,thanks.  I probably never ran into this because I either try
fixing patches before running `update-patches' or move them aside to
clean, apply and fix them one by one.

As for the alias, that's what I wanted to avoid.  I'd prefer our
framework to provide comprehensive tooling and targets so developers
do not have to augment their environment that much, although such an
alias really isn't much either.