Changeset ferringb%2Fpkgcore-dev,3499
- Timestamp:
- 06/28/08 12:00:15 (8 weeks ago)
- Author:
- Brian Harring <ferringb@…>
- Message:
-
add configurable to control installing binpkgs from the target_repo back into the target_repo; generally undesired to have that occur, but could be useful for customizing a pkg contents set
- Location:
- ferringb/pkgcore-dev
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r3496
|
r3499
|
|
| 4 | 4 | See ChangeLog for full commit logs; this is summarized/major changes. |
| 5 | 5 | |
| | 6 | |
| | 7 | * add 'skip_if_source' option to misc. binpkg merging triggers- defaults to |
| | 8 | True, controls whether or not if a pkg from the target_repo should be |
| | 9 | reinstalled to the repo. |
| 6 | 10 | |
| 7 | 11 | * make contentsSet.map_directory_structure go recursive- |
-
|
r~3474
|
r3499
|
|
| 603 | 603 | |
| 604 | 604 | pkgcore_config_type = ConfigHint({'target_repo':'ref:repo', |
| 605 | | 'pristine':'bool'}, typename='trigger', required=['target_repo']) |
| 606 | | |
| 607 | | def __init__(self, target_repo, pristine=True): |
| | 605 | 'pristine':'bool', 'skip_if_source':'bool'}, typename='trigger', |
| | 606 | required=['target_repo']) |
| | 607 | |
| | 608 | def __init__(self, target_repo, pristine=True, skip_if_source=True): |
| 608 | 609 | if not pristine: |
| 609 | 610 | self._hooks = ('pre_merge',) |
| 610 | 611 | self.required_csets = ('install',) |
| | 612 | self.skip_if_source = skip_if_source |
| 611 | 613 | self.target_repo = target_repo |
| 612 | 614 | |
| 613 | 615 | def trigger(self, engine, cset): |
| 614 | 616 | pkg = getattr(engine, self._copy_source) |
| | 617 | if self.skip_if_source and getattr(pkg, 'repo') == self.target_repo: |
| | 618 | return |
| | 619 | |
| 615 | 620 | old_pkg = self.target_repo.match(pkg.versioned_atom) |
| 616 | 621 | wrapped_pkg = MutatedPkg(pkg, {'contents':cset}) |