524 if not pkg.version: |
524 if not pkg.version: |
525 pkg.version = "%s-%s" % (def_vers, pkg_branch) |
525 pkg.version = "%s-%s" % (def_vers, pkg_branch) |
526 elif "-" not in pkg.version: |
526 elif "-" not in pkg.version: |
527 pkg.version += "-%s" % pkg_branch |
527 pkg.version += "-%s" % pkg_branch |
528 |
528 |
529 # add description actions |
529 # add description actions |
530 if pkg.desc: |
530 if pkg.desc: |
531 pkg.actions.append( actions.attribute.AttributeAction(None, |
531 pkg.actions.append(actions.attribute.AttributeAction(None, |
532 name="pkg.description", value=pkg.desc)) |
532 name="pkg.description", value=pkg.desc)) |
533 |
|
534 if pkg.summary: |
533 if pkg.summary: |
535 pkg.actions.extend([ |
534 pkg.actions.append(actions.attribute.AttributeAction(None, |
536 actions.attribute.AttributeAction(None, |
535 name="pkg.summary", value=pkg.summary)) |
537 name="pkg.summary", value=pkg.summary), |
|
538 actions.attribute.AttributeAction(None, |
|
539 name="description", value=pkg.summary) |
|
540 ]) |
|
541 if pkg.classification: |
536 if pkg.classification: |
542 pkg.actions.append(actions.attribute.AttributeAction(None, |
537 pkg.actions.append(actions.attribute.AttributeAction(None, |
543 name="info.classification", value=pkg.classification)) |
538 name="info.classification", value=pkg.classification)) |
544 |
539 |
545 # add dependency on consolidation incorporation if not obsolete or renamed |
540 # add dependency on consolidation incorporation if not obsolete |
|
541 # or renamed |
546 if pkg.consolidation and not pkg.obsolete_branch and not pkg.rename_branch: |
542 if pkg.consolidation and not pkg.obsolete_branch and not pkg.rename_branch: |
547 action = actions.fromstr( |
543 action = actions.fromstr( |
548 "depend fmri=consolidation/%s/%s-incorporation " |
544 "depend fmri=consolidation/%s/%s-incorporation " |
549 "type=require importer.no-version=true" % |
545 "type=require importer.no-version=true" % |
550 (pkg.consolidation, pkg.consolidation)) |
546 (pkg.consolidation, pkg.consolidation)) |
859 """ generate dependency action for hardlinks; action is the |
855 """ generate dependency action for hardlinks; action is the |
860 hardlink action we're analyzing""" |
856 hardlink action we're analyzing""" |
861 target = action.attrs["target"] |
857 target = action.attrs["target"] |
862 path = action.attrs["path"] |
858 path = action.attrs["path"] |
863 if not target.startswith("/"): |
859 if not target.startswith("/"): |
864 target = os.path.normpath( os.path.join(os.path.split(path)[0], |
860 target = os.path.normpath(os.path.join(os.path.split(path)[0], |
865 target)) |
861 target)) |
866 return [actions.fromstr( |
862 return [actions.fromstr( |
867 "depend importer.file=%s fmri=none type=require importer.source=hardlink" % |
863 "depend importer.file=%s fmri=none type=require importer.source=hardlink" % |
868 target)] |
864 target)] |
869 |
865 |