Fix tag plugin 74/253674/2
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 16 Feb 2021 08:40:08 +0000 (17:40 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 18 Feb 2021 08:15:41 +0000 (17:15 +0900)
When certain tag has removed during package update and
plugin related with it has executed, "removed" plugin
should be executed. But there are no tag in manifest so
nullptr will be delivered into plugin.

Change-Id: I9373934d7f7a317e2e9ea59cd5ee5efc8ef7b7ea
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/common/plugins/tag_plugin.cc

index 7e9b5c4..c97a409 100644 (file)
@@ -95,7 +95,7 @@ bool TagPlugin::Run(xmlDocPtr doc_ptr, manifest_x* manifest,
          ActionType action_type) {
   xmlDocPtr plugin_doc_ptr = CreateDocPtrForPlugin(doc_ptr,
                                                    plugin_info_.name());
-  if (!plugin_doc_ptr)
+  if (!plugin_doc_ptr && action_type_ != Plugin::ActionType::Removed)
     return false;
 
   int result = 0;