From 8dcc46edb3a24785000eebee33ae252ef20fb47d Mon Sep 17 00:00:00 2001 From: Castulo Martinez Date: Tue, 10 Jul 2018 10:31:26 -0700 Subject: [PATCH] Removing unnecesary code to untrack bundles Every bundle includes a tracking file which tells the OS the bundle is installed, every bundle has this tracking file as part of its manifest. When removing a bundle from a system, all the files that are part of that bundle, and are not needed, for any other bundle are removed, including the tracking file. This patch removes a function call that is intended to remove the tracking bundle from the system, since it is not necessary, by the time the code calls that function, all files from the manifest that can be removed are already removed, and this includes the tracking file. This patch also modifies a few tests to reflect the change in the command output. --- src/bundle.c | 3 --- test/functional/bundleremove/boot-file/lines-checked | 1 - test/functional/bundleremove/remove-file/lines-checked | 1 - test/functional/bundleremove/remove-multiple/lines-checked | 2 -- 4 files changed, 7 deletions(-) diff --git a/src/bundle.c b/src/bundle.c index d7112e0c..e40036e7 100644 --- a/src/bundle.c +++ b/src/bundle.c @@ -558,9 +558,6 @@ int remove_bundles(char **bundles) fprintf(stderr, "Deleting bundle files...\n"); remove_files_in_manifest_from_fs(bundle_manifest); - fprintf(stderr, "Untracking bundle from system...\n"); - rm_bundle_file(bundle); - free_manifest(bundle_manifest); out_free_mom: free_manifest(current_mom); diff --git a/test/functional/bundleremove/boot-file/lines-checked b/test/functional/bundleremove/boot-file/lines-checked index 66d03d11..94e96499 100644 --- a/test/functional/bundleremove/boot-file/lines-checked +++ b/test/functional/bundleremove/boot-file/lines-checked @@ -1,4 +1,3 @@ Deleting bundle files... Total deleted files: 1 -Untracking bundle from system... Successfully removed 1 bundle diff --git a/test/functional/bundleremove/remove-file/lines-checked b/test/functional/bundleremove/remove-file/lines-checked index 66d03d11..94e96499 100644 --- a/test/functional/bundleremove/remove-file/lines-checked +++ b/test/functional/bundleremove/remove-file/lines-checked @@ -1,4 +1,3 @@ Deleting bundle files... Total deleted files: 1 -Untracking bundle from system... Successfully removed 1 bundle diff --git a/test/functional/bundleremove/remove-multiple/lines-checked b/test/functional/bundleremove/remove-multiple/lines-checked index 75fc99cc..565cae5d 100644 --- a/test/functional/bundleremove/remove-multiple/lines-checked +++ b/test/functional/bundleremove/remove-multiple/lines-checked @@ -1,9 +1,7 @@ Removing bundle: test-bundle1 Deleting bundle files... Total deleted files: 1 -Untracking bundle from system... Removing bundle: test-bundle2 Deleting bundle files... Total deleted files: 1 -Untracking bundle from system... Successfully removed 2 bundles