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 EF8CE1382C5 for ; Sat, 16 May 2020 00:28:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A5ECE0909; Sat, 16 May 2020 00:28:33 +0000 (UTC) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 BF15DE0909 for ; Sat, 16 May 2020 00:28:32 +0000 (UTC) Received: by mail-pl1-f171.google.com with SMTP id s20so1577862plp.6 for ; Fri, 15 May 2020 17:28:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RQ2ifjrCHzVyZz5y80LlI29Iu1AGxqx1GUVpNhop+V0=; b=YQhPkYAtiV+Mo27g6l8AxFWakoqy+jSFZWFgyWuYOEZ703ikEEVZbK1cvKb1cYwf59 wbuXYpQBF1/v/xTyf9LVvwgXXps3OiCIj3TV/otrkjW4Z6YJzYYBD8cM0MHaIAY3Zuvo Jdt7OaMs40eSaVWLXuNYv0jyzJ1B3HS+uyfQhx3XibFvsImwCE8r5aHT1LyNcZ5cuZX2 k5KzeOroZLzZv4mtgrOZLUNBks4FkkMaO9dk87R5re2mELz834opAw5Omsh7k+Bolt5s UqcaI9JqIdMbL6jae986ZAhL50Gs5C5mcd5jL5elN6SIJoTTZw8HgPS7cgs4dAB9/zY7 GC6w== X-Gm-Message-State: AOAM533LkqLUvDX8m0J9Zzeqjn1XRmQwr6BZJKJwAE/JCR7FjemTF9Ds W9FLvJrMkv6Sy6tWn6vAz/hd3eI4 X-Google-Smtp-Source: ABdhPJz1YkxZvpVynYi43jan/n2zroWXW4xLTEweQIanGgrDs2OTvNcpTPYd4Lo9W2ZzucZ5zdqqzg== X-Received: by 2002:a17:90a:fb89:: with SMTP id cp9mr6116653pjb.40.1589588911059; Fri, 15 May 2020 17:28:31 -0700 (PDT) Received: from localhost (jfdmzpr06-ext.jf.intel.com. [134.134.137.75]) by smtp.gmail.com with ESMTPSA id p62sm2870654pfb.93.2020.05.15.17.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2020 17:28:29 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH] targets: Drop setup_pkgmgr() Date: Fri, 15 May 2020 17:28:02 -0700 Message-Id: <20200516002802.2661642-1-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 05b0c68c-f354-4721-81ef-a5f01590dfad X-Archives-Hash: 32f3fce0a9e9764234987cde2bf21be7 It's not safe to update portage this way. See https://bugs.gentoo.org/722748 Additionally, it doesn't seem important to install/update the package manager first. In all cases except stage1 the seed stage will have an up-to-date package manager and in stage1 update_seed can handle that. Signed-off-by: Matt Turner --- targets/embedded/chroot.sh | 2 -- targets/livecd-stage1/chroot.sh | 3 --- targets/stage1/chroot.sh | 3 --- targets/stage3/chroot.sh | 3 --- targets/stage4/chroot.sh | 3 --- targets/support/chroot-functions.sh | 16 ---------------- 6 files changed, 30 deletions(-) diff --git a/targets/embedded/chroot.sh b/targets/embedded/chroot.sh index 56d40a4e..2fbba278 100755 --- a/targets/embedded/chroot.sh +++ b/targets/embedded/chroot.sh @@ -6,8 +6,6 @@ source /tmp/chroot-functions.sh export DESTROOT="${clst_root_path}" export clst_root_path="/" -setup_pkgmgr - echo "Installing dependencies into ${DESTROOT}..." run_merge -o "${clst_embedded_packages}" diff --git a/targets/livecd-stage1/chroot.sh b/targets/livecd-stage1/chroot.sh index 9ddf8d42..d143927e 100755 --- a/targets/livecd-stage1/chroot.sh +++ b/targets/livecd-stage1/chroot.sh @@ -2,7 +2,4 @@ source /tmp/chroot-functions.sh -## START BUILD -setup_pkgmgr - run_merge --update --deep --newuse "${clst_packages}" diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index b48fda65..9c7ef6ca 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -20,9 +20,6 @@ then exit 1 fi -## Setup seed pkgmgr to ensure latest -clst_root_path=/ setup_pkgmgr "build" - # We need to ensure the base stage3 has USE="bindist" # if BINDIST is set to avoid issues with openssl / openssh [ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf} diff --git a/targets/stage3/chroot.sh b/targets/stage3/chroot.sh index e6712015..37001db0 100755 --- a/targets/stage3/chroot.sh +++ b/targets/stage3/chroot.sh @@ -2,9 +2,6 @@ source /tmp/chroot-functions.sh -## START BUILD -setup_pkgmgr - export CONFIG_PROTECT="-* /etc/locale.gen" echo "$locales" > /etc/locale.gen diff --git a/targets/stage4/chroot.sh b/targets/stage4/chroot.sh index d1838644..3b107e5c 100755 --- a/targets/stage4/chroot.sh +++ b/targets/stage4/chroot.sh @@ -2,9 +2,6 @@ source /tmp/chroot-functions.sh -## START BUILD -setup_pkgmgr - echo "Bringing system up to date using profile specific use flags" run_merge -u @system diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 2fe5ac00..993dc209 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -181,22 +181,6 @@ setup_gcc(){ fi } -setup_pkgmgr(){ - # We need to merge our package manager with USE="build" set in case it is - # portage to avoid frying our /etc/portage/make.conf file. Otherwise, we could - # just let emerge @system could merge it. - # Use --update or portage might just waste time/cycles and reinstall the same version. - # Use --newuse to make sure it rebuilds with any changed use flags. - if [ -n "$1" ];then - echo "Adding USE=\"\${USE} $1\" to make.conf for portage build" - [ -e "${clst_make_conf}" ] && echo "USE=\"\${USE} $1\"" >> "${clst_make_conf}" - run_merge --oneshot --update --newuse sys-apps/portage - sed -i "/USE=\"\${USE} $1\"/d" "${clst_make_conf}" - else - run_merge --oneshot --update --newuse sys-apps/portage - fi -} - cleanup_distcc() { LIBDIR=$(get_libdir) rm -rf /etc/distcc/hosts -- 2.26.2