From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6467463440282681344 X-Received: by 10.223.171.237 with SMTP id s100mr94501wrc.31.1505823675694; Tue, 19 Sep 2017 05:21:15 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.47.194 with SMTP id v185ls979991wmv.9.canary-gmail; Tue, 19 Sep 2017 05:21:15 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAZ34K7rnGgTfcTiq4pc9TJTQY4ZBPTuiqTrXX3T4zCLJCj7ZJAFw+/3UhoFfWc37uVIA08 X-Received: by 10.223.185.55 with SMTP id k52mr93344wrf.23.1505823675388; Tue, 19 Sep 2017 05:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505823675; cv=none; d=google.com; s=arc-20160816; b=abGFZnJDLa68IcwMuuMfbmUZFEghl7nQAyS6eFoYC7N38c3Dd8ZxbCYHzvHW8CI89h PdNA7MlOS4D081mTXLLeWxU4QOTbc3Xft1iR2Y5Rz0cMWK4buR6LK0xg3pZf48jjHYsJ GzICKw0HoDvsYOMsCykBZptnEKXsRAeAX1+FvpD0uTvY/3jAILVNk+eMFG2lcZ70c0oB kkmwUjIoTnJa04AHmLnjIPGn27mD/+SIK0tfrVFOIcK4p1kdUl9teDqzXYLBfIk2dSfc IkE4f1zV8REBj3QBbHAHAia3dWNzpPlsQUv3lKH1/l+9Jb01SVDWWFR4q8P5qC6lUc8S jU+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rdjIR/TgXDs1RPkwbhqN5IxMyQ+NgZYVRs8LUDHwSaY=; b=veJ6T34FXRT11ZTDwxxtv6m/9A86FYmXt0VzGYlFl6XEZEE9wUc+gDrt5b09sgZRiq jmQ8DIeBpwVlprMmxAxk3AIOlamesj2zrqp7XWhvFXyKd5c3Sb8XRE1/Jwm9/sUegh2G Nsz2pMyEaHqbtMxA78TX2yCE8Hi24xz2oMTJhT5Fk0X0TIeCRxS/TyplyGD9pqGSuFcA 2C+Wgc9VfzdZDJQJ3NawaNohYUwGUyE+ysIQC2dAr2OlbgVIWwdrSvzEPw/8Iacm3n55 nidRCL8taYepVnK4SoyIvUMgT5DoiCoO6XtEpbqqWJHcqG9to3wSEul9RYjxYzyT7/89 FuMg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id b62si98886wmd.3.2017.09.19.05.21.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Sep 2017 05:21:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v8JCKxnG010376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Sep 2017 14:21:07 +0200 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH v2 2/4] meta-isar-bin: Generate cache repos Date: Tue, 19 Sep 2017 15:20:50 +0300 Message-Id: <20170919122052.28688-3-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170919122052.28688-1-asmirnov@ilbers.de> References: <20170919122052.28688-1-asmirnov@ilbers.de> X-TUID: 277U6aOV4iLJ 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 + do_populate[stamp-extra-info] = "${DISTRO}-${MACHINE}" # Install Debian packages, that were built from sources -- 2.1.4