Print entire given package path list 48/234148/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Fri, 22 May 2020 07:22:32 +0000 (16:22 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Fri, 22 May 2020 07:22:32 +0000 (16:22 +0900)
Change-Id: I7bdd6b8a0aa1e0c055c3197b5e375dc93e0629c1
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/pkg_cmd.c

index b60eba2..21d23b9 100644 (file)
@@ -1548,6 +1548,7 @@ int main(int argc, char *argv[])
        struct timeval tv;
        bool is_root_cmd = false;
        pm_tool_args data = { 0 };
+       GList *list;
        /* Supported options */
        /* Note: 'G' is reserved */
        const char *short_options = "iurwmcgxCkaADL:lsd:p:t:n:T:e:M:X:Y:Z:qhGS";
@@ -1704,7 +1705,16 @@ int main(int argc, char *argv[])
                        ret = __convert_to_absolute_path(&data);
                        if (ret == -1)
                                printf("conversion of relative path to absolute path failed\n");
-                       printf("path is %s\n", data.pkg_path);
+                       printf("path is ");
+                       if (g_list_length(data.pkgs)) {
+                               for (list = data.pkgs; list;
+                                               list = list->next) {
+                                       printf("%s ", (char *)list->data);
+                               }
+                               printf("\n");
+                       } else {
+                               printf("%s\n", data.pkg_path);
+                       }
                        break;
 
                case 'X':  /* old_tpk */