debian: build-tools: apt fails with permission errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
ZhangXiao |
Bug Description
Brief Description
-----------------
When building packages on debian, the build sometimes fails with a permission error while trying to clean apt cache.
Severity
--------
Major
Steps to Reproduce
------------------
Error observed in Jenkins, the approximate sequence of steps performed by Jenkins is:
cd /path/to/stx-tools
./stx-init-env
stx build prepare
stx shell
downloader -b -s -B
build-pkgs -a -b std,rt
Expected Behavior
------------------
Build succeeds
Actual Behavior
----------------
Build fails
Reproducibility
---------------
Intermittent
System Configuration
-------
N/A
Branch/Pull Time/Commit
-------
master/2022-08-08
Last Pass
---------
Unknown
Timestamp/Logs
--------------
05:26:23 2022-07-08 09:26:23,632 - debcontroller - DEBUG: Target dscs(4) passed to dsc_depends: ['/localdisk/
05:26:41 rm: cannot remove '/var/cache/
05:26:41 Traceback (most recent call last):
05:26:41 File "/localdisk/
05:26:41 ret = apt_cache.update()
05:26:41 File "/usr/lib/
05:26:41
05:26:41 raise FetchFailedExce
05:26:41 apt.cache.
05:26:41
05:26:41 During handling of the above exception, another exception occurred:
05:26:41
05:26:41 Traceback (most recent call last):
05:26:41 File "/localdisk/
05:26:41 build_controlle
05:26:41 File "/localdisk/
05:26:41 self.build_
05:26:41 File "/localdisk/
05:26:41 self.build_
05:26:41 File "/localdisk/
05:26:41 self.build_
05:26:41 File "/localdisk/
05:26:41 self.build_
05:26:41 File "/localdisk/
05:26:41 self.build_
05:26:41 File "/localdisk/
05:26:41 self.run_
05:26:41 File "/localdisk/
05:26:41 deps_resolver = dsc_depend.
05:26:41 File "/localdisk/
05:26:41 self.aptcache = get_aptcache(
05:26:41 File "/localdisk/
05:26:41 raise Exception('APT update failed')
05:26:41 Exception: APT update failed
05:26:41 command terminated with exit code 1
Test Activity
-------------
N/A
Workaround
----------
N/A
Changed in starlingx: | |
status: | New → In Progress |
tags: | added: stx.8.0 stx.build stx.debian |
Changed in starlingx: | |
assignee: | nobody → ZhangXiao (zhangxiao-windriver) |
importance: | Undecided → Medium |
Problem seems to be triggered by the existence of '/var/cache/ apt/archives/ partial' directory, owned by "apt", which is not world-readable.