File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,13 @@ 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
+ ---------------
120
+ Dependencies: git, pkgcore
121
+
122
+ Check whether ``dev-python/ensurepip-* `` packages are up-to-date.
123
+ Useful for a pre-push hook.
124
+
118
125
119
126
Package tree iteration helpers
120
127
==============================
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # check whether ensurepip-* packages are up-to-date
3
+
4
+ REPO=$( git rev-parse --show-toplevel)
5
+ PKGS=( pip setuptools )
6
+
7
+ declare -A VERSIONS
8
+ while read -r PKG; do
9
+ PKG=${PKG# dev-python/ }
10
+ NAME=${PKG% -* }
11
+ VERSION=${PKG##* -}
12
+ VERSIONS[${NAME} ]=${VERSION}
13
+ done < <(
14
+ pquery -q -r " ${REPO} " --max " ${PKGS[@]/#/ dev-python\/ } " \
15
+ " ${PKGS[@]/#/ dev-python\/ ensurepip-} "
16
+ )
17
+
18
+ for PKG in " ${PKGS[@]} " ; do
19
+ ENSUREPIP=" ${VERSIONS[ensurepip-${PKG}]} "
20
+ ACTUAL=" ${VERSIONS[${PKG}]} "
21
+
22
+ if [[ ${ENSUREPIP} != ${ACTUAL} ]]; then
23
+ echo " Ensurepip mismatch found!" >&2
24
+ echo " dev-python/ensurepip-${PKG} : ${ENSUREPIP} " >&2
25
+ echo " dev-python/${PKG} : ${ACTUAL} " >&2
26
+ fi
27
+ done
You can’t perform that action at this time.
0 commit comments