rebase: Make sure that we execute our dash/bash

The implicit `.` (current working directory) in PATH can cause the script to
call a wrong dash/bash if present alongside the installer.

Fixes https://sourceforge.net/p/msys2/tickets/141/
This commit is contained in:
David Macek
2017-02-05 12:43:11 +01:00
parent e18d7bc4bb
commit 595f4aba7f
3 changed files with 9 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
pkgname=rebase
pkgver=4.4.2
pkgrel=1
pkgrel=2
pkgdesc="The Cygwin rebase distribution contains four utilities, rebase, rebaseall, peflags, and peflagsall."
groups=('base')
arch=('i686' 'x86_64')
@@ -21,8 +21,8 @@ source=(${pkgname}-${pkgver}::git://sourceware.org/git/cygwin-apps/rebase.git#ta
'msys2-usr.patch')
sha256sums=('SKIP'
'261921df1e581f74751c6dbc5a83c475a57c42bdfef62bdbc9fe8e1f5c648c47'
'639db08ad3f8027c50376a2c7aab1d4e1e12e1ff6a893aeb6c07005de426f40b'
'207dd9880255ed2fc8864452619f7c1a3ba74c6508dfcfca475af8a6caab412a'
'8e4099a29107a1d03031b198c3d142bbc31a40ff19298d6e099d9bcffd31b1b0'
'0aed2c3a36e1926af4b0c914d208d4846bb0082d2f4886e6bb17d4b8b7fb42d5'
'b06d561d82e7c32573082cf0207ca80275bab241c61debf2d3d8cc10cf79e31b'
'2ca1e58fb1d2625e93224d0d1ca3b86944030ef2572289222b42ccc2387033fd'
'b4823bfdc169744e05b9c71d513ef570b580ffc9dded4fa482ec644a557de56b'

View File

@@ -1,4 +1,4 @@
@echo off
set PATH=%~dp0\usr\bin;%PATH%
dash /usr/bin/rebaseall -p
%~dp0\usr\bin\dash /usr/bin/rebaseall -p

View File

@@ -1,14 +1,15 @@
@echo off
REM Copyright (c) 2014, Ray Donnelly <mingw.android@gmail.com>
set PATH=%~dp0\usr\bin;%PATH%
echo Querying 'base' packages for DLLs ..
bash /usr/bin/pacman-rec-filename-grep base base-dlls-unix.txt ".*\.(dll|so|oct)$"
bash /usr/bin/paths-from-unix-to-windows base-dlls-unix.txt base-dlls.txt %CD:\=/%
%~dp0\usr\bin\bash /usr/bin/pacman-rec-filename-grep base base-dlls-unix.txt ".*\.(dll|so|oct)$"
%~dp0\usr\bin\bash /usr/bin/paths-from-unix-to-windows base-dlls-unix.txt base-dlls.txt %CD:\=/%
echo Rebasing all DLLs, 'base' ones first ..
REM -i is new; it means ignore database and
REM rebase from end of {cygwin1,msys-2.0}.dll
REM it work by avoiding passing -s to rebase.exe
REM which has modifications to support this mode.
dash /usr/bin/rebaseall -T base-dlls.txt -i -p
%~dp0\usr\bin\dash /usr/bin/rebaseall -T base-dlls.txt -i -p