Fix tag plugin 08/254008/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 16 Feb 2021 08:40:08 +0000 (17:40 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 22 Feb 2021 06:13:19 +0000 (06:13 +0000)
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>
(cherry picked from commit 8120a890e1a74b6c120bae4fb8044a4d363d21bd)

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;