Force 15.0->Current symlinks to exist and function

NuGet Restore on sln files fails unless /usr/bin/msbuild references
15.0, so we need that symlink to exist. Force the 15.0 directory to
go away, so we can use the link from the package.
This commit is contained in:
Jo Shields 2019-04-23 10:47:54 -04:00
Родитель bcc9f2b937
Коммит 69a0222f36
4 изменённых файлов: 24 добавлений и 2 удалений

4
debian/msbuild.install поставляемый
Просмотреть файл

@ -1,5 +1,7 @@
/usr/bin/
/usr/lib/mono/xbuild/
/usr/lib/mono/xbuild/Microsoft
/usr/lib/mono/xbuild/Current
/usr/lib/mono/xbuild/*.dll*
/usr/lib/mono/msbuild/Current/bin/Sdks/
/usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.Build.NuGetSdkResolver
/usr/lib/mono/msbuild/Current/bin/*.config

1
debian/msbuild.links поставляемый
Просмотреть файл

@ -1 +1,2 @@
/usr/lib/mono/msbuild/Current /usr/lib/mono/msbuild/15.0
/usr/lib/mono/xbuild/Current /usr/lib/mono/xbuild/15.0

20
debian/msbuild.preinst поставляемый Executable file
Просмотреть файл

@ -0,0 +1,20 @@
#!/bin/sh -e
OLD_XBUILDDIR=/usr/lib/mono/xbuild/15.0
OLD_MSBUILDDIR=/usr/lib/mono/msbuild/15.0
if [ "$1" = "upgrade" -o "$1" = "install" ] ; then
if [ -d "$OLD_XBUILDDIR" -a ! -L "$OLD_XBUILDDIR" ] ; then
echo "Found old XBuild tools directory, moving out of the way"
mv $OLD_XBUILDDIR $OLD_XBUILDDIR.old
fi
fi
if [ "$1" = "upgrade" -o "$1" = "install" ] ; then
if [ -d "$OLD_MSBUILDDIR" -a ! -L "$OLD_MSBUILDDIR" ] ; then
echo "Found old MSBuild tools directory, moving out of the way"
mv $OLD_MSBUILDDIR $OLD_MSBUILDDIR.old
fi
fi
#DEBHELPER#

1
debian/rules поставляемый
Просмотреть файл

@ -15,7 +15,6 @@ override_dh_auto_build:
override_dh_auto_install:
HOME=$(TEMP_HOME) ./artifacts/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix=$(DEBIAN_DIR_ABS)/tmp/usr /p:Configuration=Release-MONO /p:IgnoreDiffFailure=true
sed -i "s@$(DEBIAN_DIR_ABS)/tmp@@g" debian/tmp/usr/bin/msbuild
sed -i "s@15.0@Current@g" debian/tmp/usr/bin/msbuild
find debian/tmp/usr/lib/mono/ -name Microsoft.DiaSymReader.Native.*dll -delete
find debian/tmp/usr/lib/mono/ -name *.dylib -delete