From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6467463440282681344 X-Received: by 10.223.172.8 with SMTP id v8mr278946wrc.32.1505895105938; Wed, 20 Sep 2017 01:11:45 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.68.205 with SMTP id b74ls72147ljf.26.gmail; Wed, 20 Sep 2017 01:11:45 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA2wQazagpWlIs7OB52nqllIlOOSnquxVp+cfoExeKDr/VSxRMxFL9tT3/5SUmV9Gjm3dGu X-Received: by 10.25.196.73 with SMTP id u70mr123024lff.20.1505895105530; Wed, 20 Sep 2017 01:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505895105; cv=none; d=google.com; s=arc-20160816; b=namVpbTGoYfONWyIzaCYdZdqSAq85nULqiuPEjjMPFIHhZsK0vCP3dQUiUsQRywA20 rslNQDw7LbpQm+xWSTsH+BNKoSMxaJ/j9hSmZybpOf9S1YjYl1vwESH05gHU/Fokbkxj Ezpv0sIzzMcgc0WXuTTWAuFFV9YRbChKC8iIuRMHsjfnUDMASZPJUI7LyWkkEBHiW4Eb CYqkCTTtelOg48W2WHXQOVyPHMYM/A8og7uJFcObHOU6mDCSJxbv9MYjSE5WXWx1mG94 zxDQlLO8R7zp39zDciAJwgXIfKXbWrW8LHc8DXQoXbMbMseKgqPCJQ4kOYEMA+1UxXrw m8TA== 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:arc-authentication-results; bh=AcN4TxFi6Wfy8zIQqhWz9tQI0VThhkuqFjGkyutp/Xw=; b=W/SVPxyz1MqsHvcPXfTUtkX25wG+IIYsmGYPRzp27YncbDfwI94sB6ZYy+HpWK/lr5 ZGLk1Hlw+8uZHTSII7UMFpQ3KT5hOtN0EENd4Q0LwaFmIqMZPDMdpXtPQM/pqytxVVPY EfTJRc9vlyy/5PeU6x7bf1qH3T0kOzAGemqbq1vj5l7ZAR5/WmKjkrawBpDY2WSP93Oq mJqEStcazAYjEqRw8dA9YYvwQLSJEvQU4iDY/6aIPotlxuz/RNKCxH7PZrUkrudECHVF NMPQXbvVhs07RKnzu75xb6EzOnWjHqc31Tec4UkAbzsnj84BM43MIbPyR36PlLUDZ9mb swgA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id l133si83194wmb.3.2017.09.20.01.11.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 01:11:45 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id v8K8BjjE022984 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Sep 2017 10:11:45 +0200 Received: from md1em3qc ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v8K8BiZp014322; Wed, 20 Sep 2017 10:11:45 +0200 Date: Wed, 20 Sep 2017 10:11:59 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH v2 2/4] meta-isar-bin: Generate cache repos Message-ID: <20170920101159.5b086d0c@md1em3qc> In-Reply-To: <20170919122052.28688-3-asmirnov@ilbers.de> References: <20170919122052.28688-1-asmirnov@ilbers.de> <20170919122052.28688-3-asmirnov@ilbers.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: c+VcPTpF1ki4 Am Tue, 19 Sep 2017 15:20:50 +0300 schrieb Alexander Smirnov : > Generate repos for each configuration in multiconfig. > > Signed-off-by: Alexander Smirnov > --- > meta-isar-bin/conf/layer.conf | 3 +++ > meta/classes/image.bbclass | 14 ++++++++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/meta-isar-bin/conf/layer.conf > b/meta-isar-bin/conf/layer.conf index 3518184..5ef6e60 100644 > --- a/meta-isar-bin/conf/layer.conf > +++ b/meta-isar-bin/conf/layer.conf > @@ -9,3 +9,6 @@ DEBCACHEDIR ?= "${LAYERDIR}/apt" > > # Path to the configuration files templates used by `reprepro` > DEBFILESDIR ?= "${LAYERDIR}/files" > + > +# Path to the databases used by `reprepro` > +DEBDBDIR ?= "${LAYERDIR}/db" > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass > index 30f241a..9db7371 100644 > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -35,6 +35,20 @@ python __anonymous () { > f.close() > } > > +do_create_cache_db[stamp-extra-info] = "${DISTRO}" > + > +do_create_cache_db() { > + path_cache="${DEBCACHEDIR}/${DISTRO}" > + path_databases="${DEBDBDIR}/${DISTRO}" > + > + if [ ! -d "${path_databases}" ]; then > + reprepro --waitforlock 3 -b ${path_cache} --dbdir > ${path_databases} \ > + export ${DEBDISTRONAME} > + fi > +} > + > +addtask create_cache_db before do_fetch This adds a new tool dependency, maybe update docs with the patch or keep in mind for later. Why "waitforlock 3" is there any chance at all that multiple images run into that at the same time? And if so how do we know 3 is enough? I just tested that a second "reprepro export" will still return 0, so it seems safe to do that multiple times, not sure what would happen if some packages where already added and you "export" again. Henning > do_populate[stamp-extra-info] = "${DISTRO}-${MACHINE}" > > # Install Debian packages, that were built from sources