Portupgrade cannot find packages, why?

Hi everyone,

I am having a weird issue. I have a set of jails which were created with ezjail. One of them is supposed to be used to build packages. It is configured to store built packages in /var/ports/packages/. I have this directory mounted in other jails at the same location with nullfs.

When I run portupgrade in a jail, this one never finds the packages located there. So it uses the ports, compiles, installs and builds the packages to store them... in the exact same place. This takes of course way too much time. What shall I check to ensure that everything is set properly?

Thank you.
 
Xosted said:
One of them is supposed to be used to build packages. It is configured to store built packages in /var/ports/packages/. I have this directory mounted in other jails at the same location with nullfs.
Packages should be stored in /usr/ports/packages/ for the system to find them automatically.
 
So you are saying that your build-jail does not recognize output from old runs? Or what is your actual problem?
Are you able to install packages that you have placed into the directory specified?

Quoting # man pkg_create
-n Run in ``no clobber'' mode. If a package tarball exists, the
pkg_create utility will not overwrite it. This is useful, for
example, when multiple packages are saved with several consecu-
tive runs of pkg_create with the -Rb options. Saving common
dependencies multiple times would do a lot of duplicate work in
this case. The -n option avoids repackaging common dependencies
multiple times.

and from # man portupgrade
-P
--use-packages Use packages instead of ports whenever available.
portupgrade searches the local directories listed
in PKG_PATH for each package to install or upgrade
the current installation with, and if none is
found, pkg_fetch(1) is invoked to fetch one from a
remote site. If it doesn't work either, the port
is used.

-PP
--use-packages-only Never use the port even if a package is not avail-
able either locally or remotely, although you
still have to keep your ports tree up-to-date so
that portupgrade can check out what the latest
version of each port is.

Two helpful things for the future: formulating a good question is hard - do you understand your own question? Secondly - trying to solve the problem on your own is often much more rewarding.
 
Hi thank you for your answer.
I didn't realize that my question was so confusing.

But bottom line is that the PKG_PATH variable is the problem.
I didn't suspect it because I have this line :
[CMD=""]setenv PKG_PATH /var/ports/packages/Latest[/CMD]
in each .cshrc in each jail.
But if I use the [CMD=""]echo[/CMD] command, the variable appears undefined.

How do I set this variable to be permanent in each jail?
 
Back
Top