Skip to content

Commit 5f38b57

Browse files
committed
bugfix: fix tarantoolctl rocks on 1.10
The fix is to install appropriate version of the `tarantool-common` package. Fixes #36 Fixes #37
1 parent 16e0006 commit 5f38b57

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed

.github/workflows/test.yml

+29
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,32 @@ jobs:
364364
- name: Verify that the previous step fails
365365
run: |
366366
[ "${{ steps.install.outcome }}" = "failure" ]
367+
368+
test-rocks:
369+
# Ubuntu Jammy (22.04) has tarantool-2.6.0 in its repository.
370+
# The test verifies that tarantool-common-2.6.0 is not pulled
371+
# as a dependency, so this particular Ubuntu version is
372+
# acquired explicitly.
373+
runs-on: ubuntu-22.04
374+
env:
375+
TARANTOOL_CACHE_KEY_SUFFIX: -I-${{ github.run_id }}
376+
steps:
377+
- uses: actions/checkout@v4
378+
379+
# Verify non-cached installation. The cached one has exactly
380+
# same luarocks, no need to verify it.
381+
- name: Install 1.10
382+
uses: ./
383+
with:
384+
tarantool-version: '1.10'
385+
386+
# If luarocks 3 is installed instead of luarocks 2, this
387+
# command fails with the following error message.
388+
#
389+
# > module 'luarocks.core.cfg' not found
390+
#
391+
# See https://github.com/tarantool/tarantool/issues/5429 for
392+
# details.
393+
- name: Verify tarantoolctl rocks
394+
run: |
395+
tarantoolctl rocks list

dist/main/index.js

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,17 @@ async function run_linux(): Promise<void> {
353353
core.startGroup('Installing tarantool')
354354

355355
const dpkg_before = await dpkg_list()
356-
await exec.exec(
357-
`sudo apt-get install -y tarantool=${version}* tarantool-dev=${version}*`
358-
)
356+
357+
/*
358+
* The series-3 repository doesn't offer the tarantool-common
359+
* package.
360+
*/
361+
let pkgs = [`tarantool=${version}*`, `tarantool-dev=${version}*`]
362+
if (tarantool_version_major() < 3) {
363+
pkgs.push(`tarantool-common=${version}*`)
364+
}
365+
await exec.exec('sudo apt-get install -y ' + pkgs.join(' '))
366+
359367
const dpkg_after = await dpkg_list()
360368

361369
const dpkg_diff: Array<string> = Array.from(dpkg_after.values()).filter(

0 commit comments

Comments
 (0)