# Poudriere - skip certain packages



## saiman (Nov 13, 2016)

Hello,

I'm using poudriere to build my packages. I noticed that if I need package A which depends on B then poudrier is going to build B first and then continue with A. Is there any way to skip the build on B and use and use pkg instead?


----------



## gkontos (Nov 13, 2016)

Doesn't it make sense that B should be build first?


----------



## saiman (Nov 13, 2016)

gkontos said:


> Doesn't it make sense that B should be build first?


Yes, it does. I need to build A because I've got some custom options/configuration there. I don't really need B, it's used just to be able to build A. That's why I wonder weather it's possible to install B from package and then just build A instead building all dependencies required to build A.


----------



## chrbr (Nov 13, 2016)

saiman said:


> That's why I wonder weather it's possible to install B from package and then just build A instead building all dependencies required to build A.


ports-mgmt/synth should be able to do that. A different appraoch with ports-mgmt/poudriere is devel/ccache which speeds up compiling things which have not been changed.


----------



## gkontos (Nov 13, 2016)

saiman said:


> Yes, it does. I need to build A because I've got some custom options/configuration there. I don't really need B, it's used just to be able to build A. That's why I wonder weather it's possible to install B from package and then just build A instead building all dependencies required to build A.



Poudriere has no way of knowing that. Like suggested above you could try a different package system.


----------



## hukadan (Nov 13, 2016)

I think the OP would like an option similar to the synth(1) *Fetch prebuilt packages* option. From the man page :


> When active, this option will scan the external repository for suitable prebuilt packages to satisfy build requirements. To be considered suitable, the ABI, options, and dependencies of the remote package must all match requirements. If a package is located, it will be fetched and placed in the packages directory and later incorporated into the local repository.



I am not aware of such a thing with poudriere(8) (I think it would not make much sense given the poudriere(8) general use case). So saiman you could use synth(1) to build your packages using the option I just mentioned.


----------



## saiman (Nov 13, 2016)

Thanks! I will try with synth.


----------



## ANOKNUSA (Nov 13, 2016)

ports-mgmt/synth will only fetch a dependency from the repository if the version of that dependency available in the official repository is of the same version or a later version than that in your local ports tree, which will not always be the case. When it is not the case, Synth will build the version of the dependency available in the ports tree.

Your options will then be to either continue on and let the dependency finish building, or wait a day or two until the package repository is up-to-date. Successfully building ports into packages is time-consuming, no matter how you do it.


----------



## Remington (Nov 13, 2016)

I use poudriere with ccache and it greatly reduce the compile time as the dependencies are already built in ccache directory.


----------



## marino (Nov 13, 2016)

ANOKNUSA is highlighting an important caveat for ports-mgmt/synth with the *fetch prebuilt binaries* option that often affects the trunk branch of ports (not so much the quarterly branches).

The binary packages are built weekly.  The ports tree is updated significantly every day.  If you update your ports tree and try to build, there's a good chance that the prebuilt binaries have been obsoleted.  In that case, synth will ignore the package and just rebuild it.  One way to minimize this effect is to only update the ports tree once per week (in sync with the freebsd packages).

To answer the original question: poudriere can't do it, portmaster can't do it, synth can do it but the option is off by default.  It can be easily reconfigured to do it.


----------



## Remington (Nov 14, 2016)

One good example compiling devel/llvm38 usually takes 3 hours on my server.  With ccache enabled and it only takes 15 - 30 minutes to recompile llvm38 but, of course, it'll take 3 hours to compile llvm for the first time if there are no updates to it.  Pourdriere usually deletes llvm if there are package updates that depends on it so recompiling llvm is quick since its object files are kept for future recompilation.  devel/ccache does make a big difference.


----------



## marino (Nov 14, 2016)

I like devel/ccache and use it (synth supports it too) but every now and then its use is the cause of a weird build failure and the only way to progress is to it turn it off or clear the entire cache (which should be done periodically anyway).


----------

