sonic-buildimage icon indicating copy to clipboard operation
sonic-buildimage copied to clipboard

Migrate the dpkg lock to container path

Open w1nda opened this issue 10 months ago • 4 comments

Why I did it

Because dpkg does not allow installing packages in parallel, we added a lock.

The lock is under repo path target/debs/$(BLDENV)/dpkg_lock, when the building progress is terminated by user, and the lock is not cleaned, the next time building progress will stuck at dpkg command.

As the lock should only exists when building, we raise this PR to migrate the lock to container path, so the lock will live on in the container.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Migrate the lock to folder /tmp/dpkg_lock which is in the container.

How to verify it

Triger the pipeline for build

Which release branch to backport (provide reason below if selected)

  • [ ] 201811
  • [ ] 201911
  • [ ] 202006
  • [ ] 202012
  • [ ] 202106
  • [ ] 202111
  • [ ] 202205
  • [ ] 202211
  • [ ] 202305

Tested branch (Please provide the tested image version)

  • [ ]
  • [ ]

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

w1nda avatar Apr 01 '24 04:04 w1nda

/azpw ms_conflict

liushilongbuaa avatar Apr 01 '24 11:04 liushilongbuaa

platform/mellanox/mft/Makefile is also managing dpkg_lock,, this path may need to be updated (ideally, they shouldn't be doing any package installations at that stage at all).

saiarcot895 avatar Apr 01 '24 20:04 saiarcot895

Hi @xumia, Hi @liushilongbuaa, cloud you help review this PR? thanks

w1nda avatar Apr 16 '24 05:04 w1nda

platform/mellanox/mft/Makefile is also managing dpkg_lock,, this path may need to be updated (ideally, they shouldn't be doing any package installations at that stage at all).

As the Makefile is not commonly used, I prefer to leave it as it was.

w1nda avatar Apr 16 '24 06:04 w1nda