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 ECAB3138334 for ; Tue, 21 May 2019 14:50:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED8F6E087E; Tue, 21 May 2019 14:50:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 CE463E087E for ; Tue, 21 May 2019 14:50:32 +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 6589E344D07 for ; Tue, 21 May 2019 14:50:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C8BF957B for ; Tue, 21 May 2019 14:50:29 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1558450222.78e5e3edf06b85fbe02628e6b8b1dc943aeea138.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-portage/elicense/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-portage/elicense/elicense-9999.ebuild X-VCS-Directories: app-portage/elicense/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 78e5e3edf06b85fbe02628e6b8b1dc943aeea138 X-VCS-Branch: master Date: Tue, 21 May 2019 14:50:29 +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: 956d6111-9b28-4533-8fb1-a7fd7168cf77 X-Archives-Hash: 854ee2db2ce1129695ea97f0e778b2f4 commit: 78e5e3edf06b85fbe02628e6b8b1dc943aeea138 Author: Thomas Deutschmann gentoo org> AuthorDate: Tue May 21 14:48:20 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue May 21 14:50:22 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78e5e3ed app-portage/elicense: update live ebuild Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann gentoo.org> app-portage/elicense/elicense-9999.ebuild | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app-portage/elicense/elicense-9999.ebuild b/app-portage/elicense/elicense-9999.ebuild index a7cb3da3c32..bbba9eea7ef 100644 --- a/app-portage/elicense/elicense-9999.ebuild +++ b/app-portage/elicense/elicense-9999.ebuild @@ -21,3 +21,16 @@ SLOT="0" IUSE="" RDEPEND=">=sys-apps/portage-2.3.62[${PYTHON_USEDEP}]" + +src_prepare() { + default + + local MY_PV=${PV} + if [[ ${PV} == "9999" ]]; then + local last_commit=$(git rev-parse HEAD) + MY_PV="${last_commit:0:7}-git" + fi + + sed -i -e "s/^MY_PV =.*$/MY_PV = \"${MY_PV}\"/" \ + elicense || die "Failed to sed in version." +}