From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>,
isar-users <isar-users@googlegroups.com>
Cc: Vladislav Jasek <vladislav.jasek@siemens.com>
Subject: Re: [PATCHv3] dpkg-base: derive "Package" and "Architecture" from .deb in cleanup
Date: Mon, 20 May 2019 15:48:30 +0200 [thread overview]
Message-ID: <e1b2ed09-f591-6412-b7f1-fd41a957dcec@ilbers.de> (raw)
In-Reply-To: <20190221155634.20706-1-henning.schild@siemens.com>
On 2/21/19 4:56 PM, Henning Schild wrote:
> From: Henning Schild <henning.schild@siemens.com>
>
> 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
> was added to all the archs of the repo, and later cleaned only from one.
> Now if that package changes because you are still working on the recipe,
> adding the package again would cause checksum mismatches for all but the
> current architecture.
> Remove the package from all archs when arch is "all".
Applied to the 'next'.
Regards,
Maxim.
> Reported-by: Vladislav Jasek <vladislav.jasek@siemens.com>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> meta/classes/dpkg-base.bbclass | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 742b8ad..8fb7805 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -98,13 +98,20 @@ 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} )
> + # removing "all" means no arch
> + aarg="-A ${a}"
> + [ "${a}" = "all" ] && aarg=""
> + reprepro -b ${REPO_ISAR_DIR}/${DISTRO} \
> + --dbdir ${REPO_ISAR_DB_DIR}/${DISTRO} \
> + -C main ${aarg} \
> + remove ${DEBDISTRONAME} \
> + ${p}
> + done
> fi
> }
>
>
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
prev parent reply other threads:[~2019-05-20 13:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 15:56 Henning Schild
2019-02-21 15:59 ` Henning Schild
2019-03-27 15:45 ` Henning Schild
2019-03-28 11:03 ` Baurzhan Ismagulov
2019-03-28 17:50 ` Henning Schild
2019-04-02 15:31 ` Baurzhan Ismagulov
2019-04-12 12:10 ` Henning Schild
2019-04-16 18:20 ` Baurzhan Ismagulov
2019-04-17 6:14 ` Baurzhan Ismagulov
2019-04-17 12:14 ` Baurzhan Ismagulov
2019-05-20 10:27 ` Henning Schild
2019-05-20 13:48 ` Maxim Yu. Osipov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1b2ed09-f591-6412-b7f1-fd41a957dcec@ilbers.de \
--to=mosipov@ilbers.de \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=vladislav.jasek@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox