commit:     980c4cf6f69ef98d6b2795b3cda4a7cb4ccbf1b7
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Dec  4 04:25:46 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec  6 09:11:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=980c4cf6

games-util/game-device-udev-rules: Apply patsub_replacement defences

Per bug #881383, string replacing forms of parameter expansion must take care
to quote - or appropriately escape - any nested parameter expansions, assuming
that their values are intended to be taken literally (as is almost invariably
the case). This has long been the case, but the introduction of the new
patsub_replacement option in bash >=5.2 has brought the issue to the fore.

In the case of the games-util/game-device-udev-rules package, the improper
quoting is not yet causing any issues. Still, it is better to write the code
properly to begin with, especially considering the demonstrative value of
robust code.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Bug: https://bugs.gentoo.org/881383
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../game-device-udev-rules/game-device-udev-rules-20220311.ebuild       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/games-util/game-device-udev-rules/game-device-udev-rules-20220311.ebuild 
b/games-util/game-device-udev-rules/game-device-udev-rules-20220311.ebuild
index 7954b2916c15..8c590397a84e 100644
--- a/games-util/game-device-udev-rules/game-device-udev-rules-20220311.ebuild
+++ b/games-util/game-device-udev-rules/game-device-udev-rules-20220311.ebuild
@@ -51,7 +51,7 @@ src_prepare() {
        local SRC DEST EXTRA
        for SRC in 60-steam-{input,vr}.rules; do
                DEST=${SRC//steam/game}
-               EXTRA=${FILESDIR}/${DEST/./-${PV}.}
+               EXTRA=${FILESDIR}/${DEST/./-"${PV}".}
 
                # Make changes in a copy.
                cp -v "${SRC}" "${DEST}" || die

Reply via email to