Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jun 2023 09:11:49 +0200
From:      Mathieu Arnold <mat@freebsd.org>
To:        Yuri Victorovich <yuri@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: 67ce8cec004c - main - Mk/Scripts: Fix the 'stripped' check from 'make check-plist' to report all unstripped files
Message-ID:  <szfldnpn56vsuxnz43ngpaxjev4ywofryunpvrtausomgwhien@vy4flxbzvpgp>
In-Reply-To: <202306020645.3526jV0Y019662@gitrepo.freebsd.org>
References:  <202306020645.3526jV0Y019662@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--veklw5qtdr6y6pe2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 02, 2023 at 06:45:31AM +0000, Yuri Victorovich wrote:
> The branch main has been updated by yuri:
>=20
> URL: https://cgit.FreeBSD.org/ports/commit/?id=3D67ce8cec004c85caeee5a6e9=
65bd10f872e1b895
>=20
> commit 67ce8cec004c85caeee5a6e965bd10f872e1b895
> Author:     Yuri Victorovich <yuri@FreeBSD.org>
> AuthorDate: 2023-06-02 06:40:46 +0000
> Commit:     Yuri Victorovich <yuri@FreeBSD.org>
> CommitDate: 2023-06-02 06:45:29 +0000
>=20
>     Mk/Scripts: Fix the 'stripped' check from 'make check-plist' to repor=
t all unstripped files
>    =20
>     Prior to this patch, the 'stripped' check always skipped the first
>     unstripped file.
>    =20
>     It uses the "find [...] -exec sh -c 'readelf -S -- /dev/null $0 "$@" =
|| :' -- {} +"
>     command. When arguments are passed to shell like this:
>     "sh -c 'script' arg1 arg2 arg3" - $@ within the script is assigned
>     to 'arg2 arg3', and $0 is assigned to arg1. This is a quirk in
>     how shells handle arguments in case when the script is passed
>     using -c.
>    =20
>     This patch adds $0 to account for the first passed file.

So, you are right, when you run `sh -c 'script' arg1 arg2 arg3`, arg1 is
in $0, and arg2 and arg3 are in $@.

Now, here, we are running `sh -c 'script' -- arg1 arg2 arg3`, so, $0
contains `--`, and arg1-3 are in $@.

> -	    -exec sh -c 'readelf -S -- /dev/null "$@" || :' -- {} + 2>/dev/null=
 | awk '
> +	    -exec sh -c 'readelf -S -- /dev/null $0 "$@" || :' -- {} + 2>/dev/n=
ull | awk '

If the patch was correct, you would need to quote "$0".

But as I pointed out, it is not correct, so please revert.

--=20
Mathieu Arnold

--veklw5qtdr6y6pe2
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQITBAABCgB9FiEE9XJBpJetWizkEBUef2IOCp6dQb4FAmR5ljVfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY1
NzI0MUE0OTdBRDVBMkNFNDEwMTUxRTdGNjIwRTBBOUU5RDQxQkUACgkQf2IOCp6d
Qb5jpQv9FdloavQ21l15UMID5Xd0ixtxRzyail1KJCJgACFYicf6oNtKGDxrB8Rz
rQsxQx8DRZbpZdliQSh7mt1OSq4O0pIsi4qvmD5iY0+QS7s3j/G9UZkAM7snAcwH
oFQGUD1PIgdDEAMQeqz3B1Ui2NGxtWyJWR+0rRyGbdPpufJ0ccf196BE5mxXJaEB
hWNVEq/NOhmYpoSYdt5hkeNSyTO4o0/mRE1xZd0v8WPXG7E4Das+pwiY8UJ6n9Eo
afgdhU3LMzkF+OA4PM+2Wn/lop4GHKL5F+jkU1QVo24152gmPUT4N7yGEJOXUiCf
Fk8FrqZjRgz4Y+obYd+k0R5YI1ebmsVyZlXOPSMyvBcn2SSU5Cme45aZEDyDPscZ
hgXDmrlM0gm+uL2pzoWmPaBWUzMfr251CHl1WppBwowKsheBoletJpDyh6kI9dna
yUvOhg94hgqdBcIVLW2jpHEdu6+FKzA94u8ZVLu2YlzYvRkkaYONNC/6H9NbF+bz
SBA/aJ4x
=dWCe
-----END PGP SIGNATURE-----

--veklw5qtdr6y6pe2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?szfldnpn56vsuxnz43ngpaxjev4ywofryunpvrtausomgwhien>