[Fedora-directory-commits] setuputil/installer/unix installer.cc, 1.2, 1.3 product.cc, 1.1.1.1, 1.2 product.h, 1.1.1.1, 1.2

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Tue Dec 13 20:58:30 UTC 2005


Author: nhosoi

Update of /cvs/dirsec/setuputil/installer/unix
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31687

Modified Files:
	installer.cc product.cc product.h 
Log Message:
[175418] Admin Server ns-update crashes if necessary attribute-value is not given
1) Although Admin Server's PostInstall program ns-update expects it, PostInstall
framework in SetupUtil does not take silent install option "-s".  Changed to pass the option.
2) PostInstall framework does not support logging. Changed to pass the option.
3) PostInstall failure is issued as WARNING and the installation finishes with
Success message even though it really failed.  Increased the error level to FATAL.



Index: installer.cc
===================================================================
RCS file: /cvs/dirsec/setuputil/installer/unix/installer.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- installer.cc	26 Oct 2005 16:38:16 -0000	1.2
+++ installer.cc	13 Dec 2005 20:58:22 -0000	1.3
@@ -27,6 +27,14 @@
 **
 ** HISTORY:
 ** $Log$
+** Revision 1.3  2005/12/13 20:58:22  nhosoi
+** [175418] Admin Server ns-update crashes if necessary attribute-value is not given
+** 1) Although Admin Server's PostInstall program ns-update expects it, PostInstall
+** framework in SetupUtil does not take silent install option "-s".  Changed to pass the option.
+** 2) PostInstall framework does not support logging. Changed to pass the option.
+** 3) PostInstall failure is issued as WARNING and the installation finishes with
+** Success message even though it really failed.  Increased the error level to FATAL.
+**
 ** Revision 1.2  2005/10/26 16:38:16  rmeggins
 ** Bug(s) fixed: 171793
 ** Bug Description: Change setuputil version to 1.0
@@ -1566,7 +1574,8 @@
       }
       else
       {
-         err = product.postInstall(_serverRoot,_sourceDir, _infoFile, _installInfo);
+         err = product.postInstall(_serverRoot, _sourceDir,
+						 _infoFile, _installInfo, _installMode, _logFile);
       }
 
       _dialogManager->disableWinMode();
@@ -1578,7 +1587,8 @@
          product.skip(True);
          if (_installMode == Silent)
          {
-            setupLogMessage(WARN, "Setup", "Failure installing %s\n.", product.get(PKG_NAME));
+            setupLogMessage(FATAL, "Setup", "Failure installing %s\n.", product.get(PKG_NAME));
+            return err;
          }
          else
          {
@@ -1599,6 +1609,8 @@
       if (p->isSelected() && !p->skipped())
       {
          err = doPreOrPostInstall(*p, which);
+         if (err)
+            return err;
       }
    }
 


Index: product.cc
===================================================================
RCS file: /cvs/dirsec/setuputil/installer/unix/product.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- product.cc	29 Jul 2005 22:16:32 -0000	1.1.1.1
+++ product.cc	13 Dec 2005 20:58:22 -0000	1.2
@@ -27,6 +27,14 @@
 **
 ** HISTORY:
 ** $Log$
+** Revision 1.2  2005/12/13 20:58:22  nhosoi
+** [175418] Admin Server ns-update crashes if necessary attribute-value is not given
+** 1) Although Admin Server's PostInstall program ns-update expects it, PostInstall
+** framework in SetupUtil does not take silent install option "-s".  Changed to pass the option.
+** 2) PostInstall framework does not support logging. Changed to pass the option.
+** 3) PostInstall failure is issued as WARNING and the installation finishes with
+** Success message even though it really failed.  Increased the error level to FATAL.
+**
 ** Revision 1.1.1.1  2005/07/29 22:16:32  foxworth
 ** Importing new setup sdk for open source project
 **
@@ -1308,7 +1316,7 @@
 }
 
 int
-Product::postInstall(const NSString & serverRoot, const NSString & sourceDir, const char *infoFile, const InstallInfo *installInfo) const
+Product::postInstall(const NSString & serverRoot, const NSString & sourceDir, const char *infoFile, const InstallInfo *installInfo, InstallMode installMode, const char *logFile) const
 {
    NSString program;
    NSString source;
@@ -1336,6 +1344,11 @@
          program = program + " -r";
       }
 
+      if (installMode == Silent)
+      {
+         program = program + " -s -l " + logFile;
+      }
+
       err = InstUtil::execProgram(program, source);
    }
 


Index: product.h
===================================================================
RCS file: /cvs/dirsec/setuputil/installer/unix/product.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- product.h	29 Jul 2005 22:16:32 -0000	1.1.1.1
+++ product.h	13 Dec 2005 20:58:22 -0000	1.2
@@ -28,6 +28,14 @@
 ** HISTORY
 **
 ** $Log$
+** Revision 1.2  2005/12/13 20:58:22  nhosoi
+** [175418] Admin Server ns-update crashes if necessary attribute-value is not given
+** 1) Although Admin Server's PostInstall program ns-update expects it, PostInstall
+** framework in SetupUtil does not take silent install option "-s".  Changed to pass the option.
+** 2) PostInstall framework does not support logging. Changed to pass the option.
+** 3) PostInstall failure is issued as WARNING and the installation finishes with
+** Success message even though it really failed.  Increased the error level to FATAL.
+**
 ** Revision 1.1.1.1  2005/07/29 22:16:32  foxworth
 ** Importing new setup sdk for open source project
 **
@@ -309,11 +317,13 @@
    NSString install(const NSString & serverRoot, const NSString & source, NVPair *installInfo);
 
    int preInstall(const NSString & serverRoot, const NSString &sourceDir, 
-           const char *installType, 
-           InstallMode installMode, const char *logFile, 
-           const char *cache) const;
-
-   int postInstall(const NSString & serverRoot, const NSString & sourceDir, const char *infoFile, const InstallInfo *nvpair) const;
+                  const char *installType, 
+                  InstallMode installMode, const char *logFile, 
+                  const char *cache) const;
+
+   int postInstall(const NSString & serverRoot, const NSString & sourceDir,
+                   const char *infoFile, const InstallInfo *nvpair,
+                   InstallMode installMode, const char *logFile) const;
 
    NSString extract(const char *dest, const char *archive, 
                     const char *extractProgram=NULL,




More information about the Fedora-directory-commits mailing list