File tree Expand file tree Collapse file tree 3 files changed +46
-34
lines changed Expand file tree Collapse file tree 3 files changed +46
-34
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,11 @@ to dev.gentoo.org. Typical usage::
115
115
# tag archive-name upstream dgo-subdir
116
116
mkpatchset gentoo-3.9.8 python-gentoo-patches-3.9.8 v3.9.8 python/
117
117
118
- check-ensurepip
119
- ---------------
118
+ check-mismatched-packages
119
+ -------------------------
120
120
Dependencies: git, pkgcore
121
121
122
- Check whether `` dev-python/ensurepip-* `` packages are up-to-date.
122
+ Check whether packages that should be bumped in sync are up-to-date.
123
123
Useful for a pre-push hook.
124
124
125
125
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # check whether packages that should be kept in sync are up-to-date
3
+
4
+ REPO=$( git rev-parse --show-toplevel)
5
+ PKGS=(
6
+ dev-python/ensurepip-pip:0=dev-python/pip:0
7
+ dev-python/ensurepip-setuptools:0=dev-python/setuptools:0
8
+ dev-python/python-docs:2.7=dev-lang/python:2.7
9
+ dev-python/python-docs:3.8=dev-lang/python:3.8
10
+ dev-python/python-docs:3.9=dev-lang/python:3.9
11
+ dev-python/python-docs:3.10=dev-lang/python:3.10
12
+ dev-python/python-docs:3.11=dev-lang/python:3.11
13
+ )
14
+
15
+ declare -A VERSIONS
16
+ while read -r PKG; do
17
+ SLOT=${PKG#*: }
18
+ PKG=${PKG%:* }
19
+ PKG=${PKG% -r[0-9]* }
20
+ NAME=${PKG% -* }
21
+ VERSION=${PKG##* -}
22
+ VERSION=${VERSION% _p* }
23
+ VERSIONS[${NAME} :${SLOT} ]=${VERSION}
24
+ done < <(
25
+ pquery -q -r " ${REPO} " --slot " ${PKGS[@]% =* } " " ${PKGS[@]#* =} "
26
+ )
27
+
28
+ RET=0
29
+ for PKG in " ${PKGS[@]} " ; do
30
+ A=${PKG% =* }
31
+ B=${PKG#* =}
32
+ AV=" ${VERSIONS[${A}]} "
33
+ BV=" ${VERSIONS[${B}]} "
34
+
35
+ if [[ ${AV} != ${BV} ]]; then
36
+ echo " Package version mismatch found!" >&2
37
+ echo " ${A} : ${AV} " >&2
38
+ echo " ${B} : ${BV} " >&2
39
+ RET=1
40
+ fi
41
+ done
42
+
43
+ exit " ${RET} "
You can’t perform that action at this time.
0 commit comments