diff options
author | Ismaël Bouya | 2015-07-03 11:40:24 +0200 |
---|---|---|
committer | Ismaël Bouya | 2015-07-03 12:16:40 +0200 |
commit | e9a13c32d681f27464a3b7069afbf9493dc4489d (patch) | |
tree | ebbc0dac8b1034ad77d7fa3d7e68117c25c670c1 | |
parent | fbd2de4142e0ab59395aa7fc9744c794c12280a9 (diff) | |
download | aur-e9a13c32d681f27464a3b7069afbf9493dc4489d.tar.gz |
Add upgrade helper
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 1 | ||||
-rwxr-xr-x | upgrade_helper.sh | 55 |
3 files changed, 59 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..b44823988ce5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +Anaconda3*.sh +pkg/ +src/ @@ -36,6 +36,7 @@ prepare() { package() { prefix=${pkgdir}/opt/${pkgname} bash ${srcdir}/Anaconda3-${pkgver}-Linux-${_pkgarch}.sh -b -p $prefix + [ "$BREAK_EARLY" = 1 ] && exit 1 cd $prefix patch -p1 < $srcdir/conda_install.patch CONDA_INSTALL="$prefix/pkgs/conda-${_condaver}-py34_0/lib/python3.4/site-packages/conda/install.py" diff --git a/upgrade_helper.sh b/upgrade_helper.sh new file mode 100755 index 000000000000..4f7f62723d02 --- /dev/null +++ b/upgrade_helper.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +echo "update pkgver in PKGBUILD" +read + +echo "Downloading files (checks will fail)" +makepkg --verifysource +CARCH=x86 makepkg --verifysource + +source PKGBUILD +anaconda_x86_64=Anaconda3-${pkgver}-Linux-x86_64.sh +anaconda_x86=Anaconda3-${pkgver}-Linux-x86.sh +cp $anaconda_x86_64 ${anaconda_x86_64}.old +cp $anaconda_x86 ${anaconda_x86}.old + +echo "Modify $anaconda_x86 and $anaconda_x86_64" +read + +diff -u ${anaconda_x86_64}.old $anaconda_x86_64 > installer_sh_x86_64.patch +diff -u ${anaconda_x86}.old $anaconda_x86 > installer_sh_x86.patch + +mv -f ${anaconda_x86_64}.old $anaconda_x86_64 +mv -f ${anaconda_x86}.old $anaconda_x86 + +echo "Clean installer_sh_x86_64.patch and installer_sh_x86.patch (update header and remove tail)" +read + +updpkgsums +sha256sum $anaconda_x86 +echo "update sha256sum for $anaconda_x86 in PKGBUILD" +read +BREAK_EARLY=1 makepkg +grep CONDA_INSTALL= installer_sh_x86_64.patch +echo "Edit conda_install patch to have correct conda version in header" +read + +cd pkg/anaconda/opt/anaconda/ +conda_install=`ls -1 pkgs/conda-3.*/lib/python*/site-packages/conda/install.py` +cp $conda_install ${conda_install}.old +echo "Trying patch as is:" +patch -p1 < ../../../../conda_install.patch + +diff -u ${conda_install}.old ${conda_install} > ../../../../conda_install.patch + +cd - + +echo "Check conda_install.patch and update header" + +read +updpkgsums +grep CONDA_INSTALL= installer_sh_x86_64.patch +grep PYTHON= installer_sh_x86_64.patch +echo "Update _pythonver and _condaver in PKGBUILD" +read +echo "Done" |