From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 19 Oct 2026 17:54:24 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f61.google.com (mail-wm1-f61.google.com [209.85.128.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 69JFsNgs004070 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 19 Oct 2026 17:54:23 +0200 Received: by mail-wm1-f61.google.com with SMTP id 5b1f17b1804b1-4a1d7c3b38esf17967225e9.2 for ; Mon, 19 Oct 2026 08:54:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1792425258; cv=pass; d=google.com; s=arc-20260327; b=qwaegW/q04ModGFwdQ0TxfAUYeNOOvwDm7WDc+TuOLgYRq+rN8mCq7hMtPDmV+VRLn upFrSqX8yhriJuzFCJEjLx6Fq59T62uI5eW6qqyFefA6+5XvVivGmmyW+ltWVQoUg4yA 8NKYHp7EoZENAzqMVoedilGhuKWrQcgS8/gKw6+z8efHP7YRkZnaPcN+xvVnpNPLXUJo cowZU1TxT0+AekSFfNkF2wVGBFThIqHgVmg+KAVzVRFFDUAb/0dxkV+YtxuattMojjoR CjgODdtb7fbOhz0UdAuobi4VvpwAGRlTX3nLwNVr1AXGBZHYcUBedVMmWcA+Rxo+Hjx5 Sg6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=EF04UsiiSC1lExcA4+8p9L30OWMs4kqDhbIru4NGCVQ=; fh=owkKCNWsFt1C0K1jZjlpQD2RKbKVndcY6cG2atbgk+0=; b=rG7KdMrqSQASNpOrYQqRvOWEPno98/CqzBXCNtYn3tJntktfblDZaWiO9VuhAcZ7mH 0jwcl9cUAaNZscpMQ5x6U2l0bjNlyLN8DR4J2OSt5Jgb35+zJyQRQyk6zF+LiNVREtUQ JpftjdF7bN2n0w6p3VIAa+3koXR5mMo4xEqso2Rzwmwz675zqwoJa91KoPj9LXE/OH7f 8Alr1ZftQUE72gBd9kyq5Af3v1WuHe/RNfIBNEkDnoC4NPi1zbRNbYfT9H4qj0NSpqIb wZ914Bz0KE7U8NjfzYU51jp+5RaaoNWKsHDYQaefUSYZ8RL2BbIXJx7QbzRzl9A8iPYj Vm9g==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1792425258; x=1793030058; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=EF04UsiiSC1lExcA4+8p9L30OWMs4kqDhbIru4NGCVQ=; b=evkNZgF4ipRpikowB1m4YjLn8NYH74jb6iBo9VLHi06QX2syXjOP03oasmg4tQG9/9 Kqo9mfTxxtmfMsAFBJpIWCDC3xJdONGC6MuzD9GFl2VBYIcKFmOaZYewgXti8nSQh55/ e8G8P+wzi7fZ/PFyEySmy8zpWcm5bFCzru06TMCeRh2Df1r4XVl6sVbtQSYm6zpJrJ0h 2fP8rcg6IrYohsIIQH0u0AkNXkr+71T6nGCA1tOan+GHepA2hcTLnrlQvlQf1rQT2uDF 21qQmdit2S1aL6R91u61F8gNg0ZgGChwjI6urT5GDBfcf2tquDjpYfQ832lmVZJmO447 vdhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792425258; x=1793030058; 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:content-type :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to:content-type; bh=EF04UsiiSC1lExcA4+8p9L30OWMs4kqDhbIru4NGCVQ=; b=LQrkvzvojt1DQktCZ7ULvldCwPtIcONXknBPd/JFXacMxKlezcdLHFq/c16dlJLoj8 Y6NFRzq7zb5p9kqNljU0CuzhSPpG8Gpd+INHzj/SMz67tKk6uCEOkaeetlP6R9N34wIY tDe87RSoJ/ZvaFnyw27g7QG6eGM7C+CFJNUmpmh5eNp0x86jeynIw8F2SztKoey4GZk1 1uom63LXc2LKGuf53va+MbEB5YNkbpecEilG2/kQlXi9oHCyIHLwNavxeVw20QA3ajqG 1sDuVuO114v+Ew888uOVmfbXs8mKpGjNEazUaJbbhZTCuNBWB2JDcKRhKmThe2s1pVaG XmBg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AKwUvBzYlSzbqsfPQnBn/rOxJgDpKrx557OX7lM+M06Y6vSWT4gwIT8AdPxzOKVpl70BjnFRCUjA@ilbers.de X-Gm-Message-State: AFq9FYLAmBi89Y6hLLdQdVvaf5PknDGt7YnkdSUWaFQHjPHoDMplvxg8 Jh1nLTAQuhAfmPo7uS6tqr7fqfKM6zeGOXZkzN38zV92pM1bhyhsyw5r X-Received: by 2002:a05:600c:4684:b0:49c:cee0:e7c1 with SMTP id 5b1f17b1804b1-4a1d76001e9mr164732265e9.16.1792425257744; Mon, 19 Oct 2026 08:54:17 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLdfuFxDnZv2CvkhNBayRjZSF+bD0iXOajzCbhU+VwEwRGw==" Received: by 2002:a05:600c:3b94:b0:4a1:68e7:c268 with SMTP id 5b1f17b1804b1-4a1c78fda41ls6940095e9.2.-pod-prod-02-eu; Mon, 19 Oct 2026 08:54:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBxiVAxaY1gL462dgfXLTTDadUSyrLMkgbyNqyh95aWNLzLycmoYrpOi1/+xpwDjij69rYGFUOpIg25K@googlegroups.com X-Received: by 2002:a05:600c:81c9:b0:4a1:ac66:6ac6 with SMTP id 5b1f17b1804b1-4a1d7612994mr155267495e9.26.1792425255348; Mon, 19 Oct 2026 08:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792425255; cv=none; d=google.com; s=arc-20260327; b=fqLPkM33sZp/oy+m+8gD8r7yPXlPzRGeUyCOwBRZhUzPGevSZ4eyLjdVPyZS5bOjw2 OdlfHY5JBpS4QSpTvklpwm/5kESDHEPwMCoIJoRFn95esyUc7VQQJWFVC4dzhOwBAqIB +t/uYQjarUdOS8FP2fEdpYHQvdbGM/D3o3A2a0z6J5qjp4TFVCzOdHnpyzcW2BbVt7jN fD7QI1tlB63hQNIOR0xraN9KGuAew4gZgO5aOTclJS6aE1C8y/jjDC5Ip8iaKbxs2F23 c2wowngOPKiq5MYjOsTBVRkxckXrLrA4tOjeGOWBcmoOv+Z/h4TXcDcOWc2jwXA3Zg88 SESw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=o/D/dVwInsoJhy5BceqR105JH7OZiz4znsST7FCNaNU=; fh=4DG9SwntfZqmbofzRZ8ZNRkb2xRyFXuv7TDuBAdUTiw=; b=WtVxo2wdhg2cAxMujRS2/X5qtRVDdWFA88T5hwmrB8BRPy2AiYGMGzAyKl0g0cmD/d rFFSCYzMkxZaLQ4wUzIvuCSAexL0WQjuHo+dUeEKzVC7s+/3Jiho5LTLbNhRIbs/rdtP vw/fmEfeAu1QdWelVZ5MJs7iaYU832fjx6jpUKqbsVHahdWYcOTQeHuMoOsEtX1I0mDD YjrComZKck1yDi5lReO0VqqCvrMmKPvt/1vh+T6ys27+zef6F3k5pWpFzRfBO+9gGE2z DJ2rcRBhSDB+VkzdJIT8ZLjykG/HvjxS2kmVn0GB/kuWT/u+0tLgINmOkXpSYM33BP4N PBCQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-48dfd2fa3c0si119023f8f.0.2026.10.19.08.54.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Oct 2026 08:54:15 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.139] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 69JFqEPT003905 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Oct 2026 17:52:14 +0200 Message-ID: <024d0468-b1e7-478d-a2e8-2f5ed4fbfd72@ilbers.de> Date: Mon, 19 Oct 2026 17:52:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] fix: only remove binary packages created by PN To: Felix Moessbauer , isar-users@googlegroups.com Cc: gamzenur.kaba@siemens.com, jan.kiszka@siemens.com References: <20261014155009.937200-1-felix.moessbauer@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20261014155009.937200-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,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: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@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-TUID: /B60WNLFGzhK Applied to next, thanks. Zhihang On 10/14/26 17:50, 'Felix Moessbauer' via isar-users wrote: > Cleaning the correct set of packages from isar-apt is surprisingly hard. > In fd0d030a we changed the cleanup logic to remove all binary packages > that are created by a single source package. This however broke the case > that multiple build variants (which use the same source package) are > built in a single run, hence each variant cleans all other generated > binary packages on do_deploy_deb. Having multiple builds of a single > variant is perfectly fine in Debian (e.g. independent builds of arch=all > and arch=any packages). > > To fix this, we switch back to cleaning just the generated packages, but > we change the clean order on cleansstate: First run deb_clean to remove > the packages from the apt-cache, then run sstate clean to drop the > packages from the cache. Doing it the other way round would result in > the original error fixed in fd0d030a, by which the packages did not get > removed from isar-apt. > > Fixes: fd0d030a ("fix(dpkg-build): clean isar-apt by source ...") > Reported-by: Kaba, Gamze Nur > Signed-off-by: Felix Moessbauer > --- > meta/classes-recipe/dpkg-base.bbclass | 36 ++++++++++++-------------- > meta/classes-recipe/repository.bbclass | 22 ---------------- > 2 files changed, 17 insertions(+), 41 deletions(-) > > diff --git a/meta/classes-recipe/dpkg-base.bbclass b/meta/classes-recipe/dpkg-base.bbclass > index b392211b..4ec0ddbe 100644 > --- a/meta/classes-recipe/dpkg-base.bbclass > +++ b/meta/classes-recipe/dpkg-base.bbclass > @@ -229,24 +229,18 @@ python do_dpkg_build_setscene() { > > addtask dpkg_build_setscene > > -CLEANFUNCS += "deb_clean" > - > -# Architectures under which this recipe's binary packages end up in the repo: > -# the concrete build arch (PACKAGE_ARCH resolves DPKG_ARCH=any), plus "all" > -# when this is the build that also produces the arch-independent packages. > -def deb_clean_archs(d): > - dpkg_arch = d.getVar('DPKG_ARCH') or 'any' > - package_arch = d.getVar('PACKAGE_ARCH') > - host_arch = d.getVar('HOST_ARCH') > - archs = [package_arch if dpkg_arch == 'any' else dpkg_arch] > - if package_arch == host_arch and 'all' not in archs: > - archs.append('all') > - return ' '.join(a for a in archs if a) > +# Prepend, so that deb_clean() runs before sstate_cleanall(): the latter calls > +# sstate_clean() of do_dpkg_build, which empties DEPLOY_DIR_DEB. > +CLEANFUNCS =+ "deb_clean" > > +# Remove by .deb file, so that only the binary packages of this very recipe are > +# dropped (instead of its variants) > deb_clean() { > - repo_del_by_source "${REPO_ISAR_DIR}"/"${DISTRO}" \ > - "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" \ > - "${BPN}" ${@deb_clean_archs(d)} > + [ -d "${DEPLOY_DIR_DEB}" ] || return 0 > + for deb in $(find ${DEPLOY_DIR_DEB} -maxdepth 1 -name '*.deb'); do > + repo_del_package "${REPO_ISAR_DIR}"/"${DISTRO}" \ > + "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${deb}" > + done > } > # the clean function modifies isar-apt. Do not add DEPLOY_DIR_DEB_LOCK here: > # CLEANFUNCS also runs sstate_cleanall(), which takes that lock itself, and > @@ -255,8 +249,9 @@ do_clean[lockfiles] = "${REPO_ISAR_DIR}/isar.lock" > do_clean[network] = "${TASK_USE_SUDO}" > > do_deploy_deb() { > - # Removal is by source name and architecture (deb_clean), so a single scan > - # of DEPLOY_DIR_DEB is only needed for the addition below. > + # Scan DEPLOY_DIR_DEB once: the same list drives both the removal of the > + # previous revisions of this recipe's own binary packages and the addition > + # of the new ones. > debs=$(find ${DEPLOY_DIR_DEB} -maxdepth 1 -name '*.deb') > if [ -z "${debs}" ]; then > # DEPLOY_DIR_DEB is shared by all multiconfigs with the same DISTRO and > @@ -267,7 +262,10 @@ do_deploy_deb() { > bbnote "${DEPLOY_DIR_DEB} is empty, leaving isar-apt untouched" > return > fi > - deb_clean > + for deb in ${debs}; do > + repo_del_package "${REPO_ISAR_DIR}"/"${DISTRO}" \ > + "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${deb}" > + done > repo_add_packages "${REPO_ISAR_DIR}"/"${DISTRO}" \ > "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" ${debs} > } > diff --git a/meta/classes-recipe/repository.bbclass b/meta/classes-recipe/repository.bbclass > index b9097de5..1b6acd9b 100644 > --- a/meta/classes-recipe/repository.bbclass > +++ b/meta/classes-recipe/repository.bbclass > @@ -129,28 +129,6 @@ repo_del_package() { > repo_set_release_date "${dir}" "${codename}" > } > > -repo_del_by_source() { > - local dir="$1" > - local dbdir="$2" > - local codename="$3" > - local source="$4" > - shift 4 > - > - if [ -n "${GNUPGHOME}" ]; then > - export GNUPGHOME="${GNUPGHOME}" > - fi > - local arch_filter="" > - local arch > - for arch in "$@"; do > - [ -n "${arch_filter}" ] && arch_filter="${arch_filter}|" > - arch_filter="${arch_filter}Architecture (= ${arch})" > - done > - reprepro -b "${dir}" --dbdir "${dbdir}" -C main \ > - removefilter "${codename}" \ > - '$Source (= '"${source}"'), ('"${arch_filter}"'), $PackageType (= deb)' > - repo_set_release_date "${dir}" "${codename}" > -} > - > repo_contains_package() { > local dir="$1" > local dbdir="$2" -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/024d0468-b1e7-478d-a2e8-2f5ed4fbfd72%40ilbers.de.