From cb3c60c683b891d695350bc7ed5e1ee5ff2e131e Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Fri, 22 May 2020 16:22:32 +0900 Subject: [PATCH] Print entire given package path list Change-Id: I7bdd6b8a0aa1e0c055c3197b5e375dc93e0629c1 Signed-off-by: Sangyoon Jang --- src/pkg_cmd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pkg_cmd.c b/src/pkg_cmd.c index b60eba2..21d23b9 100644 --- a/src/pkg_cmd.c +++ b/src/pkg_cmd.c @@ -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 */ -- 2.7.4