From patchwork Thu May 11 10:50:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 2801 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 11 May 2023 12:50:42 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f188.google.com (mail-pl1-f188.google.com [209.85.214.188]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 34BAoeCF011894 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 May 2023 12:50:41 +0200 Received: by mail-pl1-f188.google.com with SMTP id d9443c01a7336-1aaf5dcd999sf84593335ad.1; Thu, 11 May 2023 03:50:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683802235; cv=pass; d=google.com; s=arc-20160816; b=HWbMbLL3/w1npJvgd/R4WrLSRT+ntKT2mThUvHr8NuK68LGEjgzCiqa5AOL3NfxqjB YYSP7O2Etl79cGv/x6+bp+P3HSMMSH6r5DjUKQgxy8v0s55BB63Go+YTyvtale7ZmHfV OlYIYevIiaZE/SnXlgm//+GzNubFDDSPCkiwVZMrgA+gkuJqIMeuoPNbsYOwF3C1QtH1 /6kRxoITWkYGDFmJQCCp316XjmrkP290VTXoIueer8KKJRwwiwaiFZdwJfOXhpe1bmSV WZkBMUWadUlphsnBoHHjtA/BPdnLVSM5JeY4nr+Dn8C3UntEmcKbDSbPu3vahK9pyAuR CK3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=I5fpxB6bEj1o+/swN0t6ZDRbxNBjRdVtqE9X2B04RiA=; b=SIBz0HLI9+6GQ4Ul4AUwe30gke7Ffxs+/wu4RzlSP+5QCTCJn6w6TFsN0VDTNpb67H U7y9os5chQuInMPpZWMAG0c6R+EviFeooL0Sc6LHCc0wrzGKFHTIAJyK3PClKjYP/lmZ 23QzdbjndPnWJtx3O4QgAOk9Sg7jnXiJZHF/QYUOXnB71jExMymLmJCDPVdI8o8bf2q8 aePfpLo2iDALCvNSNMFMtlYsW5Fi4UapemSyqSiPKevBPH4W9SAjn/4YyoaGqlYO0a49 gnfJ13MsFbU1rUxRQVdDMOACuujptZzKu0N3Ip1KxTTXq9HG9ypb3U65+8ZCWquborph jpIg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683802235; x=1686394235; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=I5fpxB6bEj1o+/swN0t6ZDRbxNBjRdVtqE9X2B04RiA=; b=Apj1twGzIEcfOrGzgHRCpzuNbUaiHv6YoEW2MNIp44EJhUbJshoytQr1w7Ngw946jH kfWQu4Tt/bcTtxXgvZsO6pF5u1dVjCOPMnSY78j/A2oFIVtQhgg79v+NERDvmSUkfeRS tb2WczReFupuD7cfMkosB2CcrgIIBihs2fo1hva9M+MEyH2aLy+v/FmLU4on/DohBRE1 MyJ/weftdfKW7/PhW3yp8taSC2OvvQWsFp27RPvt1Su+yLMuhW6aPCswFZqSQxk9V9Yt ATUjvJyjVQg6hhIAYl3FAEmnZ7511fNkf4/HfBYJ9PxWTm76qxMNKnIMLBFvAH+3FWCd J94A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683802235; x=1686394235; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=I5fpxB6bEj1o+/swN0t6ZDRbxNBjRdVtqE9X2B04RiA=; b=L5LjoNXsgb/O5De08gyaJvhNdGmqMf0lTZ0mer1834EWKfgv3+GjPInLSH/u/jgvjT LCFTo+KSDa15oiTs/Wmmg+ZcTz51iNL3VrSX4QLt0jXmnkRvmaYdXM5d5GSGSYltX6wn n4OR+83MH4ndrBNOqN7hXZlmSd3SuGf6l0CfQDxzJpi3wQQXbfsr3AsFGxkbxaSqfARi 8aEl83ik1XHwv3p7it+jU/ledlNbxdMkp3r9PiuBVuevTDKrkLM9Xe6FN2g0n2uySJ3a UXLdIM1YAmk+hgJ3XBPs2n7w+OX3yhn/appMbfOyH7k9zukajv5cP3zuNzAMBVx+wBSd kHug== Sender: isar-users@googlegroups.com X-Gm-Message-State: AC+VfDwF0KM7j1GywuYIEnS5+s2HzXrcIvVT5kAJVFVuqhlv8XbDfJ0o xkEi9Iw3NVUum8G4fyEuNuU= X-Google-Smtp-Source: ACHHUZ5V9qJKaVGD71yiUk737vNoVMusk1DSU8bqNHQy2q8I6v5RCgwwToTpvoqziwV9Krf024W+vA== X-Received: by 2002:a17:903:248:b0:1ab:7b9:669a with SMTP id j8-20020a170903024800b001ab07b9669amr7674255plh.4.1683802234964; Thu, 11 May 2023 03:50:34 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:1347:b0:643:9bbd:703 with SMTP id k7-20020a056a00134700b006439bbd0703ls5323131pfu.10.-pod-prod-gmail; Thu, 11 May 2023 03:50:34 -0700 (PDT) X-Received: by 2002:a05:6a00:2408:b0:643:aa2:4dd9 with SMTP id z8-20020a056a00240800b006430aa24dd9mr25858825pfh.7.1683802234089; Thu, 11 May 2023 03:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683802234; cv=none; d=google.com; s=arc-20160816; b=zkekIzNMe/XyLbL13VnmIKztkfYFreUkG5U/AqsQ5fQ3MRJJA3kHaIOayLZBSTJm1o FO60oI/kbhPqN4MVamYyxl6Ja9/6bgI+euzkWV+IscopUgE+YCXWf5gyyglISHpv7Jam Iv5NavjiVZP2gflQObBWVCpC+N9Nvw7boIBaCHDU66AHBJcIlAxvaWxQUigoM3Ev+zLG UkJVZv45mywMGC6u5Wq76aaXXt4r0wQ5kmxKiRomOESTEm0eHT371w6NC21tq/6LHUMj 6Jlr8HBea2I4qVZSezKrsZxIvyb8t332m3mnNwjSalwicEoLM486yPgzBUJ309SNc50v aEEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=jQAs9QWiwBuQTUsNnD8rnP/6i70aW3kuhC8pKufStYU=; b=nNzcXm9QOPfNYil14Q7GENqELmf/GCyXWM8yTyitxSFKDiSEKyQchdzMeZlTrGSTBc 3Im//xb/euxwLGaJIaXC+Wt9PIeG1S34fGfJ0Yz2zh0tJy5f0/cZcJem3eoPhCL7TvwH 9qrW1+fHFkRdznCXwq1gfNyB+GKWabZjsGx1ehtkJe6Jbj1F6e9ILuE72kGZS/7qLKQE FGtqaVhbeOaQL+26WXefHnEWzNhHfb8uptuLTXphzW7b+3yRcPEmah5nXgEJl8BHMhd+ cuy0nldQJf3KrixpKFbwwnVyBycHMLFUQv5IAyJHvkhaob2mGIDaIoGYKZCvxoT1EPyg vGCw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id u18-20020a056a00099200b0063b655bf130si533367pfg.6.2023.05.11.03.50.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 May 2023 03:50:33 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.. ([85.254.75.115]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 34BAoQ01011851 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 May 2023 12:50:28 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v4 1/7] isar-apt: Move cleanup to postprocessing Date: Thu, 11 May 2023 13:50:14 +0300 Message-Id: <20230511105020.1881496-2-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230511105020.1881496-1-amikan@ilbers.de> References: <20230511105020.1881496-1-amikan@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= As isar-apt now used only for packages install move its cleanup stage from finalize task to postprocessing. Signed-off-by: Anton Mikanovich --- meta/classes/image.bbclass | 5 ----- meta/classes/rootfs.bbclass | 12 ++++++++++++ .../recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 08b6d3d6..53859eb9 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -450,11 +450,6 @@ do_rootfs_finalize() { mountpoint -q '${ROOTFSDIR}/sys' && \ umount -l ${ROOTFSDIR}/sys - rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list" - rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt" - rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" - rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar" - if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then mv "${ROOTFSDIR}/etc/apt/sources-list" \ "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 22449d71..7dec7b36 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -293,6 +293,18 @@ rootfs_export_dpkg_status() { '${ROOTFS_DPKGSTATUS_DEPLOY_DIR}'/'${ROOTFS_PACKAGE_SUFFIX}'.dpkg_status } +ROOTFS_POSTPROCESS_COMMAND += "rootfs_cleanup_isar_apt" +rootfs_cleanup_isar_apt[weight] = "2" +rootfs_cleanup_isar_apt() { + sudo -s <<'EOSUDO' + set -e + rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list" + rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt" + rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" + rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar" +EOSUDO +} + do_rootfs_postprocess[vardeps] = "${ROOTFS_POSTPROCESS_COMMAND}" do_rootfs_postprocess[network] = "${TASK_USE_SUDO}" python do_rootfs_postprocess() { diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc index fd8bb648..49992db0 100644 --- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc +++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc @@ -51,6 +51,7 @@ ROOTFS_PACKAGES = "${SBUILD_CHROOT_PREINSTALL}" # We don't need /etc/apt/sources.list.d/isar-apt.list' while it's handled by sbuild ROOTFS_CONFIGURE_COMMAND:remove = "rootfs_configure_isar_apt" +ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_isar_apt" DEPLOY_SCHROOT = "${@d.getVar('SCHROOT_' + d.getVar('SBUILD_VARIANT').upper() + '_DIR')}"