From 6aba9b1b9a8deeeb83dc0b1d179ebe45bbcfde76 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 23 Jan 2024 16:17:54 +0100 Subject: [PATCH] tool/run/depot.inc: allow depot user in used_apis Issue #5092 --- tool/run/depot.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tool/run/depot.inc b/tool/run/depot.inc index 9477e2a298..a1ed8974d3 100644 --- a/tool/run/depot.inc +++ b/tool/run/depot.inc @@ -145,7 +145,14 @@ proc _collect_src_archive_from_depot { user name version } { close $fh foreach api $used_apis { - regexp [_depot_api_versioned_name_pattern] $api dummy api_name api_version + # + # The 'used_apis' file can contain fully specified entries or shortcuts. + # A fully specified entry has the form '/api//version'. + # A shortcut has the form '/version'. In this case, the '' is + # implicitely equal to the depot user of the src archive. + # + if {![regexp [_depot_archive_versioned_path_pattern] $api dummy user dummy api_name api_version]} { + regexp [_depot_api_versioned_name_pattern] $api dummy api_name api_version } if {![_depot_contains_archive $user api $api_name $api_version]} { lappend _missing_depot_archives [list $user api "" $api_name $api_version] continue