|
Node Director
|
Debian Package Handler. More...
Public Member Functions | |
| DEBPackageHandler () | |
| DEBPackageHandler (String name) | |
| Vector | pkgFromFile (String filename, Options opts) |
| void | install (RemoteJob job) throws DirectorException |
| void | remove (RemoteJob job) throws DirectorException |
| Vector | inventory () |
| String | makeTaskPackage (DBObject dbo, String file, String distRoot, String name) throws DirectorException |
| void | aptInstall (RemoteJob job) throws DirectorException |
| Install one package via apt-get. | |
| void | aptRemove (RemoteJob job) throws DirectorException |
| Remove one package via apt-get. | |
Public Member Functions inherited from sfi.director.application.FilePackageHandler | |
| FilePackageHandler (String name) | |
| String | name () |
| Vector | pkgFromFile (String filename, sfi.director.util.Options opts) |
| PackageInstaller | installerFor (DBObject pkg, DBObject repository, DBObject host) |
| returns an PackageInstaller object if package can be installed by this handler, null otherwise. | |
| JobNode | installPkg (FilePackageInstaller installer, DBObject pkg, DBObject repository, DBObject host) |
| return a job installing exactly one package. | |
| JobNode | removePkg (FilePackageInstaller installer, DBObject pkg, DBObject repository, DBObject host) |
| return a job removing exactly one package. | |
| JobNode | flushPkgs (FilePackageInstaller installer, DBObject host) |
| return a job cleaning up after successfull install/remove. | |
| JobNode | cleanupPkgs (FilePackageInstaller installer, DBObject host) |
| return a job cleaning up after unsuccessfull install/remove. | |
| void | setupJob (RemoteJob job, DBObject pkg, DBObject repository, DBObject host) |
| boolean | accept (RemoteJob job) |
| Connection | connect (final RemoteJob job) |
Public Member Functions inherited from sfi.director.util.FWManagerDriver | |
| Connection | connect (RemoteJob job) |
Static Public Member Functions | |
| static String | makeTaskPackage (Vector pkgList, String file, String distRoot, String name) throws DirectorException |
Protected Member Functions | |
| void | targetInstallPkgs (Vector pkgs) throws DirectorException |
| install a whole bunch of packages. | |
| void | targetRemovePkgs (Vector pkgs) throws DirectorException |
| remove a whole bunch of packages. | |
| Vector | aptPkgFromFile (String filename, Options opts) |
| Taking a filename as an argument, aptPkgFromFile reads a list of package names from the file and gets their info from apt-cache show. | |
Protected Member Functions inherited from sfi.director.application.FilePackageHandler | |
| boolean | isResponsibleFor (DBObject pkg, DBObject repository, DBObject host) |
| returns true if handler feels responsible for this type of packages. | |
| PackageInstaller | installer () |
| PackageInstaller | simpleInstaller () |
| JobNode | makeJob (String mode, FilePackageInstaller installer, DBObject pkg, DBObject repository, DBObject host) |
| void | flush (RemoteJob job) throws DirectorException |
| void | cleanup (RemoteJob job) throws DirectorException |
| String | listFileName (RemoteJob job) throws DirectorException |
| void | addToList (RemoteJob job, String mode) throws DirectorException |
| void | addToList (RemoteJob job, String mode, File file) throws DirectorException |
| DBSet | readList (RemoteJob job) throws DirectorException |
| void | makeAndRunCommand (String cmdroot[], Vector args) throws DirectorException |
Static Protected Member Functions | |
| static Vector | parseDepends (String list) |
| static String | colonfix (String version) |
| static String | colonunfix (String version) |
| static DBObject | textToPkg (Enumeration lines) |
| static DBObject | inventoryPkg (String name, boolean isFile) |
| static String | makeDependency (String pkg) |
Additional Inherited Members | |
Static Protected Attributes inherited from sfi.director.application.FilePackageHandler | |
| static String | MODE_INSTALL = "install" |
| static String | MODE_REMOVE = "remove" |
| static String | MODE_FLUSH = "flush" |
| static String | MODE_CLEANUP = "cleanup" |
Debian Package Handler.
Handles .deb packages via dpkg commands. Also attempts to handle packages via - if pkgFromFile runs into a file called .apt it treats its contents as a list of names of packages this handler should treat using apt.
| sfi.director.application.DEBPackageHandler.DEBPackageHandler | ( | ) |
| sfi.director.application.DEBPackageHandler.DEBPackageHandler | ( | String | name | ) |
| void sfi.director.application.DEBPackageHandler.aptInstall | ( | RemoteJob | job | ) | throws DirectorException |
Install one package via apt-get.
References sfi.director.application.FilePackageHandler.name(), and sfi.director.util.Tools.ShellCommand().
Referenced by sfi.director.application.DEBPackageHandler.install().
|
protected |
Taking a filename as an argument, aptPkgFromFile reads a list of package names from the file and gets their info from apt-cache show.
References sfi.director.util.Tools.execUtility(), sfi.director.util.Options.getOption(), sfi.director.util.Tools.log(), sfi.director.application.DEBPackageHandler.textToPkg(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.application.DEBPackageHandler.pkgFromFile().
| void sfi.director.application.DEBPackageHandler.aptRemove | ( | RemoteJob | job | ) | throws DirectorException |
Remove one package via apt-get.
References sfi.director.application.FilePackageHandler.name().
Referenced by sfi.director.application.DEBPackageHandler.remove().
|
staticprotected |
Referenced by sfi.director.application.DEBPackageHandler.textToPkg().
|
staticprotected |
Referenced by sfi.director.application.DEBPackageHandler.makeDependency().
| void sfi.director.application.DEBPackageHandler.install | ( | RemoteJob | job | ) | throws DirectorException |
Reimplemented from sfi.director.application.FilePackageHandler.
References sfi.director.application.DEBPackageHandler.aptInstall().
| Vector sfi.director.application.DEBPackageHandler.inventory | ( | ) |
|
staticprotected |
|
staticprotected |
| String sfi.director.application.DEBPackageHandler.makeTaskPackage | ( | DBObject | dbo, |
| String | file, | ||
| String | distRoot, | ||
| String | name | ||
| ) | throws DirectorException |
|
static |
References sfi.director.util.TempFile.create(), sfi.director.util.Tools.execWait(), sfi.director.util.Setup.fileSeparator, sfi.director.repository.DBObject.getValue(), sfi.director.application.DEBPackageHandler.inventoryPkg(), sfi.director.util.Lock.LocalLock(), sfi.director.application.DEBPackageHandler.makeDependency(), sfi.director.application.FilePackageHandler.name(), sfi.director.util.Tools.removeDir(), sfi.director.util.Tools.ShellCommand(), sfi.director.util.Setup.tmpstorage, and sfi.director.util.Lock.unlock().
|
staticprotected |
References sfi.director.util.Tools.split().
Referenced by sfi.director.application.DEBPackageHandler.textToPkg().
| Vector sfi.director.application.DEBPackageHandler.pkgFromFile | ( | String | filename, |
| Options | opts | ||
| ) |
| void sfi.director.application.DEBPackageHandler.remove | ( | RemoteJob | job | ) | throws DirectorException |
Reimplemented from sfi.director.application.FilePackageHandler.
References sfi.director.application.DEBPackageHandler.aptRemove().
|
protected |
install a whole bunch of packages.
This method is run on target side if the default install()/remove()/flush() methods are active.
Reimplemented from sfi.director.application.FilePackageHandler.
References sfi.director.repository.DBObject.getValue(), sfi.director.util.Tools.log(), and sfi.director.util.Logger.NOTICE.
|
protected |
remove a whole bunch of packages.
This method is run on target side if the default install()/remove()/flush() methods are active.
Reimplemented from sfi.director.application.FilePackageHandler.
References sfi.director.repository.DBObject.getValue(), sfi.director.util.Tools.log(), and sfi.director.util.Logger.NOTICE.
|
staticprotected |
References sfi.director.application.DEBPackageHandler.colonfix(), sfi.director.repository.DBObject.getValue(), and sfi.director.application.DEBPackageHandler.parseDepends().
Referenced by sfi.director.application.DEBPackageHandler.aptPkgFromFile(), sfi.director.application.DEBPackageHandler.inventory(), and sfi.director.application.DEBPackageHandler.inventoryPkg().
1.8.1.2