Web lists-archives.com

Re: Q: How to get build depends package from debian/control

Reply Inline

On 02/12/2018 04:22 AM, Hideki Yamane wrote:
> Hi,
>  I've imported some git repo to salsa and tried to use its CI via
>  debian/.gitlab-ci.yml. As a harness, I want just get build dependency
>  packages and build source. Then, what's the simple way to get it?
>  "apt-get build-dep" depends on uploaded package, not source in repo,
>  so it'd fail if its dependency would be changed. Using dpkg-scanpackages
>  is bit tough to parse output.
I recently got this really neat hack from a Debian Developer
Balasankar's .gitlab-ci.yml file.
As I can see you have got an answer in the thread. just FYI, this is
another way to do it.

- export BUILD_DEPENDS=`perl -ne 'next if /^#/;
$p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg;
print if $p' < debian/control`

- apt-get install -y --no-install-recommends$BUILD_DEPENDS
The first is a neat perl hack to get the build-depends from the control
file, and the second line installs them nicely.

>  Any suggestions?