57   fVersion = 
"v5-16-00";
 
   58   fPlatform = 
"Linux-i686";
 
   59   fAliEnMainPackageDir = 
"/alice/packages";
 
   60   fInstallationDirectory = 
"/var/tmp/alien/packages";
 
   61   fPostInstallCommand = 
"post_install";
 
   65      Info (
"TAlienPackage",
 
   66            "\tPackage=%s Version=%s Platform=%s Installdir=%s AlienInstalldir=%s PostInstall=%s",
 
   67            fName.Data (), fVersion.Data (), fPlatform.Data (),
 
   68            fInstallationDirectory.Data (), fAliEnMainPackageDir.Data (),
 
   69            fPostInstallCommand.Data ());
 
   74      fInstallList = 
new TList ();
 
   76      fPackages = 
new TList ();
 
   79   fPackages->SetOwner (
kFALSE);
 
   87                             const char *installationdirectory) :
 
   88   fInstallList (0), fPackages (0), fDebugLevel (0)
 
  102      Info (
"TAlienPackage",
 
  103            "\tPackage=%s Version=%s Platform=%s Installdir=%s AlienInstalldir=%s PostInstall=%s",
 
  104            name, version, platform, installationdirectory,
 
  124      Info (
"~TAlienPackage", 
"\tDestr: Package=%s Version=%s Platform=%s",
 
  136      Info (
"Install", 
"\t\tInstalling Package=%s Version=%s Platform=%s",
 
  148   gSystem->
Exec(
Form(
"mkdir -p %s/%s/%s/%s ; touch  %s/%s/%s/%s/.safeguard",
 
  163      Form (
"%s/%s/%s/.alienEnvironment %s/%s/%s ",
 
  175            (
"test -e %s/%s/%s/%s/.safeguard && rm -rf %s/%s/%s",
 
  190   while (
result->GetFileName (i)) {
 
  209         Info (
"CheckDirectories", 
"\t%s/%s exists.", s.
Data (), 
name.Data ());
 
  214            Info (
"CheckDirectories", 
"\t%s/%s exist.", s.
Data (), version.
Data ());
 
  225         Error (
"CheckDirectories", 
"\t%s/%s does not exist.", s.
Data (), version.
Data ());
 
  228      Info (
"CheckDirectories", 
"\t%s/%s exists.", s.
Data (), 
name.Data ());
 
  254               (
"showTagValue -z %s/%s/%s PackageDef",
 
  261               "\tNo post install procedure defined in AliEn.");
 
  267            "\tDownloading PostInstall for Package=%s Version=%s",
 
  273      Error (
"PostInstall", 
"\tCannot download the PostInstall script %s!", post_install.
Data ());
 
  286            "\tExecuted PostInstall for Package=%s Version=%s ", 
name.Data (),
 
  304      TAlienPackage *
package = (TAlienPackage *) fPackages->At (j);
 
  305      fullline += package->GetEnable ();
 
  311   Info(
"Exec", 
"\t\tExecuting Package=%s Version=%s \"%s\"", 
fName.
Data (),
 
  333         Info (
"CheckDepencencies", 
"\tFound no dependencies ... ");
 
  343      Info (
"CheckDepencencies", 
"\tFound %d dependencies ... ",
 
  352         Info (
"CheckDependencies", 
"\t[%d] Dep. Package=%s", i,
 
  362      TString strObjPackage, strObjVersion;
 
  366            Warning(
"CheckDepencencies", 
"version string not found for j=%d (%s)", j, strObj->
GetName());
 
  370         Warning(
"CheckDepencencies", 
"package string not found for j=%d (%s)", j, strObj->
GetName());
 
  375         Info (
"CheckDepencencies", 
"\t[%d] Name=%s Version=%s", j,
 
  376               strObjPackage.
Data(), strObjVersion.
Data());
 
  390   Info (
"InstallSinglePackage", 
"\t%s %s", 
name.Data (), version.
Data ());
 
  410            Warning (
"InstallSinglePackage",
 
  411                     "\tPackage=%s exists in /%s directory.",
 
  413            Warning (
"InstallSinglePackage",
 
  414                     "\tYou might use function UnInstall() before Enable(), or do ReInstall() !!!!");
 
  423      Info (
"InstallSinglePackage", 
"\tCopying from alien://%s to %s ",
 
  429      Error (
"InstallSinglePackage", 
"\tCouldn't create directory %s !",
 
  435      Error (
"InstallSinglePackage", 
"\tCouldn't copy alien://%s -> %s",
 
  441      Info (
"InstallSinglePackage", 
"\tEntering directory %s ", s7.
Data ());
 
  444      Error (
"InstallSinglePackage", 
"\tCannot change into directory %s",
 
  450      Info (
"InstallSinglePackage", 
"\tUnpacking the package %s ...",
 
  456      Info (
"InstallSinglePackage", 
"\tUnpacking the package %s DONE ...",
 
  462      Info (
"InstallSinglePackage",
 
  463            "\tCopying PostInstall alien://%s/%s -> %s", s6.
Data (),
 
  467      Error (
"InstallSinglePackage",
 
  468             "\tPostInstall procedure failed for package %s failed!",
 
  483   Info (
"InstallAllPackages", 
"\tPackage=%s Version=%s", 
fName.
Data (),
 
  487      TAlienPackage *
package = (TAlienPackage *) fPackages->At (j);
 
  488      if (package && (package != 
this))
 
  501         Info (
"InstallAllPackages", 
"\tPackage=%s Version=%s",
 
  519            if (!newpackage->
Enable ()) {
 
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
 
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
 
R__EXTERN TSystem * gSystem
 
Bool_t CheckDependencies()
Check the dependency packages of this package.
 
TString GetPlatform() const
 
Bool_t PostInstall(TString name, TString version)
Execute post_install procedure for a package.
 
TString GetAliEnMainPackageDir() const
 
Bool_t UnInstall()
Uninstall a package e.g. remove it from the local disk.
 
TAlienPackage()
Default constructor of a AliEn package constructing a ROOT:v5-16-00 for Linux-i686.
 
TString fAliEnMainPackageDir
 
const char * GetEnable()
Return shell command to enable package.
 
TString fInstallationDirectory
 
Bool_t Exec(const char *cmdline)
Execute package command.
 
Bool_t InstallAllPackages()
Installs a package and all its direct dependencies.
 
Bool_t ReInstall()
Reinstalls a package e.g. uninstall + install.
 
Bool_t IsDirectory(const char *dir1, const char *str)
Check that <str> is listed in GRID directory <dir1>.
 
Bool_t InstallSinglePackage(TString name, TString version, Bool_t isDep=kFALSE)
Install a single package.
 
Bool_t Enable()
Install/enable an AliEn package on the local computer.
 
TString fPostInstallCommand
 
Bool_t CheckDirectories(TString name, TString version)
Check the name and version directory of package/version given.
 
virtual ~TAlienPackage()
Destructor.
 
virtual Int_t GetEntries() const
 
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
 
virtual Bool_t Cp(const char *dst, Bool_t progressbar=kTRUE, UInt_t buffersize=1000000)
Allows to copy this file to the dst URL.
 
virtual TGridResult * Ls(const char *="", Option_t *="", Bool_t=kFALSE)
 
virtual TGridResult * Command(const char *, Bool_t=kFALSE, UInt_t=2)
 
static TGrid * Connect(const char *grid, const char *uid=nullptr, const char *pw=nullptr, const char *options=nullptr)
The grid should be of the form: <grid>://<host>[:<port>], e.g.: alien://alice.cern....
 
void Clear(Option_t *option="") override
Remove all objects from the list.
 
void Add(TObject *obj) override
 
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
 
Int_t GetEntries() const override
Return the number of objects in array (i.e.
 
TObject * At(Int_t idx) const override
 
Collectable string class.
 
const TString & GetString() const
 
const char * GetName() const override
Returns name of object.
 
Mother of all ROOT objects.
 
const char * Data() const
 
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
 
virtual Int_t Exec(const char *shellcmd)
Execute a command.
 
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
 
virtual Bool_t ChangeDirectory(const char *path)
Change directory.