diff mbox series

[1/2] backports-update-manager: Add option to not update git trees

Message ID 20240122213649.149703-1-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series [1/2] backports-update-manager: Add option to not update git trees | expand

Commit Message

Hauke Mehrtens Jan. 22, 2024, 9:36 p.m. UTC
Add the '--no-git-update which will deactivate updating the git trees.
This can be used in the github actions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 devel/backports-update-manager | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/devel/backports-update-manager b/devel/backports-update-manager
index 9177be76..815a0421 100755
--- a/devel/backports-update-manager
+++ b/devel/backports-update-manager
@@ -629,6 +629,8 @@  def _main():
     parser.add_argument('--reference', metavar='<path-to-git-obj-dir>', type=str,
                         default=None,
                         help='Override what argument to use to git clone --reference')
+    parser.add_argument('--no-git-update', const=True, default=False, action="store_const",
+                        help='Don\'t update git trees')
     args = parser.parse_args()
 
     bk_updater = backport_kernel_updater(yes=args.yes or args.force,
@@ -649,7 +651,8 @@  def _main():
     bk_updater.remove_stale_kernel_dirs()
     bk_updater.get_backport_pkgs()
     bk_updater.extract_backport_pkgs()
-    bk_updater.update_git_trees()
+    if not args.no_git_update:
+        bk_updater.update_git_trees()
 
     return 0