uprev_lib: Avoid committing Manifest if package does not have one

The drivefs-ipc package does not have a Manifest file however the
uprev_lib has it hardcoded to git add the file. First check if a
Manifest exists and if it does, add it to the |changed_files| to allow
it to be added to the CL.

BUG=chromium:1118212
TEST=run_pytest

Change-Id: Ib33ffdd5f5e798aa81ff585b11849023f6f068c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2527367
Tested-by: Ben Reich <benreich@chromium.org>
Commit-Queue: Ben Reich <benreich@google.com>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
diff --git a/lib/uprev_lib.py b/lib/uprev_lib.py
index c81fdc3..b779018 100644
--- a/lib/uprev_lib.py
+++ b/lib/uprev_lib.py
@@ -817,8 +817,11 @@
     raise EbuildManifestError(
         f'Unable to update manifest for {package}: {e.stderr}')
 
-  result = UprevResult(
-      outcome=outcome, changed_files=[new_ebuild_src_path, manifest_src_path])
+  changed_files = [new_ebuild_src_path]
+  if os.path.exists(manifest_src_path):
+    changed_files.append(manifest_src_path)
+
+  result = UprevResult(outcome=outcome, changed_files=changed_files)
 
   if stable_ebuild is not None:
     result.changed_files.append(stable_ebuild.ebuild_path)