public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] Fix parsing of LINKS
@ 2022-07-06  7:23 David Gibson
  2022-07-06 17:50 ` Stefano Brivio
  0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2022-07-06  7:23 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Currently mbuto misparses the LINKS variable in the profile.  It will
correctly assign the first two tokens to the target and link name, but for
subsequent tokens ${__target} will always be non-empty, and so we'll never
change it for later links.

AFAICT this has been missed because the existing sample profiles only have
links all going to the same target.

Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>
---
 mbuto | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mbuto b/mbuto
index 4ffe549..7530c72 100755
--- a/mbuto
+++ b/mbuto
@@ -808,6 +808,7 @@ prog_add() {
 		prog_link "${1}" \
 			  "${__bindir##${wd}}/$("${BASENAME}" "${__bin}")" \
 			  "${__target}" "${__l}"
+		__target=
 	done
 
 	libs_copy "${__bin}"
-- 
@@ -808,6 +808,7 @@ prog_add() {
 		prog_link "${1}" \
 			  "${__bindir##${wd}}/$("${BASENAME}" "${__bin}")" \
 			  "${__target}" "${__l}"
+		__target=
 	done
 
 	libs_copy "${__bin}"
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix parsing of LINKS
  2022-07-06  7:23 [PATCH] Fix parsing of LINKS David Gibson
@ 2022-07-06 17:50 ` Stefano Brivio
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Brivio @ 2022-07-06 17:50 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

On Wed,  6 Jul 2022 17:23:23 +1000
David Gibson <david(a)gibson.dropbear.id.au> wrote:

> Currently mbuto misparses the LINKS variable in the profile.  It will
> correctly assign the first two tokens to the target and link name, but for
> subsequent tokens ${__target} will always be non-empty, and so we'll never
> change it for later links.
> 
> AFAICT this has been missed because the existing sample profiles only have
> links all going to the same target.

Right, I didn't think of this problem at all.

> Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>
> ---
>  mbuto | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mbuto b/mbuto
> index 4ffe549..7530c72 100755
> --- a/mbuto
> +++ b/mbuto
> @@ -808,6 +808,7 @@ prog_add() {
>  		prog_link "${1}" \
>  			  "${__bindir##${wd}}/$("${BASENAME}" "${__bin}")" \
>  			  "${__target}" "${__l}"
> +		__target=
>  	done
>  
>  	libs_copy "${__bin}"

Merged now, thanks.

-- 
Stefano


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-06 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06  7:23 [PATCH] Fix parsing of LINKS David Gibson
2022-07-06 17:50 ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).