[build2] How to import local dependencies with bpkg ?

Michael Martín Moro sexymimi64 at gmail.com
Sun Aug 14 13:25:30 UTC 2022


Hi !

First of all: I've been using build2 for a couple of days now, and it's
been a blast. It's got a steep learning curve, but the results are worth it.

Right now, I'm having trouble getting a bpkg configured directory to act as
a repository, and I was looking for some help.

## Scenario
I've got a library called libmy. I created a build directory for it using
bpkg create. From there, I can run `bpkg build libmy`, and when I run `bpkg
status libmy`, it tells me that it is "configured".

I want this directory to be used as a repository for another package. From
what I've read in the manuals, I'm guessing that to achieve that, `bpkg
status libmy` should tell me that libmy is "available", rather than
"configured".

How do I get to that state ?

## Attempting to link libmy with `bpkg add --type dir`
I tried running `bpkg add [directory] --type dir` on the dependent package.
The `bpkg add` command succeeds, but:
- When I do `bpkg build [package]`, it tells me it cannot satisfy libmy
dependency.
- When I do `bpkg fetch`, it tells me there are no "manifest file for
package in repository dir+[directory]"
I assume this happens precisely because libmy is just configured, and
making it available will generate the manifest and fix all my issues, right
?

## Attempting to link libmy from the system:
I've also tried installing libmy on my system. I ran a `bpkg install`,
before checking that `pkg-config libmy` was exiting with success status.
Then I tried running `bpkg build [package] ?sys:libmy`. It failed, telling
me that the `sys:libmy` package is unknown.

## `bpkg add --type pkg` ?
I've also noticed there was a `--type pkg` option for `bpkg add`, but I've
found little to no details about it. Is it pkg-config based ? Any
documentation as to how it works ?

Hopefully someone will read this and provide me with some guidance ! Thanks
for reading !

-- 
*Michaël Martín Moro*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20220814/47d0bb13/attachment.html>


More information about the users mailing list