From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7158065521418567680 X-Received: by 2002:a5d:59ae:0:b0:236:6861:a89d with SMTP id p14-20020a5d59ae000000b002366861a89dmr12516814wrr.437.1666767973131; Wed, 26 Oct 2022 00:06:13 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:ce0f:0:b0:3c5:f6bb:ee12 with SMTP id m15-20020a7bce0f000000b003c5f6bbee12ls480193wmc.3.-pod-control-gmail; Wed, 26 Oct 2022 00:06:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/IcoppzrdCHKM8bBzwcg/01BnaMdqS0g5GedoaEEKfwE/1u78Whx2Kc+MyUDFFeTu520h X-Received: by 2002:a05:600c:474a:b0:3c7:6df:4493 with SMTP id w10-20020a05600c474a00b003c706df4493mr1365275wmo.44.1666767971840; Wed, 26 Oct 2022 00:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666767971; cv=none; d=google.com; s=arc-20160816; b=VO+3SCAX1kh9Rb0lEm+5MFRr4rXRPFboJwSuuxunmq2zcoUDQuc8X2OJ0MwOa3hTwm fN25dxBuq8KI4ze43C80laR7zsjixYZy8EanIPpmY69wYrmVOf+L7dqVMSoEeruy+OnD MHxBKqAQ5isWHrO68lai9V766nvjKkG3ZkC9/aUuRuN7YJUKsQNHL11mi2R7/h+E7Tp6 hi4icgAY1Zfc6fQExrj+z28YrxUJ+jleQOveLUTY8RkE7vt1cKPg+1YG6yOz7wXxQnwe vxw4UxIKgNhqJ9Ivx9rasMuWyxANpii+35+F+/Jvvexl2yk5QUrqjFqDxxpHPuw/hgNn 5cgw== 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:date:subject:to:from; bh=PN1pK+hJ9hdxMKJSMKOvdC94MbKIQfoMrg4VX+lJwnM=; b=QkQGGeAxCGGxzdIztpChk5twcy9tp3+kiAv7Eo/kLxdiA7PbN/lsC9peJ1be389XU/ K3efczlJ7b5WMbgFBZ8fqHhLHwiQAkFgiBCpsJ3vkNWbunRX1dMmW4qQDNqDyB0ei1Ma hmqLp7nd0kweEHYgEYPgYYpu5e1zVQKaclxllANqiAgxpIzUtoylAI763BqqdqXObppm DRGdyc+3O/3mTqH6iGgiEwtpLh35GnJli8lOtEQkJ4Lu7QeiKmsE8N/CRm5apGv2US12 oGLeGETVyL42TY2sBAXxseqBFwqBc8qSbutIryA8CsiamDwPqCziTnjCjkT7UAwEijBx DOVg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id p5-20020a05600c418500b003c4e7ae1ed6si51937wmh.0.2022.10.26.00.06.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Oct 2022 00:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from hp.localnet (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 29Q769BC022704 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Oct 2022 09:06:10 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com, Jan Kiszka Subject: Re: [PATCH] sbuild: Don't update apt database on every package build Date: Wed, 26 Oct 2022 10:06:01 +0300 Message-ID: <2564476.vYhyI6sBWr@hp> In-Reply-To: <08331fcb-e592-8ee1-70c7-072932657528@siemens.com> References: <20221024131000.27492-1-ubely@ilbers.de> <6810893.9J7NaK4W3v@hp> <08331fcb-e592-8ee1-70c7-072932657528@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: cbwjVjwoJ3Cs In mail from =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, 25 =D0=BE=D0=BA=D1= =82=D1=8F=D0=B1=D1=80=D1=8F 2022 =D0=B3. 16:37:51 +03 user Jan Kiszka wrote: > On 25.10.22 11:00, Uladzimir Bely wrote: > > In mail from =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0= =B8=D0=BA, 24 =D0=BE=D0=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2022 =D0=B3. 17:14= :52 +03 user Jan Kiszka > >=20 > > wrote: > >> On 24.10.22 15:10, Uladzimir Bely wrote: > >>> By default, sbuild updates apt database beforethe build. It may cause > >>> an inconsistency between apt databases for different packages built at > >>> the different time if external (Debian) mirrors has updated recently. > >>>=20 > >>> With new changes, sbuild will rely on global apt state that was got > >>> during debootstrap stage. > >>>=20 > >>> Local `isar-apt` repo will still be automatically updated while it is > >>> passed via `--extra-repository=3D` argument. > >>=20 > >> Will that also ensure upgrades, e.g. from essential debian packages to > >> self-built ones hosted in isar-apt? We had a few of such cases in the > >> past already in downstream layers, and I recall permitting upgrades to > >> the old buildchroot for that. > >=20 > > I'm afraid I don't exactly get you question... > >=20 > > Do you mean, it may happen that Isay may update 'isar-apt' repository, = but > > won't even try to install "newer" (custom) package from isar-apt as an > > upgrade of some Debian package installed at debootstrap stage? >=20 > Actually, part of my former problems were downgrades, not upgrades, see > [1] and [2]. Those are possible as well because anything coming from > isar-apt has higher prior than other repo. Now I was only wondering if > that behavior is still given, with all those switches applied and > schroot in between us and the actual apt calls. It seems sbuild man pages say nothing about "--allow-downgrades". So, I'm n= ot=20 sure if it's used. Anyway, now I guess that setting `--no-apt-upgrade` and `--no-apt-distupgra= de`=20 in the v1 of patch is wrong. Most probably, such configuration won't allow= =20 even upgrades from debian packages to isar-apt ones. Also, you are saying, "isar-apt has higher prior than other repo". Where is= it=20 configured? I thought, `isar-apt` is just one of sources from "apt" and if= =20 Debian has newer package version than we compiled by hand, these newer=20 dependencies are to be installed... >=20 > > Yes, probably it may happen. The case I tried to cover is just to make > > sbuild know about custom packages in 'isar-apt' so it could install them > > as depends. But if the package already installed (e.g. at debootstrap or > > sbuild-chroot stage) it may happen it won't be upgraded. > >=20 > > I guess, there should be someting like "--no-apt-update --apt-distupgra= de" > > then. So, apt database won't be updated, but if 'isar-apt' provides new > > version of already installed (Debian) package, it will be used. > >=20 > > Or, even "--no-apt-update" should be enough, while "$apt_distupgrade" is > > already set by default in sbuild... > >=20 > >=20 > > Additinally, it would be good to have some test for this case. For > > example, we could have "hello" (from Debian) preinstalled before build, > > but upgrade it to custom "patched" version during sbuild. >=20 > Yes, that would indeed be good. >=20 > Jan >=20 > [1] > https://github.com/ilbers/isar/commit/5367ba74d9f2f0b82560bab6c146f0521e1= 304 > 9f [2] > https://github.com/ilbers/isar/commit/77e62c1e9bbda107a10136d1aa5f26f5f66= 603 > 71