From 4555802d2046c86bac273e244030c60262fa9f75 Mon Sep 17 00:00:00 2001 From: Kousik Kumar Date: Thu, 14 Sep 2023 20:09:05 +0000 Subject: [PATCH] Remove unused symlink code It looks like hardware/qcom/sdm710 no longer exists in the source tree, so this symlink removal is should no longer be needed? Bug: n/a Change-Id: I8c9c6c0c0371039f910fc4290f81a692e4cd5cd4 --- cmd/soong_ui/main.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go index 4097e8a3f..0b542fec5 100644 --- a/cmd/soong_ui/main.go +++ b/cmd/soong_ui/main.go @@ -289,31 +289,12 @@ func logAndSymlinkSetup(buildCtx build.Context, config build.Config) { } } - // Fix up the source tree due to a repo bug where it doesn't remove - // linkfiles that have been removed - fixBadDanglingLink(buildCtx, "hardware/qcom/sdm710/Android.bp") - fixBadDanglingLink(buildCtx, "hardware/qcom/sdm710/Android.mk") - // Create a source finder. f := build.NewSourceFinder(buildCtx, config) defer f.Shutdown() build.FindSources(buildCtx, config, f) } -func fixBadDanglingLink(ctx build.Context, name string) { - _, err := os.Lstat(name) - if err != nil { - return - } - _, err = os.Stat(name) - if os.IsNotExist(err) { - err = os.Remove(name) - if err != nil { - ctx.Fatalf("Failed to remove dangling link %q: %v", name, err) - } - } -} - func dumpVar(ctx build.Context, config build.Config, args []string) { logAndSymlinkSetup(ctx, config) flags := flag.NewFlagSet("dumpvar", flag.ExitOnError)