[RFC,1/5] dpkg-base: Cover do_apt_unpack task by lock

Message ID 20220225074040.20975-2-amikan@ilbers.de
State RFC
Headers show
Series Debian dependencies investigation | expand

Commit Message

Anton Mikanovich Feb. 24, 2022, 9:40 p.m. UTC
After moving apt-get call from lock-protected do_apt_fetch to the
do_apt_unpack it should be also covered by isar.lock to avoid conflict.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes/dpkg-base.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jan Kiszka Feb. 25, 2022, 7:30 a.m. UTC | #1
On 25.02.22 08:40, Anton Mikanovich wrote:
> After moving apt-get call from lock-protected do_apt_fetch to the
> do_apt_unpack it should be also covered by isar.lock to avoid conflict.
> 

Mind to tell us when this happened (Fixes: ...)? Did you see real
problems? How often? All valuable information to assess the relevance
and criticality for downstream possibly using an affected version.

Jan

> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/classes/dpkg-base.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 928856a..e3ec133 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -142,6 +142,8 @@ do_apt_unpack() {
>      dpkg_undo_mounts
>  }
>  
> +do_apt_unpack[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> +
>  addtask apt_unpack after do_apt_fetch before do_patch
>  
>  addtask cleanall_apt before do_cleanall

Patch

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 928856a..e3ec133 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -142,6 +142,8 @@  do_apt_unpack() {
     dpkg_undo_mounts
 }
 
+do_apt_unpack[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
+
 addtask apt_unpack after do_apt_fetch before do_patch
 
 addtask cleanall_apt before do_cleanall