awalsh128 / cache-apt-pkgs-action

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

Package just.. missing from the list #132

Open StiglCZ opened 5 months ago

StiglCZ commented 5 months ago

So, Ive been trying to cache packages using this action and my code looks like this:

      - name: Install deps
        uses: awalsh128/cache-apt-pkgs-action@v1.4.2
        with:
          packages: libsndfile-dev libopenal-dev
          version: 0.0.1
          execute_install_scripts: true

The problem is, it just ignores the libsndfile-dev package. I have even tried removeing the libopenal dependency, and it said there was an empty string. Here is the full log:

##[debug]Evaluating condition for step: 'Run awalsh128/cache-apt-pkgs-action@v1.4.2'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run awalsh128/cache-apt-pkgs-action@v1.4.2
##[debug]Loading inputs
##[debug]Loading env
Run awalsh128/cache-apt-pkgs-action@v1.4.2
##[debug]Evaluating: inputs.version
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'version'
##[debug]=> '0.0.1'
##[debug]Result: '0.0.1'
##[debug]Evaluating: inputs.execute_install_scripts
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'execute_install_scripts'
##[debug]=> 'true'
##[debug]Result: 'true'
##[debug]Evaluating: inputs.debug
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'debug'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.packages
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'packages'
##[debug]=> 'libsndfile-dev'
##[debug]Result: 'libsndfile-dev'
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Loading env
Run ${GITHUB_ACTION_PATH}/pre_cache_action.sh \
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/work/_temp/30529476-23b1-4005-aafd-84147dc5909d.sh
19:18:53.117 Normalizing package list...
19:18:54.069 done
19:18:54.072 Validating action arguments (version='0.0.1', packages='')...
19:18:54.075 aborted
19:18:54.076 Packages argument cannot be empty.
Error: Process completed with exit code 3.
##[debug]Finished: run
##[debug]Evaluating condition for step: 'run'
.....

Below this line there was no mention of the libsndfile library or anything similair or interesting
danmou commented 2 months ago

I have the exact same problem, also with libsndfile-dev.

Edit: And libcairo-dev too

patbenatar commented 2 months ago

Same problem here, with libvips

yenshirak commented 1 month ago

@patbenatar The problem is that the name of the package isn't libvips. On Ubuntu 22.04 it's libvips42 and on 24.04 it's libvips42t64. You can check the actual package name by running: sudo apt-get install -y libvips.

BTW I think that the current behaviour is super confusing. Since apt-get install works with libvips I guess it should be possible to get the actual package name automatically.