Skip to content

Commit 2031852

Browse files
committed
please.sh upgrade: handle for Perl modules after Perl upgrades
Whenever a major Perl version is released, the Perl modules have to be re-built because the name of the Perl `.dll` changes (its major version is embedded in the file name). Therefore, a major Perl version is reason enough to increase the `pkgrel` of the Perl modules we build in Git for Windows. This patch automates this, so that it will be enough in the future to trigger new builds for the Perl modules after a new `perl` was built. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 77c30ee commit 2031852

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

please.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,6 +2274,24 @@ maybe_force_pkgrel () {
22742274
test 0 -lt $(git rev-list --count ${blame:+${blame%% *}..} ${blame_ver:+$blame_ver..} -- PKGBUILD)
22752275
then
22762276
sed -i "s/^\\(pkgrel=\\).*/\\1"$((1+${blame##*=}))/ PKGBUILD
2277+
else
2278+
case "${PWD##*/MSYS2-packages/}" in
2279+
perl-*)
2280+
# Handle perl dependencees: if perl changed, increment pkgrel
2281+
blame_perl="$(MSYS_NO_PATHCONV=1 git blame -L '/^pkgver=/,+1' -- ../perl/PKGBUILD)" &&
2282+
blame_perl="$(echo "$blame_perl" | sed -e 's/ .*//' -e 's/^0*$//')" &&
2283+
blame_perl_pkgrel="$(MSYS_NO_PATHCONV=1 git blame -L '/^pkgrel=/,+1' "$blame_perl.." -- ../perl/PKGBUILD)" &&
2284+
if test -n "$blame_perl_pkgrel"
2285+
then
2286+
blame_perl="$(echo "$blame_perl_pkgrel" | sed -e 's/ .*//' -e 's/^0*$//')"
2287+
fi &&
2288+
if test -n "$blame_perl" &&
2289+
test 0 = $(git rev-list --count $blame_perl.. -- ./PKGBUILD)
2290+
then
2291+
sed -i "s/^\\(pkgrel=\\).*/\\1"$((1+${blame##*=}))/ PKGBUILD
2292+
fi
2293+
;;
2294+
esac
22772295
fi
22782296
fi
22792297

0 commit comments

Comments
 (0)