Add new install option 28/212328/4
authorIlho Kim <ilho159.kim@samsung.com>
Tue, 20 Aug 2019 08:24:26 +0000 (17:24 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Wed, 21 Aug 2019 05:22:08 +0000 (14:22 +0900)
This option will be used for fast installation without optimization

Related changes
    [app-installers] https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/212328/
    [pkgmgr-tool] https://review.tizen.org/gerrit/#/c/platform/core/appfw/pkgmgr-tool/+/212326/
    [slp-pkgmgr] https://review.tizen.org/gerrit/#/c/platform/core/appfw/slp-pkgmgr/+/212327/

Change-Id: I5907597dcc3136278b26a7c020f9ef27a27cb1fa
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/common/installer_context.h
src/common/pkgmgr_interface.cc
src/common/pkgmgr_interface.h
src/common/step/configuration/step_configure.cc
src/common/step/configuration/step_configure.h

index a7674b5..7b70991 100644 (file)
@@ -359,6 +359,12 @@ class InstallerContext {
   Property<bool> debug_mode;
 
   /**
+   * \brief boolean property that indicates
+   *        the request is for skip optimization or not.
+   */
+  Property<bool> skip_optimization;
+
+  /**
   * \brief Property of vector of files to add
   */
   Property<std::vector<std::string>> files_to_add;
index a324d02..affb09d 100644 (file)
@@ -284,4 +284,8 @@ bool PkgMgrInterface::GetIsSkipCheckReference() const {
   return (pkgmgr_installer_get_skip_check_reference(pi_) == 1);
 }
 
+bool PkgMgrInterface::GetSkipOptimization() const {
+  return (pkgmgr_installer_get_skip_optimization(pi_) == 1);
+}
+
 }  // namespace common_installer
index 9cc52e6..3dc5387 100644 (file)
@@ -186,6 +186,13 @@ class PkgMgrInterface {
   bool GetIsSkipCheckReference() const;
 
   /**
+   * Returns True if the request is skip optimization. Otherwise, return false;
+   *
+   * \return True if the request is skip optimization. Otherwise, return false;
+   */
+  bool GetSkipOptimization() const;
+
+  /**
    * Get Raw pointer to pkgmgr_installer object
    * NOTE: It should not be used (PkgMgrInterface can destroy it
    *
index 996d4ec..77b14ad 100644 (file)
@@ -40,6 +40,7 @@ Step::Status StepConfigure::process() {
   SetupFileCreationMask();
   SetupDebugMode();
   SetupSkipCheckReference();
+  SetupSkipOptimization();
 
   if (!SetupRootAppDirectory())
     return Status::CONFIG_ERROR;
@@ -256,6 +257,10 @@ void StepConfigure::SetupSkipCheckReference() {
   context_->skip_check_reference.set(pkgmgr_->GetIsSkipCheckReference());
 }
 
+void StepConfigure::SetupSkipOptimization() {
+  context_->skip_optimization.set(pkgmgr_->GetSkipOptimization());
+}
+
 void StepConfigure::SetupMoveType() {
   int move_type = pkgmgr_->GetMoveType();
   switch (move_type) {
index c002552..b13a6b6 100644 (file)
@@ -67,6 +67,7 @@ class StepConfigure : public Step {
   void SetupIsPartialRW();
   void SetupDebugMode();
   void SetupSkipCheckReference();
+  void SetupSkipOptimization();
   void SetupMoveType();
 
   PkgMgrPtr pkgmgr_;