From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6467463440282681344 X-Received: by 10.28.143.13 with SMTP id r13mr17453wmd.30.1506339818092; Mon, 25 Sep 2017 04:43:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.84.87 with SMTP id y23ls2343552ljd.11.gmail; Mon, 25 Sep 2017 04:43:37 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBMd2/lk22auSsmh5zLk3sEoEZ18wn2L4MWWZLUx/GdnazQYYw8SZxpegScalxdTrIOxbm1 X-Received: by 10.46.101.8 with SMTP id z8mr451919ljb.0.1506339817636; Mon, 25 Sep 2017 04:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506339817; cv=none; d=google.com; s=arc-20160816; b=Xwx1ThqcHyW9/vBDXd89bhkvxTnqS3Hsx7Ak/m7NU5ZGxJxW/yzs9KTX5ZzjxnVNWJ zMhm3gBB/bSW4Mhg7FVrMKgE9QCNa9rDVUIyip9yfTSU1tmMzBpy5AEz34yVr/xZyuOj 2zYvF5FACSSMNQgBgvIIFDbZ0uU/BXlHvHRL+T8bMRymaYjV/3x+3BG9RbWihghKLR+D mgnBZip91t93n5+XVD8+fTuKy1f8P8e/kuQxk5K+JrHecKHdR9oHEJC7ZOWew5cGvCBX mLzCZ3uf7pOQEfya0mkySGragFzyAK7v/hC9z1aPQYLXeC5Seq6hjr94dOmGMjOilJdi msNw== 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=qOr2CB9xtQBaI52zaXJQsjBmVPPK2jEYEj4OZtEVZM0=; b=tNN9h72Jo190fGfl29S6E8OuU0bTuuPz/ODSxHgdPPA2Y5jiL7j381Va9YgttFaoYw WF3NSgsexQbo899mR0YM8xGt8m2dvwONMabP6vuarHD0RlFhdr3ASdRQ+UmM5jfXL4sK 0xwB3l/edfNtdYq+ioXBYWivMis0ozzL00Irt8pmdUbm1sPkypsBhFB7t7V90TqhMmGj oMv/Uakc7lf9c2MeVxpWJ4psxCeMcbpNyP6jMY7Hprj4eW5ScNBWyS/fps4YGlU7RKhb 2Cz1LfYEWaVVUrHU3RsljqEkIdnYSsgMIRx9VuMnIiv60/7tMGdjEJl8PEFy0hfl0uJq zOWA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by domain of henning.schild@siemens.com) 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 191si428914wmn.2.2017.09.25.04.43.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 04:43:37 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.28 is neither permitted nor denied by domain of henning.schild@siemens.com) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by 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 goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v8PBhakv025302 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Sep 2017 13:43:37 +0200 Received: from md1em3qc ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v8PBhaVv003337; Mon, 25 Sep 2017 13:43:36 +0200 Date: Mon, 25 Sep 2017 13:43:55 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH v3 2/4] meta-isar-bin: Generate cache repos Message-ID: <20170925134355.6ec87848@md1em3qc> In-Reply-To: <20170925100000.5368-3-asmirnov@ilbers.de> References: <20170925100000.5368-1-asmirnov@ilbers.de> <20170925100000.5368-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: Z7YjETGZyCVi Am Mon, 25 Sep 2017 12:59:58 +0300 schrieb Alexander Smirnov : > Generate repos for each configuration in multiconfig. > > Signed-off-by: Alexander Smirnov > --- > meta-isar-bin/conf/layer.conf | 3 +++ > meta-isar/conf/local.conf.sample | 4 ++++ > meta/classes/image.bbclass | 16 ++++++++++++++++ > 3 files changed, 23 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-isar/conf/local.conf.sample > b/meta-isar/conf/local.conf.sample index a456b1b..660958f 100644 > --- a/meta-isar/conf/local.conf.sample > +++ b/meta-isar/conf/local.conf.sample > @@ -158,3 +158,7 @@ IMAGE_INSTALL = "hello example-raw" > # > # Default parallel jobs for bitbake: > BB_NUMBER_THREADS = "4" > + > +# > +# Number of attempts to try to get reprepro lock for access to apt > cache +REPREPRO_LOCK_ATTEMPTS = "16" > > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass > index 9ab9b19..6f39c7a 100644 > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -14,11 +14,27 @@ CACHE_CONF_DIR = "${DEBCACHEDIR}/${DISTRO}/conf" > do_cache_config[dirs] = "${CACHE_CONF_DIR}" > do_cache_config[stamp-extra-info] = "${DISTRO}" > > +call_reprepro() { > + for i in $(seq 1 ${REPREPRO_LOCK_ATTEMPTS}); do > + reprepro --waitforlock 5 $* \ > + || bbwarn "Failed to get reprepro lock, trying again..." Now we have two loops and the number from above need to be bultiplied with the inner number .. 5*16 times 10s. I still do not see how that solves the problem. But i can imagine those two loops really slowing down builds that fail. Looks like they potentially add 800s build-time. And every error of reprepro is turned into "Failed to get lock" ... As far as i looked at reprepro it should return EEXIST in the contention case. Henning > + done > +} > + > do_cache_config() { > if [ ! -e "${CACHE_CONF_DIR}/distributions" ]; then > sed -e "s#{DISTRO_NAME}#"${DEBDISTRONAME}"#g" \ > ${DEBFILESDIR}/distributions.in > > ${CACHE_CONF_DIR}/distributions fi > + > + path_cache="${DEBCACHEDIR}/${DISTRO}" > + path_databases="${DEBDBDIR}/${DISTRO}" > + > + if [ ! -d "${path_databases}" ]; then > + call_reprepro -b ${path_cache} \ > + --dbdir ${path_databases} \ > + export ${DEBDISTRONAME} > + fi > } > > addtask cache_config before do_fetch