tools/generate-history
branchs11u3-sru
changeset 7036 9bdfcd8747ba
parent 5632 4056b7992034
equal deleted inserted replaced
7035:4c2f26e9d5ab 7036:9bdfcd8747ba
     2 # Otherwise we expect to be invoked with TARGET=<whatever>, then if
     2 # Otherwise we expect to be invoked with TARGET=<whatever>, then if
     3 # s|/|---| on $1 matches TARGET, we generate a manifest.
     3 # s|/|---| on $1 matches TARGET, we generate a manifest.
     4 {
     4 {
     5   if (substr($1, 1, 1) == "#") { # Skip comments.
     5   if (substr($1, 1, 1) == "#") { # Skip comments.
     6     continue
     6     continue
       
     7   }
       
     8   if ($NF ~ /^arch=/) {
       
     9     arch=$NF;
       
    10     split(arch, a, "=")
       
    11     if (a[2] != MACH)
       
    12       continue
       
    13     NF--;
     7   }
    14   }
     8   fmri=$1
    15   fmri=$1
     9   split(fmri, a, "@")
    16   split(fmri, a, "@")
    10   gsub("/", "---", a[1])
    17   gsub("/", "---", a[1])
    11   target = sprintf("%s.p5m", a[1])
    18   target = sprintf("%s.p5m", a[1])
    15   }
    22   }
    16   if (target != TARGET) {
    23   if (target != TARGET) {
    17     continue
    24     continue
    18   }
    25   }
    19   printf "set name=pkg.fmri value=pkg:/%s\n", fmri
    26   printf "set name=pkg.fmri value=pkg:/%s\n", fmri
       
    27   if ($NF ~ /^incorporate=/) {
       
    28     incorporate=$NF;
       
    29     NF--;
       
    30   }
    20   if (NF == 2) {
    31   if (NF == 2) {
    21     print "set name=pkg.renamed value=true"
    32     print "set name=pkg.renamed value=true"
    22     printf "depend type=require fmri=%s\n", $2
    33     printf "depend type=require fmri=%s\n", $2
    23   } else {
    34   } else {
    24     print "set name=pkg.obsolete value=true"
    35     print "set name=pkg.obsolete value=true"
    25   }
    36   }
    26   print "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)"
    37   if (incorporate) {
       
    38     printf "set name=org.opensolaris.consolidation %s value=$(CONSOLIDATION)\n",
       
    39       incorporate
       
    40   } else {
       
    41     print "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)"
       
    42   }
    27   exit 0 # We're done; no point continuing.
    43   exit 0 # We're done; no point continuing.
    28 }
    44 }