17 # fields enclosed by brackets "[]" replaced with your own identifying |
17 # fields enclosed by brackets "[]" replaced with your own identifying |
18 # information: Portions Copyright [yyyy] [name of copyright owner] |
18 # information: Portions Copyright [yyyy] [name of copyright owner] |
19 # |
19 # |
20 # CDDL HEADER END |
20 # CDDL HEADER END |
21 # |
21 # |
22 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
22 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
23 # |
23 # |
24 # |
24 # |
25 # userland-mangler - a file mangling utility |
25 # userland-mangler - a file mangling utility |
26 # |
26 # |
27 # A simple program to mangle files to conform to Solaris WOS or Consoldation |
27 # A simple program to mangle files to conform to Solaris WOS or Consoldation |
289 manifest.actions.remove(action) |
289 manifest.actions.remove(action) |
290 for action in manifest.gen_actions_by_type("license"): |
290 for action in manifest.gen_actions_by_type("license"): |
291 manifest.actions.remove(action) |
291 manifest.actions.remove(action) |
292 |
292 |
293 # Check for pkg.obsolete and if found, remove any depend actions. |
293 # Check for pkg.obsolete and if found, remove any depend actions. |
|
294 # Also remove any require dependency on the release/evalauation |
|
295 # package for renamed packages. |
294 manifest_is_obsolete = False |
296 manifest_is_obsolete = False |
|
297 manifest_is_renamed = False |
295 |
298 |
296 for action in manifest.gen_actions_by_type("set"): |
299 for action in manifest.gen_actions_by_type("set"): |
297 if (action.attrs["name"] == "pkg.obsolete" and |
300 if (action.attrs["name"] == "pkg.obsolete" and |
298 action.attrs["value"] == "true"): |
301 action.attrs["value"] == "true"): |
299 manifest_is_obsolete = True |
302 manifest_is_obsolete = True |
|
303 if (action.attrs["name"] == "pkg.renamed" and |
|
304 action.attrs["value"] == "true"): |
|
305 manifest_is_renamed = True |
300 |
306 |
301 if manifest_is_obsolete: |
307 if manifest_is_obsolete: |
302 for action in manifest.gen_actions_by_type("depend"): |
308 for action in manifest.gen_actions_by_type("depend"): |
303 manifest.actions.remove(action) |
309 manifest.actions.remove(action) |
|
310 |
|
311 if manifest_is_renamed: |
|
312 for action in manifest.gen_actions_by_type("depend"): |
|
313 if (action.attrs["type"] == "require" and |
|
314 action.attrs["fmri"] == "release/evaluation"): |
|
315 manifest.actions.remove(action) |
304 |
316 |
305 def load_manifest(manifest_file): |
317 def load_manifest(manifest_file): |
306 manifest = pkg.manifest.Manifest() |
318 manifest = pkg.manifest.Manifest() |
307 manifest.set_content(pathname=manifest_file) |
319 manifest.set_content(pathname=manifest_file) |
308 |
320 |