From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1333993-garchives=archives.gentoo.org@lists.gentoo.org>
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 9B39E158086
	for <garchives@archives.gentoo.org>; Wed, 27 Oct 2021 09:19:43 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BB11FE0207;
	Wed, 27 Oct 2021 09:19:42 +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-CHACHA20-POLY1305 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A1782E0207
	for <gentoo-commits@lists.gentoo.org>; Wed, 27 Oct 2021 09:19:42 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 79C31343C0B
	for <gentoo-commits@lists.gentoo.org>; Wed, 27 Oct 2021 09:19:41 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id E206389
	for <gentoo-commits@lists.gentoo.org>; Wed, 27 Oct 2021 09:19:39 +0000 (UTC)
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" <vapier@gentoo.org>
Message-ID: <1635326371.bec5fd6a5597f736a868e79017f99b5bc79a9dbf.vapier@gentoo>
Subject: [gentoo-commits] proj/crossdev:master commit in: /
X-VCS-Repository: proj/crossdev
X-VCS-Files: crossdev
X-VCS-Directories: /
X-VCS-Committer: vapier
X-VCS-Committer-Name: Mike Frysinger
X-VCS-Revision: bec5fd6a5597f736a868e79017f99b5bc79a9dbf
X-VCS-Branch: master
Date: Wed, 27 Oct 2021 09:19:39 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: e89696ec-082a-4caa-a4b6-1c2719045bfe
X-Archives-Hash: b1f9f9c820148b33929ffe30fc4fe608

commit:     bec5fd6a5597f736a868e79017f99b5bc79a9dbf
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 27 09:19:31 2021 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Oct 27 09:19:31 2021 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=bec5fd6a

crossdev: clean world file on uninstall

Closes: https://bugs.gentoo.org/676490
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 crossdev | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crossdev b/crossdev
index 6963d9d..ed75935 100755
--- a/crossdev
+++ b/crossdev
@@ -573,6 +573,9 @@ uninstall() {
 	ewarn "Uninstalling target '${CTARGET}' ..."
 
 	# clean out portage config files
+	if grep -qs "^cross-${CTARGET}/" "${EPREFIX}"/var/lib/portage/world ; then
+		sed -i "/^cross-${CTARGET}/d" "${EPREFIX}"/var/lib/portage/world
+	fi
 	if [[ -d ${CROSSDEV_OVERLAY}/cross-${CTARGET} ]]; then
 		rm -r "${CROSSDEV_OVERLAY}"/cross-${CTARGET}
 		# if we remove all the package in the category,