pre-upload: Add virtual package versions for private chip/baseboard
The pre-upload script currently requires public and private chipset or
baseboard virtual packages to have the same version numbers. This makes
no sense (if they both exist they shouldn't have the same version
number, private should override public). This patch introduces 1.8.5 and
1.9.5 as the private equivalent for 1.8 and 1.9.
Also fix an existing bug with version numbers containing more than 2
components.
BUG=b:119578707
TEST=Uploaded a patch using these numbers.
Change-Id: Iae06197aba2c7ae1816406c2ab01b861e67d6a71
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/repohooks/+/2333282
Commit-Queue: Julius Werner <jwerner@chromium.org>
Tested-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/pre-upload.py b/pre-upload.py
index 66652b5..8d0778c 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -1218,7 +1218,7 @@
# Virtual versions >= 4 are special cases used above the standard
# versioning structure, e.g. if one has a board inheriting a board.
- if float(pv) >= 4:
+ if pv[0] >= '4':
want_pv = pv
elif is_board(overlay):
if is_private(overlay):
@@ -1226,9 +1226,9 @@
elif is_board(overlay):
want_pv = '2.5' if is_variant(overlay) else '2'
elif is_baseboard(overlay):
- want_pv = '1.9'
+ want_pv = '1.9.5' if is_private(overlay) else '1.9'
elif is_chipset(overlay):
- want_pv = '1.8'
+ want_pv = '1.8.5' if is_private(overlay) else '1.8'
elif is_project(overlay):
want_pv = '1.7' if is_private(overlay) else '1.5'
else: