From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6659727571892043776 X-Received: by 2002:a2e:800a:: with SMTP id j10mr1646483ljg.11.1550761444354; Thu, 21 Feb 2019 07:04:04 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:9146:: with SMTP id y6ls268150lfj.10.gmail; Thu, 21 Feb 2019 07:04:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IZz7CQbhrEQd9ylcZUwXqpEupf1v2x0w4LG4VOQQG7fwo3nAiow3o0PqM8ZNeFpcfzog1V9 X-Received: by 2002:ac2:43a1:: with SMTP id t1mr2302843lfl.9.1550761443819; Thu, 21 Feb 2019 07:04:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550761443; cv=none; d=google.com; s=arc-20160816; b=p13Ne20j/jF5x4XWdgsP2b7zTy9sWleHsJ9HG8sswes8oQYdUa62TqLY/6TkoMQVh1 EomaoHPYUcRtB6nXzTyU+Ob2GDZYtX/gBkL4+wIATJG2A31CB/ewroIJxiLPq0IpBEW4 c9q3hx6unZIebc2iYVM/PzRD0T8SV33KAvkQvudZmHchaZCRXQo7+PXxy8B43KkDCquE 6nOTvOL9nSMtosUlXwiwBKePmR/epmoWtjUlfvJ/W9dQLU3qXIXuyn6IK34Tm0e7LOCj FnpVH7flWLYzK27bwER/sjPBPTv+N1ric2u4YESqJjkt7wSSd+qVeZSS+VoGErpBISmG 5FEQ== 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:subject:cc:to:from:date; bh=b6ngHQIDCzwv4fGubjB9BQydcqYv/nfxN278JnHd6J8=; b=PId82NOHWY+vfsi9NVAsm6L41XNjySJ2I27WMuuVxroXjVYwioU4uaeh3ksa0aOe3s IllQbHiF7qHhfcmM7Ho/v7q6S7hKh/72E40DTOHN7quBspJRmJp/leyKhyWm6U0Nw7WK nBjqnq6W37RMFql0fFve+/S6QPkhQildBfCwQziFZhr02pTCq3KSshtpND4U3bvwywtJ TyRHspmfdN3lY05jEly6Sz5zxqMycvZ+dgKbKrkRKsUIEqyDktM+j5fB8yNLfBZQT+Td oIL0Vm2O1iEpx2BiyLbZY0duvvk3HAZcJCvw4kfNxAvKsuStFIA2XZ4+uMuF7pM1JI6c LLNg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id w23si1057037lfl.5.2019.02.21.07.04.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 07:04:03 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id x1LF42kW029518 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Feb 2019 16:04:03 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.68.200]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x1LF40P2032056; Thu, 21 Feb 2019 16:04:00 +0100 Date: Thu, 21 Feb 2019 16:04:00 +0100 From: Henning Schild To: isar-users Cc: Vladislav Jasek Subject: Re: [PATCHv2] dpkg-base: derive "Package" and "Architecture" from .deb in cleanup Message-ID: <20190221160400.6a3285ac@md1za8fc.ad001.siemens.net> In-Reply-To: <20190219150520.6440-1-henning.schild@siemens.com> References: <20190219150520.6440-1-henning.schild@siemens.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: WMP0ggw8InU+ Please do not merge. I did not actually test this with an actuall "all" package and just got some feedback that i need to parse/understand. Henning Am Tue, 19 Feb 2019 16:05:20 +0100 schrieb Henning Schild : > From: Henning Schild > > Instead of using "sed" pattern magic ask the .debs their name and > architecture and remove exactly that. Especially the hardcoded > Architecture caused problems for packages of architecture "all". If > your recipe created such a package it could never be cleaned because > it simply was not in the arch we expected it in. And now in a rebuild > we can not add an updated version of the "all" deb. > > Reported-by: Vladislav Jasek > Signed-off-by: Henning Schild > --- > meta/classes/dpkg-base.bbclass | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/meta/classes/dpkg-base.bbclass > b/meta/classes/dpkg-base.bbclass index 742b8ad..0f70f1d 100644 > --- a/meta/classes/dpkg-base.bbclass > +++ b/meta/classes/dpkg-base.bbclass > @@ -98,13 +98,17 @@ do_build() { > CLEANFUNCS += "repo_clean" > > repo_clean() { > - PACKAGES=$(cd ${S}/..; ls *.deb | sed 's/\([^_]*\).*/\1/') > - if [ -n "${PACKAGES}" ]; then > - reprepro -b ${REPO_ISAR_DIR}/${DISTRO} \ > - --dbdir ${REPO_ISAR_DB_DIR}/${DISTRO} \ > - -C main -A ${DISTRO_ARCH} \ > - remove ${DEBDISTRONAME} \ > - ${PACKAGES} > + DEBS=$( ls ${S}/../*.deb ) > + if [ -n "${DEBS}" ]; then > + for d in ${DEBS}; do > + p=$( dpkg-deb --show --showformat '${Package}' ${d} ) > + a=$( dpkg-deb --show --showformat '${Architecture}' > ${d} ) > + reprepro -b ${REPO_ISAR_DIR}/${DISTRO} \ > + --dbdir ${REPO_ISAR_DB_DIR}/${DISTRO} \ > + -C main -A ${a} \ > + remove ${DEBDISTRONAME} \ > + ${p} > + done > fi > } >