| 1 | # This is the bcfg2 support for blastwave packages (pkg-get) |
|---|
| 2 | '''This provides bcfg2 support for blastwave''' |
|---|
| 3 | __revision__ = '$Revision$' |
|---|
| 4 | |
|---|
| 5 | import Bcfg2.Client.Tools.SYSV, tempfile |
|---|
| 6 | |
|---|
| 7 | class Blast(Bcfg2.Client.Tools.SYSV.SYSV): |
|---|
| 8 | '''Support for Blastwave packages''' |
|---|
| 9 | pkgtype = 'blast' |
|---|
| 10 | pkgtool = ("/opt/csw/bin/pkg-get install %s", ("%s", ["bname"])) |
|---|
| 11 | name = 'Blast' |
|---|
| 12 | __execs__ = ['/opt/csw/bin/pkg-get', "/usr/bin/pkginfo"] |
|---|
| 13 | __handles__ = [('Package', 'blast')] |
|---|
| 14 | __ireq__ = {'Package': ['name', 'version', 'bname']} |
|---|
| 15 | |
|---|
| 16 | def __init__(self, logger, setup, config): |
|---|
| 17 | # dont use the sysv constructor |
|---|
| 18 | Bcfg2.Client.Tools.PkgTool.__init__(self, logger, setup, config) |
|---|
| 19 | noaskfile = tempfile.NamedTemporaryFile() |
|---|
| 20 | self.noaskname = noaskfile.name |
|---|
| 21 | try: |
|---|
| 22 | noaskfile.write(Bcfg2.Client.Tools.SYSV.noask) |
|---|
| 23 | except: |
|---|
| 24 | pass |
|---|
| 25 | |
|---|
| 26 | # VerifyPackage comes from Bcfg2.Client.Tools.SYSV |
|---|
| 27 | # Install comes from Bcfg2.Client.Tools.PkgTool |
|---|
| 28 | # Extra comes from Bcfg2.Client.Tools.Tool |
|---|
| 29 | # Remove comes from Bcfg2.Client.Tools.SYSV |
|---|
| 30 | |
|---|
| 31 | def FindExtraPackages(self): |
|---|
| 32 | '''Pass through to null FindExtra call''' |
|---|
| 33 | return [] |
|---|