From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6458972999552860160 X-Received: by 10.46.85.140 with SMTP id g12mr190308lje.8.1504782824782; Thu, 07 Sep 2017 04:13:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.87.82 with SMTP id r18ls42067ljd.52.gmail; Thu, 07 Sep 2017 04:13:44 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6cJniJY9BmzAKistycov3xUBo+kwOameAQXALJ40Bk1f6vRx1yr2pXEmFdj/o82y7pMbza X-Received: by 10.46.92.193 with SMTP id q184mr198618ljb.34.1504782824365; Thu, 07 Sep 2017 04:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504782824; cv=none; d=google.com; s=arc-20160816; b=w8AyylY0BEFeb1OBd+T0FhsQzL6yUrgj8fyatX1PwvCggNzfMbWkjc62Ty6BiG3Zqv dd15SL4LO2wM/dKaEIkxLo34uA4dv7u7cd50IPIT8kK50OPYDosTd0iltsDbB4s9lpKx +7f/EjxHzAfK7R9HKU3/yPnP6FRL2nDTgQEW1FzHNKZUXXGUjoYn31vaW8WV0Goszt7Y 3ZOFNaquCRuwnOeVz2mP/xPZlWDW6/9FY+8zLO+dvu+Urf6bmvVAbWGVvvpKX2XqSp5O h3XyBKkzoFios/MoYMKZLVpN2CIvuA2lxMOdybW3PGKBeJED+ttRnxfyTyxdK2nnRP7x 0FGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=zVbyVifIQQBZbMWtx23dJ53Qc/GlzJk/mj2eLyfRxB0=; b=0ap0o8R8s9/sn9SmiUPjCRcsjfbatqLf3PSdtB/l2K8Lq7fpxVKsOWQU6z70YIwOVD 5THl4gbkUxqAt94BBvOhyaKvqdyL3FZ/Wo7ylgoR4x+XynJ/T6qe/1tSq+aFmr+14ZPf FDQvYz9t9GA3A1arLy4yLxfjs1fLviXDpXzTQgGCEC+4UspA7KD7c6CkZkp33NUa7nni P/zOYzVLDC4qQLp5E66cpEm0GHxONhqiWHHeDpB9QE7h9MDeglYuT+upqNLfMO48IaUV T5a3O25Poy7nl8jPOukJRqbm+dQK5wpXP6c/u24G2Wj8xE71Ka8X9Qt6FWb+5+8qAkii 9MNw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 194.138.37.39 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id e135si15857wmg.6.2017.09.07.04.13.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Sep 2017 04:13:44 -0700 (PDT) Received-SPF: neutral (google.com: 194.138.37.39 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 194.138.37.39 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id v87BDhbj006877 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Sep 2017 13:13:43 +0200 Received: from [139.25.68.223] (linux-ses-ext02.ppmd.siemens.net [139.25.68.223]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id v87BDhjJ030343; Thu, 7 Sep 2017 13:13:43 +0200 Subject: Re: [PATCH 1/6] meta-isar-bin: Enable caching of deb packages To: "[ext] Henning Schild" , Alexander Smirnov Cc: isar-users@googlegroups.com, Frank Lenormand References: <20170827151339.12806-1-asmirnov@ilbers.de> <20170827151339.12806-2-asmirnov@ilbers.de> <20170906162140.50ce9210@md1em3qc> From: Claudius Heine Message-ID: <96a8f85e-ae75-f7c6-0b4a-b3112cd93b0b@siemens.com> Date: Thu, 7 Sep 2017 13:13:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170906162140.50ce9210@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: yz2+9FWS5ac1 Hi, On 09/06/2017 04:21 PM, [ext] Henning Schild wrote: >> --- a/meta/classes/image.bbclass >> +++ b/meta/classes/image.bbclass >> @@ -11,18 +11,34 @@ inherit ${IMAGE_TYPE} >> >> do_populate[stamp-extra-info] = "${MACHINE}-${DISTRO}" >> >> -# Install Debian packages, that were built from sources >> +# Install Debian packages from the cache >> do_populate() { >> + readonly DIR_CACHE="${DEBCACHEDIR}/${DISTRO}" >> + >> if [ -n "${IMAGE_INSTALL}" ]; then >> - sudo mkdir -p ${S}/deb >> + if [ "${DEBCACHE_ENABLED}" != "0" ]; then >> + sudo mkdir -p "${S}/${DEBCACHEMNT}" >> + sudo mount -o bind "${DIR_CACHE}" "${S}/${DEBCACHEMNT}" >> + >> + sudo chroot "${S}" apt-get update -y >> + for package in ${IMAGE_INSTALL}; do >> + sudo chroot "${S}" apt-get install -t >> "${DEBDISTRONAME}" -y \ >> + --allow-unauthenticated "${package}" > > With do_populate using apt-get we now how to deal with package-name > collisions. We could have the case where our repo contains a package > that already exists in upstream debian. > > We will have to decide how to deal with them if they occur. My > suggestions/first idea would be: > - a recipe that creates a .deb with a taken package name fails by > default -EBUSY > - a recipe can set a variable to force itself in "OVERRIDE_DEBIAN = > True" > - a recipe that overrides the upstream package has to "win", we need > a proper apt Pin-Priority If all packages that are created by isar have for instance 'isar' in the version, then it should be possible to specify this version explicitly when installing them from the repository. I think pining is only necessary if upgrading packages on the target is a required feature. One option for this would be that another meta package (maybe created in the image recipe) has explicit version dependencies on all packages created by isar. This way apt would not upgrade those packages because it would break the version dependency. Cheers, Claudius -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de