From nobody Sat Apr 08 15:56:47 2023 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pv0Gm3Czzz44Zcg for ; Sat, 8 Apr 2023 15:56:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pv0Gl6Mr9z42x7 for ; Sat, 8 Apr 2023 15:56:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680969407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3KuOPRf8mwP4rj8eDsyDMs1DI0o75SaInzz2R3hd6U=; b=l+rNvmOzU9GId3L3wze/g734KQcFRNJL7FhVbJtu4ICtjWJj8yRYbOFG+Z+j/y6nGhijd0 B1GopAVrp5KccYJV2DMbfD3ujDuaRU3Jl9LR9s4HHBdcH7blcMgGUOZiFA0GqmQO4yytbD +Nhj3/pVHJmRP2/P4PpKQNTGMXzKvh86ag5mW1jh1mpVZBbdJGwPpE9Pu85cWRErWE8130 2gACot6NpDy60m6S2Xq54iiiJD11+rwWIH8PlWG6VMV8DpD/mPtOxEFTlX7K561W1/W7a3 vQodVDr0pVLDsv7JbqSb+GvwOyh5YGm2fxblI6LqYxSkMWYjM12C0I8OdrXzcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680969407; a=rsa-sha256; cv=none; b=GFSbLv5W+OjMg4RNtYahx1Doz/oJCuIoIhNg0TNrfVfRYkWKY3fyo/TsSWf99kLtDN9TqF YL8QCI13GJIz7PdbgkF+pC9bR1DLF94/Ey5fpT96G/wokXBZj3l9WE2NmwW+RFaDPc6bom UXV+xRE0LCbbDFULHhAX32P2D9+U3BfJ64cXHKQq9WLWgqeWH5b3YqdtN0U4SZImiYu/IT a+CcA2p/4C7cTj8ENIX3f1GXjPhp8VW4FDu3rTSjteGapYHK/FBxkw2DIeG8ICRpTPNGOi 7DgfI67RJeW0G7y+JRTPKrsHZ91UQZcVARVc2gAgrf21XEfB4u2jmNyCcqSbpw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pv0Gl4XcQzY7C for ; Sat, 8 Apr 2023 15:56:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 338Ful3R010194 for ; Sat, 8 Apr 2023 15:56:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 338FulI7010193 for ports-bugs@FreeBSD.org; Sat, 8 Apr 2023 15:56:47 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 270706] Mk/Uses/nodejs.mk: fix '.if empty()' usage Date: Sat, 08 Apr 2023 15:56:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jcfyecrayz@liamekaens.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pizzamig@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270706 Bug ID: 270706 Summary: Mk/Uses/nodejs.mk: fix '.if empty()' usage Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: pizzamig@freebsd.org Reporter: jcfyecrayz@liamekaens.com Assignee: pizzamig@freebsd.org Flags: maintainer-feedback?(pizzamig@freebsd.org) Mk/Uses/nodejs.mk currently has the following: . if !empty(${nodejs_ARGS:Nbuild:Nrun:Nlts:Ncurrent:N14:N16:N18:N19}) IGNORE=3D USES=3Dnodejs has invalid arguments ${nodejs_ARGS}. . endif 'empty' should take an expression that is a variable or variable with modif= iers - such as empty(FOO) or empty(FOO:Nsomething). It should not normally take= the expansion of the expression - such as empty(${FOO}) or empty(${FOO:Nsomethi= ng}) - unless the expansion is a desired variable expression to be tested for emptiness itself. For nodejs.mk it wants to check if the nodejs_ARGS variable (with modifiers= ) is empty, so it should be: . if !empty(nodejs_ARGS:Nbuild:Nrun:Nlts:Ncurrent:N14:N16:N18:N19) IGNORE=3D USES=3Dnodejs has invalid arguments ${nodejs_ARGS}. . endif But there's another error, namely the :N modifiers should include a test for 'env'. It appears omission of that was just an oversight. So: . if !empty(nodejs_ARGS:Nbuild:Nenv:Nrun:Nlts:Ncurrent:N14:N16:N18:N19) IGNORE=3D USES=3Dnodejs has invalid arguments ${nodejs_ARGS}. . endif Locally this mistake was noticed after www/yarn added USES=3Dnodejs:env, an= d it just so happened that the environment had 'env' defined in the environment.= So that triggered the following incorrect error: % env env=3Dx make -C www/yarn extract =3D=3D=3D> yarn-1.22.18_1 USES=3Dnodejs has invalid arguments env.. *** Error code 1 After fixing the 'empty()' expression as described above, that same command does not failure. If you only fix the missing :Nenv without removing the incorrect expansion = of nodejs_ARGS and modifiers, then the invalid arguments test does not catch t= he invalid argument as it should: % make -C www/yarn extract USES=3Dmetaport\ nodejs:inval =3D=3D=3D> Fetching all distfiles required by yarn-1.22.18_1 for building =3D=3D=3D> Extracting for yarn-1.22.18_1 --=20 You are receiving this mail because: You are the assignee for the bug.=