From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5D3FF138334 for ; Sat, 28 Dec 2019 20:34:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95100E0B94; Sat, 28 Dec 2019 20:34:43 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 76846E0B94 for ; Sat, 28 Dec 2019 20:34:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 342B534DC71 for ; Sat, 28 Dec 2019 20:34:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5489840 for ; Sat, 28 Dec 2019 20:34:40 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1577565274.63aed098518786d1b135a6c8665d84483be2f829.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/vanilla-kernel-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-kernel/vanilla-kernel-bin/vanilla-kernel-bin-5.4.6.ebuild X-VCS-Directories: sys-kernel/vanilla-kernel-bin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 63aed098518786d1b135a6c8665d84483be2f829 X-VCS-Branch: master Date: Sat, 28 Dec 2019 20:34:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2cb4e878-2a88-47bd-9973-1122691ebcab X-Archives-Hash: f1182e310757b050a64b60ce9d980ef0 commit: 63aed098518786d1b135a6c8665d84483be2f829 Author: Michał Górny gentoo org> AuthorDate: Sat Dec 28 20:30:57 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Dec 28 20:34:34 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63aed098 sys-kernel/vanilla-kernel-bin: Verify version passed to has_version Verify the version read from /usr/src/linux symlink and make sure that it consists of plain [0-9.] before passing it to has_version. If it doesn't conform, it isn't our symlink anyway. Closes: https://bugs.gentoo.org/703822 Signed-off-by: Michał Górny gentoo.org> sys-kernel/vanilla-kernel-bin/vanilla-kernel-bin-5.4.6.ebuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys-kernel/vanilla-kernel-bin/vanilla-kernel-bin-5.4.6.ebuild b/sys-kernel/vanilla-kernel-bin/vanilla-kernel-bin-5.4.6.ebuild index fa1b7e994f2..4908786bffb 100644 --- a/sys-kernel/vanilla-kernel-bin/vanilla-kernel-bin-5.4.6.ebuild +++ b/sys-kernel/vanilla-kernel-bin/vanilla-kernel-bin-5.4.6.ebuild @@ -81,8 +81,9 @@ pkg_postinst() { fi local symlink_target=$(readlink "${EROOT}"/usr/src/linux) - if [[ ${symlink_target} == linux-[0-9]* ]]; then - local symlink_ver=${symlink_target#linux-} + local symlink_ver=${symlink_target#linux-} + if [[ ${symlink_target} == linux-* && -z ${symlink_ver//[0-9.]/} ]] + then local symlink_pkg=${CATEGORY}/${PN}-${symlink_ver} # if the current target is either being replaced, or still # installed (probably depclean candidate), update the symlink