awalsh128 / cache-apt-pkgs-action

Cache APT packages in GitHub Actions
Other
205 stars 35 forks source link

tar error with libboost-dev #79

Closed xoolive closed 1 year ago

xoolive commented 1 year ago

I encountered the following issue when caching libboost-dev. Have no idea why :(

21:53:06   * Caching libboost1.74-dev to /home/runner/cache-apt-pkgs/libboost1.74-dev:1.74.0-14ubuntu3.tar...
tar: usr/include/boost/serialization/collection_size_type: Cannot stat: No such file or directory
tar: copy.hpp: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Error: Process completed with exit code 123.
awalsh128 commented 1 year ago

I am unable to replicate the issue.

13:28:57 Installed package list:
13:28:57 - libboost1.71-dev:1.71.0-6ubuntu6
13:28:57 - libboost-dev:1.71.0.0ubuntu2

13:28:57 Caching 2 installed packages...
13:28:57   * Caching libboost1.71-dev to /tmp/cache-apt-pkgs-action/cache/libboost1.71-dev:1.71.0-6ubuntu6.tar...
13:28:58     done (compressed size 17M).
13:28:58   * Caching libboost-dev to /tmp/cache-apt-pkgs-action/cache/libboost-dev:1.71.0.0ubuntu2.tar...
13:28:58     done (compressed size 12K).
13:28:58 done (total cache size 17M)

Can you post the action setup you are using?

xoolive commented 1 year ago

Sure, it was here: https://github.com/xoolive/cartes/actions/runs/3803377311/workflow

(This is now suboptimal, with an apt install libboost-dev before the caching, but it fails if you comment it)

awalsh128 commented 1 year ago

Thanks, I am able to replicate the failure (added as a test).

https://github.com/awalsh128/cache-apt-pkgs-action-ci/actions/runs/3825936307/jobs/6509314230

It's a bit strange because it looks like dpkg -L is reporting partial strings. For example, usr/include/boost/serialization/collection_size_type should have the .hpp extension. This reports correctly locally on my machine but seems to be an issue on the runner. Will update the issue once I have debugged more.

awalsh128 commented 1 year ago

Okay, this is due to spaces. I was testing against 1.71, which was current on my box. Although the runner goes to 1.74.

2023-01-03T01:42:34.7113072Z /usr/include/boost/serialization/collection_size_type copy.hpp
2023-01-03T01:42:34.7113200Z /usr/include/boost/serialization/collection_size_type.hpp

It's a bug in their package release I believe but we should still handle this case.

awalsh128 commented 1 year ago

Tests are now passing up to master. Give it a shot for yourself and confirm it fixes it for you @master. Going to create a new patch release for this and you can will be able to use latest as normal once done.

awalsh128 commented 1 year ago

FYI, I need to revert the latest and v1 tag due to #83.

awalsh128 commented 1 year ago

Addressed other that caused revert. Tags now rev'd at release HEAD.