cache-apt-pkgs-action icon indicating copy to clipboard operation
cache-apt-pkgs-action copied to clipboard

tar: Cowardly refusing to create an empty archive

Open hsanzg opened this issue 1 year ago • 7 comments

Hello!

I recently set up a workflow to install and cache some APT packages before testing my project. Unfortunately once I introduced the cache-apt-pkgs-action step, the action fails with the following message:

tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
Error: Process completed with exit code 123.

This occurs during the package caching step.

This seems like a duplicate of #76, but I'm using the v1 tag of the action which supposedly includes the fix. Did I miss something?

hsanzg avatar Jul 08 '23 13:07 hsanzg

@hsanzg Can you try sn-o-w/cache-apt-pkgs-action@master in your workflow to see if there is any difference? 🤔

I think I have found what could be wrong, but I'm not 100% sure if working correctly.

sn-o-w avatar Jul 13 '23 15:07 sn-o-w

Sorry for the late reply :stuck_out_tongue: Unfortunately the fork didn't work either; here's the change and here's the build log. Thanks for the help!

hsanzg avatar Sep 03 '23 01:09 hsanzg

Hi @sn-o-w, could you take a look at @hsanzg and see if you can help? Would appreciate it.

@hsanzg do you still have the build log? Looks like it expired.

awalsh128 avatar Mar 03 '24 20:03 awalsh128

Sure! I've triggered a rebuild using sn-o-w's fork; the logs are available at https://github.com/hsanzg/diag-scals/actions/runs/8217644520/job/22473569925 (archive). I don't think they will be that useful, however, because the only error indication is the rather cryptic message tar: Cowardly refusing to create an empty archive.

hsanzg avatar Mar 09 '24 22:03 hsanzg

Sure! I've triggered a rebuild using sn-o-w's fork; the logs are available at https://github.com/hsanzg/diag-scals/actions/runs/8217644520/job/22473569925 (archive). I don't think they will be that useful, however, because the only error indication is the rather cryptic message tar: Cowardly refusing to create an empty archive.

Try again, but use awalsh128/cache-apt-pkgs-action@master

I'll just delete my repo, anyway.

sn-o-w avatar Mar 09 '24 22:03 sn-o-w

That did the trick! Thank you for your help :)

hsanzg avatar Mar 09 '24 23:03 hsanzg

Sad to say that this was a false positive: I'm still getting the tar error message for packages intel-oneapi-mkl and intel-oneapi-mkl-devel (whereas it works fine for e.g. doxygen). While the initial build passes (log archive), subsequent builds that use files supposedly cached by this action fail (log archive) because some of these files cannot be found; in particular, the Intel MKL environment setup script outputs the message "WARNING: No env scripts found: No "env/vars.sh" scripts to process." (Note that this message does not show up on the successful, no-package-cache build.)

hsanzg avatar Mar 10 '24 00:03 hsanzg