Don't concatenate CI_PROJECT_DIR to absolute SALSA_CI_EXTRA_REPOSITORY_SOURCES
Fixes #545 (closed)
- When
SALSA_CI_EXTRA_REPOSITORY_SOURCESvariable is set via the GitLab web UI, its value is an absolute path, unconditionally concatenating CI_PROJECT_DIR to it produces a broken path and causes the sbuild extra repository setup to fail. CI_PROJECT_DIR is now only added if the value is a relative path. - This builds on the approach proposed by @santiago in his branch
fix-apt-sources-gitlab-ui, just replaced the perl syntax used there with the correct bash variable expansion.
I tested the issue as a salsa ci pipeline user , using a package that depends on a custom extra repository with both methods : via the web UI in a branch and via a .sources file in the repo in another branch , confirming that both cases now work correctly.
-
Absolute path (set via GitLab web UI)
- build job before MR : https://salsa.debian.org/ahmedashraf/django-tasks/-/jobs/9238611#L546 , Symptom at line 546:
cat: /builds/ahmedashraf/django-tasks//builds/ahmedashraf/django-tasks.tmp/SALSA_CI_EXTRA_REPOSITORY_SOURCES: No such file or directory - build job after MR: https://salsa.debian.org/ahmedashraf/django-tasks/-/jobs/9244470 , succeed
- build job before MR : https://salsa.debian.org/ahmedashraf/django-tasks/-/jobs/9238611#L546 , Symptom at line 546:
-
Relative path (set via a .sources file in the repo) , No problems here
- build job before MR : https://salsa.debian.org/ahmedashraf/django-tasks/-/jobs/9240059
- build job after MR: https://salsa.debian.org/ahmedashraf/django-tasks/-/jobs/9245017