Wednesday, November 06, 2024

Re: modgo-gen-modules-helper: print MODGO_VERSION to STDERR

On Wed, 06 Nov 2024, Kirill A. Korinsky wrote:

> ports@,
>
> Here a small patch for modgo-gen-modules-helper which redirects output of
> MODGO_VERSION into STDERR. The goal is avoid editing modules.inc by removing
> that variable from this files by maintaners of go-prot then they do:
>
> make modgo-gen-modules > modules.inc
>
> Locally, I enjoy it for last week.
>
> Feedback? Ok?

As 90% of the time this is used like `make modgo-gen-modules > modules.inc` ...
ok paco@

> Index: infrastructure/bin/modgo-gen-modules-helper
> ===================================================================
> RCS file: /home/cvs/ports/infrastructure/bin/modgo-gen-modules-helper,v
> diff -u -p -r1.4 modgo-gen-modules-helper
> --- infrastructure/bin/modgo-gen-modules-helper 29 Dec 2022 23:45:12 -0000 1.4
> +++ infrastructure/bin/modgo-gen-modules-helper 29 Oct 2024 19:19:54 -0000
> @@ -44,6 +44,6 @@ my $portinfo = $port->get_dist_info($mod
> $port->set_other( MODGO_MODULES => "\\\n" . join(" \\\n", @{$portinfo->{Dist}})) if $portinfo->{Dist};
> $port->set_other( MODGO_MODFILES => "\\\n" . join(" \\\n", @{$portinfo->{Mods}})) if $portinfo->{Mods};
>
> -say "MODGO_VERSION =\t$portinfo->{Version} # add this to Makefile, not modules.inc\n";
> +say STDERR "MODGO_VERSION =\t$portinfo->{Version} # add this to Makefile, not modules.inc";
> say "MODGO_MODULES =\t$port->{'MODGO_MODULES'}\n" if defined($port->{'MODGO_MODULES'});
> say "MODGO_MODFILES =\t$port->{'MODGO_MODFILES'}\n" if defined($port->{'MODGO_MODFILES'});
>
>
> --
> wbr, Kirill
>

--
Paco Esteban.
0x5818130B8A6DBC03

No comments:

Post a Comment