Print this page
pkg: If the adjunct proto is a package image, use it for dependency resolution

Split Close
Expand all
Collapse all
          --- old/usr/src/pkg/Makefile
          +++ new/usr/src/pkg/Makefile
↓ open down ↓ 242 lines elided ↑ open up ↑
 243  243  #
 244  244  # Track the synthetic manifests separately so we can properly express
 245  245  # build rules and dependencies.  The synthetic and real packages use
 246  246  # different sets of transforms and macros for pkgmogrify.
 247  247  #
 248  248  SYNTH_PKGS= osnet-incorporation osnet-redist
 249  249  DEP_SYNTH_PKGS= $(SYNTH_PKGS:%=$(PDIR)/%.dep)
 250  250  PROC_SYNTH_PKGS= $(SYNTH_PKGS:%=$(PDIR)/%.mog)
 251  251  
 252  252  #
 253      -# Root of pkg image to use for dependency resolution
 254      -# Normally / on the machine used to build the binaries
      253 +# Root of pkg image to use for dependency resolution Normally / on the machine
      254 +# used to build the binaries, or the ADJUNCT_PROTO
 255  255  #
 256      -PKGDEP_RESOLVE_IMAGE = /
      256 +PKG_ADJUNCT.cmd= if [[ -d $${ADJUNCT_PROTO}/var/pkg ]]; then \
      257 +                echo $$ADJUNCT_PROTO; \
      258 +        else    \
      259 +                echo /; \
      260 +        fi
      261 +
      262 +PKGDEP_RESOLVE_IMAGE = $(PKG_ADJUNCT.cmd:sh)
 257  263  
 258  264  #
 259  265  # For each package, we determine the target repository based on
 260  266  # manifest-embedded metadata.  Because we make that determination on
 261  267  # the fly, the publication target cannot be expressed as a
 262  268  # subdirectory inside the unknown-by-the-makefile target repository.
 263  269  #
 264  270  # In order to limit the target set to real files in known locations,
 265  271  # we use a ".pub" file in $(PDIR) for each processed manifest, regardless
 266  272  # of content or target repository.
↓ open down ↓ 474 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX