From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7319406651323187200 X-Received: by 2002:a05:6870:5b88:b0:210:b2b0:5fcc with SMTP id em8-20020a0568705b8800b00210b2b05fccmr2087941oab.92.1705657374159; Fri, 19 Jan 2024 01:42:54 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:1692:b0:210:d771:c775 with SMTP id j18-20020a056870169200b00210d771c775ls911635oae.0.-pod-prod-04-us; Fri, 19 Jan 2024 01:42:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+qkMkuE8wG8ZPxQUlUQePbnK4sEKgQ9BF8NQGVUwMdFFo8zQFHOWAhJFgeFAPnV4dzK/n X-Received: by 2002:a05:6808:1305:b0:3bd:4df7:db85 with SMTP id y5-20020a056808130500b003bd4df7db85mr2780256oiv.69.1705657373362; Fri, 19 Jan 2024 01:42:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705657373; cv=pass; d=google.com; s=arc-20160816; b=DdAte1BHV0g4WDDpNZvJP/J6o35pnW9UbF4TZUyzrTHmcfX9ehRW5yYRKaEirOedjz kbzgJrLOu67XrLc7N2gUThuYeR2OxdKaKc34pyVkTJu9V8lh76YlnQvin3kj18ba95CY 23qSGr2HZiqYju1CzXhUQfE6SSf7es0dupRIuOHwGQ6RA9TOEQietixHR9KIMQ/spzff 6soMVuYquRDI1PghpmcHo1SCxlok2oGIV2jfQCDFgWlVQ9+2EDZtxpFcHHPu4SqwODF3 3qkJMdjkLaA3Pyd5hxNdUACfBIN+Wa5+NYrPAtijpo3L9pbhAJ04UK2Q8aornH2ioVoR oA+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:in-reply-to:from:references :to:content-language:subject:user-agent:date:message-id :dkim-signature; bh=8q2ngMZEEGfu7XLLF2+OfsN4ZITEBwyLYEypNGl3sNc=; fh=qYjLjom2XYK2EGXTfM32+e6Y5m6bxV+vwmPCS15rMNY=; b=Sy56pZD4Lv5alYYo1Pib1YXe6YX6KQBxfseLnMWC6stTvet3Exnp6BL6NXOj4oHHck x24T/2DazVTXHbn3alU98pBzmDv7Qc24YEVpkyhoXWQ3djg+qDffiMO/ZWiff3vGQ638 PL6nBWBx1VtOoU9YSii8jbyYAZmmDYLXfVpaaTKa9Fi5J4ZJ+AcUauJFFiZVTTrto7dB EAT7enK+TNRrBhHyJXCm1kYgl+3nxuyq789RgRFj3eXG3wjG9O+BQqaKLMbC96C6V3+f pLRaDg9QY1vKpJ0esX6IAxzg/7oH1YLqY6si6Whdkb3U4cAiRH24I+clRXGXu5n1KNnm alEQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=E0BvRB8U; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f403:2606::600 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20600.outbound.protection.outlook.com. [2a01:111:f403:2606::600]) by gmr-mx.google.com with ESMTPS id cd6-20020a056808318600b003bd9bf55aadsi334469oib.3.2024.01.19.01.42.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jan 2024 01:42:53 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f403:2606::600 as permitted sender) client-ip=2a01:111:f403:2606::600; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=E0BvRB8U; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f403:2606::600 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J1QBFouUqJuKExQ0EpcdvFya/JekGxKLMqI4Z8JfH9xv7qF6fXHyH4+w+o1KTHTRQ0T1f5yicxwpPT2Ha1i+E9xdsDpQ/ByPq+/W8OnWo5HTPwo1dDD+PZser1b76XS+6CxJMhPZK9U/DBUlWe9AAzWzq5+p+HK14kbG3DEn1pMJMGfSvlUkj4riwGOKoSrTS4+3Nnp4BT3XL8RtxCE9cT16iOVtLBERvEryCn+Wp9ktgUFKDqvKoJhGV58uT3luSBisBqp/OsDrKiLwYUX/H5Kg7BjYfYDDVL6CnUoHQS+UNVh50F1IsRkHo0zw655o+BEAqXbVScuBKhBeM4ySUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8q2ngMZEEGfu7XLLF2+OfsN4ZITEBwyLYEypNGl3sNc=; b=dFINAk9uErMnH0lwAWV0DYTQL4z21rk6lk35HljFbQVDRen+Jjkyi5wMjNTMUviASgtMdaKEzme5NfGriCfW7QkxaqXOpwpk5wx+45zAgvTVqzkZ/4zMy8gLBYTzAtnl4b1M16+FKrFxIecRXUcqEX2lduyH4QhSAcJeKcldiQV8WDdTSeRmcgZNYF/w1/AwP4cnZ8RCsBqpqKvkX0MA1G7IwqcUUsaHR09pRhAAK09dBoBIn8C2ww7BfqARCgXX+97bSjiMccbUkxmsu9XWLFCx7NLmcVmGz6IPMbpOnGeONZGKKFpSw6QXTqNtS9VBjQ22kvNL25NhG0aMF4AxYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8q2ngMZEEGfu7XLLF2+OfsN4ZITEBwyLYEypNGl3sNc=; b=E0BvRB8Ub9rbEHlV2yjXQTiIxdhVg7IH8TlVk0RLxM0c15q5aK7UUKbKelD9DDPuQAqh3W6CbbSFcC7M+UnNcVpiHlHIvGQXZERnqSoxpFjVh9bu+4YnS3uzygGUiYqSKwXR7PIpfz3luAqc3XpElx/Gd6WCdZHBhELPK37cH6pUyQb/IgvGNQPffL1YnxmaOlvAWI6uTGo9xptLnKg3xnnRUkEqJ1H75GIPOtmWiP358oOUcXaKs/3xltzlI35IvZkqYCjPAjRpIh5WYIGJ6jqtIwX/ZbnQPPCqvynL8GP7Dt4qB8/HeK1UcAn4C2MK0wS8AsXM0JMFfLx2vbdS1w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by DB9PR10MB5209.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:325::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:42:50 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8d16:7fbb:4964:94fe]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8d16:7fbb:4964:94fe%3]) with mapi id 15.20.7202.024; Fri, 19 Jan 2024 09:42:50 +0000 Message-ID: <9f23f168-f5ee-44f5-aaa5-a242632dcbc3@siemens.com> Date: Fri, 19 Jan 2024 10:42:49 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6] dpkg: Restore support for replacing pre-installed packages in sbuild-chroot Content-Language: en-US To: Uladzimir Bely , isar-users References: <024b7d92d8d9a9b1bd50466d5903086cda462c07.camel@ilbers.de> <0eacc107-7e89-4118-a9d8-f2e9713c64bc@siemens.com> <7767aec5-41f5-44ce-a292-6551c59a6ecb@siemens.com> <932bf7a167b931150719479296a509996c8b8536.camel@ilbers.de> From: Jan Kiszka In-Reply-To: <932bf7a167b931150719479296a509996c8b8536.camel@ilbers.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: CH0PR04CA0103.namprd04.prod.outlook.com (2603:10b6:610:75::18) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) Return-Path: jan.kiszka@siemens.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|DB9PR10MB5209:EE_ X-MS-Office365-Filtering-Correlation-Id: ffc84afc-7e0a-4042-9e50-08dc18d30064 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BdN1iHGGDDcvSMzSG5tIld7Y0nEavb3pNp5gXmzrIWA+cEwui9WNxM0dMM+LXSurw6CsjIy45Lr/toAhITbqg0qbxIVnLC54kUalpd+vfebyDOolqx0ECuEU1Vb6LUxiKF54XogK3IgjXXJ9umX0tExZ2SeI1BD1HOxmulnIHjjZbunM7g/2RIMYeiZqBXnMXVzXYtddW151eAxFNIzG2ybcQItBsfYGrjJp1BPAJT4J140xz1ye06ZdOKK4jB/BbHlqzzIYwZ0K8VG9g7m4l1LIVFXYcKtkVTBzXE1JQKIB1/nTds8d1A9DQTIuCwGKIz6tgSG0KAiHAqP+UzdtmzEuHPjOnxYGnPz53FQlgf1V5IEvQOp813C2EfLbV5zVAo2HsPlQoyMF0v9j5OSNhxZNRxouKYl+IOxc+VdKHEySCZeYGyq5Y/pnj3VdvhB8jvUwukebQHlp4/gkrWm/cALkjOddwJZVSIDx/ynMx6M42RQHQHJHB5Qv7TEaMW49LP00LqdEq2MSxT3HpeNli4vkKF5NvPReCXIqmGDxZsjdUnqlG4z9KYuhVEWP46DDI6nCt+uhKHlp4g72aUVMN2tPPOqqZpaZAmwKNLw7D13FlxwcHPSrsrnlAMLfZ8eOi8gwI3Gyx43coWfVv0TUYe6rwu8B/DuUsTiS587yWHFrU1rc3KelD3xRHMNL8WQC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(39860400002)(376002)(396003)(136003)(230173577357003)(230273577357003)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(6506007)(2616005)(53546011)(6512007)(83380400001)(5660300002)(2906002)(44832011)(41300700001)(478600001)(6486002)(8676002)(110136005)(8936002)(66946007)(66476007)(66556008)(316002)(36756003)(82960400001)(31696002)(86362001)(38100700002)(26005)(66899024)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U2V5ejZ3ZGlyQWtVeE9DeVV4YjV6MWx0OEFSQTJEZk9FVTRBS0xHdUU3QUFO?= =?utf-8?B?YWFIYklCdVZXRG9FcHV0eVM4T0trYVVnTlc2STE2MVI3M2Z3LzdxVTJzUzZx?= =?utf-8?B?UEtwNEd0VXRTQ280aitVRVY3aTdHMTcrNU42Uk41Y3dkMFVHRTRrcEN3YW5h?= =?utf-8?B?NzV5cHpUa2tFTmxQcnpub2daOFNCN3pnVjJpS1BCRzJ1VlBKYW92bllCNWZG?= =?utf-8?B?dWpSUWpBWXNsSzByemxKaG9ZcDBsb0RpOEMwckY2Y0dyMVVVZnFwR1RaaUtG?= =?utf-8?B?Y0plSGR0RDVy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?= =?utf-8?B?dTA0bnpQRHVMcklUNU01d2VyMnZnOFRhYjJxUENJbll4N2ZCQUpFVU1KdkM4?= =?utf-8?B?d3c9PQ==?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffc84afc-7e0a-4042-9e50-08dc18d30064 X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:42:50.4388 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ClHlgcE6OLC96ES1BBz6waoTAgpk3POi87zt9Ec8jreeLT8ihMmjd3gpmXhkKiS1OhdVXo8yL7xQlbibxA+wrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB5209 X-TUID: fVnEHHYWoK5/ On 19.01.24 10:15, Uladzimir Bely wrote: > On Fri, 2024-01-19 at 08:49 +0100, Jan Kiszka wrote: >> On 19.01.24 08:44, Jan Kiszka wrote: >>> On 19.01.24 08:40, Jan Kiszka wrote: >>>> On 19.01.24 08:37, Uladzimir Bely wrote: >>>>> On Fri, 2024-01-19 at 10:20 +0300, Uladzimir Bely wrote: >>>>>> On Thu, 2024-01-18 at 14:50 +0100, Jan Kiszka wrote: >>>>>>> From: Jan Kiszka >>>>>>> >>>>>>> During the migration to sbuild, support for using self- >>>>>>> built >>>>>>> packages >>>>>>> in >>>>>>> the build environment was lost if those were already part >>>>>>> of the >>>>>>> sbuild-chroot. This restores it by adding --apt-distupgrade >>>>>>> to the >>>>>>> sbuild call. But that is not enough because sbuild will >>>>>>> only >>>>>>> upgrade >>>>>>> packages from already configured sources, not those >>>>>>> specified via >>>>>>> --extra-repository. We therefore have to switch back to >>>>>>> configuring >>>>>>> isar-apt during sbuild-chroot creation. >>>>>>> >>>>>>> As rootfs_configure_isar_apt configures the isar repo under >>>>>>> /isar-apt, we bind-mount the one in /home/builder/${PN} to >>>>>>> that >>>>>>> folder. >>>>>>> Another difference is that we now need to run apt-get >>>>>>> update >>>>>>> explicitly, >>>>>>> but only for isar-apt. >>>>>>> >>>>>>> For apt fetching, we neither need nor want isar-apt to be >>>>>>> available. >>>>>>> Rebuilding self-generated apt packages is generally >>>>>>> pointless as >>>>>>> the >>>>>>> needs are better addressed in the generating recipe itself. >>>>>>> Exposing >>>>>>> isar-apt to the fetch may furthermore lead to fetching a >>>>>>> previously >>>>>>> built source package of the same recipe, rather than >>>>>>> pulling the >>>>>>> external version. >>>>>>> >>>>>>> And because the sbuild-chroots are now left behind with >>>>>>> isar-apt >>>>>>> configured, the configuration in imager_run can be removed >>>>>>> (credits >>>>>>> to >>>>>>> Srinuvasan Arjunan). >>>>>>> >>>>>>> Signed-off-by: Jan Kiszka >>>>>>> --- >>>>>>> >>>>>>> Changes in v6: >>>>>>>  - basically, going back to v4 but disabling isar-apt in >>>>>>> do_apt_fetch >>>>>>> >>>>>>> I was able to resolve the scenario that Uladzimir was >>>>>>> sharing this >>>>>>> way. >>>>>>> And I also realized that apt fetching as well as unpacking >>>>>>> should >>>>>>> have >>>>>>> no deal with isar-apt. So, v5 was taking a wrong turn. >>>>>>> >>>>>>>  meta/classes/dpkg-base.bbclass                | 29 >>>>>>> +++++++++++---- >>>>>>> -- >>>>>>> -- >>>>>>>  meta/classes/dpkg.bbclass                     |  5 ++-- >>>>>>>  meta/classes/image-tools-extension.bbclass    | 13 ------- >>>>>>> -- >>>>>>>  .../sbuild-chroot/sbuild-chroot.inc           |  2 -- >>>>>>>  4 files changed, 20 insertions(+), 29 deletions(-) >>>>>>> >>>>>>> diff --git a/meta/classes/dpkg-base.bbclass >>>>>>> b/meta/classes/dpkg- >>>>>>> base.bbclass >>>>>>> index 7b054d3f..80686677 100644 >>>>>>> --- a/meta/classes/dpkg-base.bbclass >>>>>>> +++ b/meta/classes/dpkg-base.bbclass >>>>>>> @@ -19,8 +19,6 @@ DEPENDS:append:riscv64 = "${@' >>>>>>> crossbuild- >>>>>>> essential-riscv64' if d.getVar('ISAR_C >>>>>>>  DEB_BUILD_PROFILES ?= "" >>>>>>>  DEB_BUILD_OPTIONS ?= "" >>>>>>>   >>>>>>> -ISAR_APT_REPO ?= "deb [trusted=yes] >>>>>>> file:///home/builder/${PN}/isar- >>>>>>> apt/${DISTRO}-${DISTRO_ARCH}/apt/${DISTRO} ${DEBDISTRONAME} >>>>>>> main" >>>>>>> - >>>>>>>  python do_adjust_git() { >>>>>>>      import subprocess >>>>>>>   >>>>>>> @@ -115,6 +113,8 @@ do_apt_fetch() { >>>>>>>      trap 'exit 1' INT HUP QUIT TERM ALRM USR1 >>>>>>>      trap 'schroot_cleanup' EXIT >>>>>>>   >>>>>>> +    schroot -d / -u root -c ${SBUILD_CHROOT} -- \ >>>>>>> +        rm /etc/apt/sources.list.d/isar-apt.list >>>>>>> /etc/apt/preferences.d/isar-apt >>>>>> >>>>>> The issue is still reproducible with the steps I posted >>>>>> below, as >>>>>> well >>>>>> as CI still fails with v6. >>>>>> I think, the steps above are not sufficient to completely >>>>>> stop >>>>>> dealing >>>>>> with isar-apt in do_apt_fetch() and we need some kind of 'apt >>>>>> update' >>>>>> here to consider removed list and preferences. The question >>>>>> is how to >>>>>> say apt to forget about isar-apt and do not run apt update >>>>>> for other >>>>>> source lists... maybe, simply remove isar-apt files from >>>>>> /var/lib/apt/lists/. >>>>> >>>>> An addition: >>>>> >>>>> It seems that files are not really removed from the session for >>>>> some >>>>> reason. I added some kind of "ls" near remove code: >>>>> >>>>> ``` >>>>> +    schroot -d / -u root -c ${SBUILD_CHROOT} -- \ >>>>> +        sh -c 'ls -la /etc/apt/sources.list.d/' >>>>>      schroot -d / -u root -c ${SBUILD_CHROOT} -- \ >>>>>          rm /etc/apt/sources.list.d/isar-apt.list >>>>> /etc/apt/preferences.d/isar-apt >>>>> +    schroot -d / -u root -c ${SBUILD_CHROOT} -- \ >>>>> +        sh -c 'ls -la /etc/apt/sources.list.d/' >>>>> ``` >>>>> , but still see the following in the log: >>>>> ``` >>>>>> DEBUG: Executing shell function do_apt_fetch >>>>>> total 16 >>>>>> drwxr-xr-x 2 root root 4096 Jan 19 07:09 . >>>>>> drwxr-xr-x 8 root root 4096 Jan 19 07:09 .. >>>>>> -rw-r--r-- 1 root root  569 Jan 19 07:09 bootstrap.list >>>>>> -rw-r--r-- 1 root root   94 Jan 19 07:09 isar-apt.list >>>>>> total 16 >>>>>> drwxr-xr-x 2 root root 4096 Jan 19 07:09 . >>>>>> drwxr-xr-x 8 root root 4096 Jan 19 07:09 .. >>>>>> -rw-r--r-- 1 root root  569 Jan 19 07:09 bootstrap.list >>>>>> -rw-r--r-- 1 root root   94 Jan 19 07:09 isar-apt.list >>>>>> Reading package lists... >>>>> ``` >>>>> Fith the apt_fetch failure followed, because of existing of >>>>> previously >>>>> built hello source package in the isar-apt repo. >>>>> >>>> >>>> OK... last-minute change of mine, splitting up the purging and >>>> the >>>> actual fetching into two schroot runs to avoid having to run the >>>> latter >>>> with "-u root". I didn't find a way to de-configure isar-apt >>>> unprivileged. Back to the drawing board. :( >>>> >>> >>> Comparing the split run of schroot with image-tool-extension, I >>> think >>> I'm just missing a proper session ID here. >>> >> >> Before sending v7: can you try this on top? >> >> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg- >> base.bbclass >> index 80686677..1a3333ac 100644 >> --- a/meta/classes/dpkg-base.bbclass >> +++ b/meta/classes/dpkg-base.bbclass >> @@ -113,10 +113,13 @@ do_apt_fetch() { >>      trap 'exit 1' INT HUP QUIT TERM ALRM USR1 >>      trap 'schroot_cleanup' EXIT >>   >> -    schroot -d / -u root -c ${SBUILD_CHROOT} -- \ >> +    session_id=$(schroot -q -b -c ${SBUILD_CHROOT}) >> +    echo "Started session: ${session_id}" >> + >> +    schroot -r -c ${session_id} -d / -u root -- \ >>          rm /etc/apt/sources.list.d/isar-apt.list >> /etc/apt/preferences.d/isar-apt >>      for uri in "${SRC_APT}"; do >> -        schroot -d / -c ${SBUILD_CHROOT} -- \ >> +        schroot -r -c ${session_id} -d / -- \ >>              sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" && cd >> /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only --only- >> source source "$2"' my_script "${BASE_DISTRO}- >> ${BASE_DISTRO_CODENAME}" "${uri}" >>      done >>      schroot_delete_configs >> >> Jan >> > > Yes, with persistent session it works, at least with reproduce steps I > used. I just added session cleanup (e.g, "schroot -e -c ${session_id}") > at the end. > > Before sending v7 I could also check if it is not reproduced anymore in > CI. > > Also, due to using schroot session we probably also need to care about > proper session removing in case commands under schroot fail, similar to > how it's done in image-tools-extention by imager_cleanup(). Yeah, still need to check that - schroot is also still new to me, learned a lot about it these days. Jan -- Siemens AG, Technology Linux Expert Center