# Poudriere and FreeBSD repos



## cellini (Aug 22, 2015)

Having problem with 2 repos but I can't get pkg(8) to just get packets from one it picks random repo even when all the packages I ask for is in one of them.


```
New packages to be INSTALLED:
  plexhometheater: 1.4.1_1 [poudriere]
  libmicrohttpd: 0.9.37_1 [FreeBSD]
  tinyxml: 2.6.2_1 [FreeBSD]
  libva: 1.5.1 [FreeBSD]
  librtmp: 2.4.20130923 [FreeBSD]
  libcec: 2.2.0 [FreeBSD]
  libass: 0.12.1 [FreeBSD]
  fribidi: 0.19.2_3 [poudriere]
  enca: 1.13_1 [FreeBSD]
  recode: 3.6_12 [FreeBSD]
  p5-Unicode-Map8: 0.13_1 [FreeBSD]
  p5-Unicode-String: 2.09_1 [FreeBSD]
  py27-pillow: 2.9.0 [poudriere]
  py27-tkinter: 2.7.10_5 [poudriere]
  tk86: 8.6.4 [FreeBSD]
  tcl86: 8.6.4 [FreeBSD]
  mesa-demos: 8.2.0_2 [FreeBSD]
  glew: 1.12.0 [FreeBSD]
  libplist: 1.12 [FreeBSD]
  py27-sqlite3: 2.7.10_6 [poudriere]
  libshairport: 1.2.0.20310_2 [FreeBSD]
  libmodplug: 0.8.8.5_2 [FreeBSD]

The process will require 125 MiB more space.
37 MiB to be downloaded.

Proceed with this action? [y/N]:
```


----------



## talsamon (Aug 22, 2015)

`pkg install -r reponame packagename(s)`. or `pkg update -r reponame`.


----------



## SirDice (Aug 23, 2015)

To disable the standard FreeBSD one, create /usr/local/etc/pkg/repos/FreeBSD.conf:

```
FreeBSD: {
 enabled: no
}
```


----------



## cellini (Aug 23, 2015)

Not exactly what I want, I want to have different priority, on the separate repos, so pkg will pick the one with the highest priority,

```
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
  priority: 0
}
```


```
poudriere: {
  url: "ip adress of host.",
  mirror_type: "http",
  signature_type: "pubkey",
  pubkey: "/usr/local/etc/ssl/certs/pkg.cert",
  enabled: yes
  priority: 100
}
```

but now it still picks random between them.


----------



## talsamon (Aug 23, 2015)

Then priority will have nearly the same function as enabled.


----------



## cellini (Aug 23, 2015)

Yeah but it doesn't seem to work.  It seems to install the main package from the right repo, but the some or all of the depends are from the second repo?  Is this a bug in `pkg`?


----------



## talsamon (Aug 23, 2015)

Sometimes I had/have the problem it tries to install from the wrong repo, then I comment out all other repos.  But I never had the "mixed" problem.


----------



## SirDice (Aug 24, 2015)

It's probably best not to mix your own repository with the default FreeBSD one. There's bound to be differences in options which could result in weird conflicts.


----------



## kpa (Aug 24, 2015)

Ideally the priority would make pkg(8) to choose packages from the higher priority repo first but since all the dependencies are fixed there are bound to be cases where it insists on installing a package from the lower priority repo because of a dependency that can't be changed.


----------



## cellini (Aug 26, 2015)

Then I disabled the original FreeBSD repository, and only enable it if i need to test some new program without having to compile it. Worst case I have to add it to my poudriere repository. but is there a way to not use all the cores when compiling? 

I mean to get poudriere to build with 6 cores instead of 8 ?


----------



## SirDice (Aug 26, 2015)

More or less, see /usr/local/etc/poudriere.conf.sample:

```
# parallel build support.
#
# By default poudriere uses hw.ncpu to determine the number of builders.
# You can override this default by changing PARALLEL_JOBS here, or
# by specifying the -J flag to bulk/testport.
#
# Example to define PARALLEL_JOBS to one single job
# PARALLEL_JOBS=1

# How many jobs should be used for preparing the build? These tend to
# be more IO bound and may be worth tweaking. Default: Same as PARALLEL_JOBS
# PREPARE_PARALLEL_JOBS=1
```


----------



## cellini (Aug 26, 2015)

Perfect 

```
PARALLEL_JOBS=6
```
it worked like a charm, thanks for all the great feedback


----------



## hukadan (Aug 26, 2015)

There are two Git issues that I find worth mentioning when dealing with multiple repositories. The first one concerns the problem you spoke about (it has been tagged as *"fixed in git" *22 days ago). Among other information :


> Priorities are not taken into consideration when selecting dependencies. They work merely for top-level packages. For dependencies pkg always prefer same-repo policy.


The second one is indirectly related to the problem detailed in this thread since it concerns upgrades with multiple repositories.


----------

