# Why doesn't make package make dependency packages?



## Chris_H (Jan 18, 2018)

Hello all,
 I'm building up a list of packages in a jail(8) from a list of ports(7) I have installed on a (dated) server I'm going to upgrade. I'm making a custom install DVD that I built $BASE, and the kernel for, and now I'm building all the packages that will need to be installed. But `[man=1]make[/man] package-recursive` _doesn't_ work the way I thought it did. IOW while `package-recursive` makes dependency packages I want, it *also* *re*makes all the packages already in packages/All! This is a total WOT!
How to make a package, and make the dependency packages _without_ *re*making already made packages?

Thanks!

--Chris


----------



## tobik@ (Jan 18, 2018)

Chris_H said:


> How to make a package, and make the package dependencies _without_ *re*making already made packages?


Use a package builder like Synth or Poudriere.


----------



## sidetone (Jan 18, 2018)

If you're making a package, the assumption is, it is made for others. Maybe it rebuilds as a preventative measure to keep that set of packages from being built on a repository that doesn't want them. That is, if it doesn't know which packages are build-only dependencies.

ports-mgmt/portmaster has an option to use packages for build-only dependencies.


----------



## Chris_H (Jan 18, 2018)

tobik@ said:


> Use a package builder like Synth or Poudriere.


I'm quite familiar with ports-mgmt/synth. In fact I _love_ it. But I think you missed the part where I said I'm building all this from within a jail(8) 
I'm pretty sure make(1), and or the ports(7) framework should provide for making packages of the dependencies. But I just haven't found the right incantation. 

Thank you very much for taking the time to reply, tobik@ !

--Chris


----------



## tobik@ (Jan 18, 2018)

Chris_H said:


> But I think you missed the part where I said I'm building all this from within a jail(8)


So? You can point Synth to the jail root and it'll build packages using it.


----------



## Chris_H (Jan 18, 2018)

sidetone said:


> If you're making a package, the assumption is, it is made for others. Maybe it rebuilds as a preventative measure to keep that set of packages from being built on a repository that doesn't want them. That is, if it doesn't know which packages are build-only dependencies.
> 
> ports-mgmt/portmaster has an option to use packages for build-only dependencies.


I caught that sidetone . I've done quite a bit of reading to try and figure out how to get the dependency packages built, and ports-mgmt/portmaster came up a few times. I may be forced to go that route. But I've been trying to avoid that for a couple reasons; 1) It's currently under _heavy_ re-development, in an effort to catch up with all the ports(7) framework changes in the last year, and 2) If it fails during the building of a meta-package, there's a lot of cleanup involved, that I'd like to avoid.

Thank you very much, sidetone , for taking the time to respond!

--Chris


----------



## Chris_H (Jan 18, 2018)

tobik@ said:


> So? You can point Synth to the jail root and it'll build packages using it.


But ports-mgmt/synth is a jail _itself_ -- actually a chroot(8). Which is kind of like putting a jail(8), in a jail(8). While it's perfectly _legal_. It's a bit messy, and not a very efficient way to accomplish the simple task of getting the ports(7) framework to make the dependency packages of the parent package. I also asked John ( marino ) about this (putting synth in a jail), when ports-mgmt/synth first hit the ports(7) tree. He also advised against it. He's fairly recently created Ravensport (I don't have the link handy). Which I'm _dying_ to try. But I'm waiting on some hardware (a new system) to dedicate to it. So haven't used it yet. But I plan to do _all_ my package building with it.

Is there really no way to get make(1), and or the ports(7) framework to make dependency packages of the parent package?

Thank you very much, tobik@ , for all your time, and trouble. 

EDIT:
I should also mention that host that these jail(8)s are running on is on 12-CURRENT. While the jail(8)s themselves, are 11.1-STABLE.


--Chris


----------



## marino (Jan 18, 2018)

It is overkill to run synth in a jail.
However, some entities require it by policy.
It's easy to do, see a FAQ relating to it: https://github.com/jrmarino/synth#synth-fails-when-i-run-it-inside-a-jail--what-can-i-do


----------



## sidetone (Jan 18, 2018)

Chris_H said:


> I caught that sidetone . I've done quite a bit of reading to try and figure out how to get the dependency packages built, and ports-mgmt/portmaster came up a few times. I may be forced to go that route. But I've been trying to avoid that for a couple reasons; 1) It's currently under _heavy_ re-development, in an effort to catch up with all the ports(7) framework changes in the last year, and 2) If it fails during the building of a meta-package, there's a lot of cleanup involved, that I'd like to avoid.



I kind of guessed you were aware of it. You're right about portmaster. It doesn't seem fully compatible with flavors, and that causes a few ports to not build.

It looks like the ports system needs to be updated, or there needs to be a simpler tool for it.

I wish there were something simple like portmaster, that would only rebuild a port if the package is not made with the same options, and is not up to date, as well as not build build-only dependencies.


----------



## Chris_H (Jan 18, 2018)

sidetone said:


> ...
> I wish there were something simple like portmaster, that would only rebuild a port if the package is not made with the same options, and is not up to date, as well as not build build-only dependencies.


Amen to _that_, brother! 
Me too!

--Chris


----------



## Chris_H (Jan 18, 2018)

In the end; short side of using a secondary tool, such as ports-mgmt/synth, ot ports-mgmt/portmaster. It appears the *only* way to accomplish getting dependency packages built for the parent package, is by feeding the output of
`make all-depends-list` to `make package`. Which IMHO reveals a _real_ flaw in the make(1), pkg(8), ports(7) framework. 

Thanks!

--Chris


----------

