From 552145af87306f0370004c1ba59df93f0983f895 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Thu, 24 Feb 2011 15:22:21 +0000 Subject: [PATCH] updated wine to version 1.3.14 --- check-files.sh | 128 +++++++++++++++--------------- rmpkg.sh | 209 +++++++++++++++++++++++++++++++------------------ wine/PKGBUILD | 4 +- 3 files changed, 200 insertions(+), 141 deletions(-) diff --git a/check-files.sh b/check-files.sh index a807442..842b84d 100755 --- a/check-files.sh +++ b/check-files.sh @@ -17,17 +17,23 @@ _script_name="check files" _cur_repo=$(pwd | awk -F '/' '{print $NF}') +_needed_functions="config_handling helpers messages" _build_arch="$_arch" +_sarch="x32" +[[ ${_arch} = *x*64* ]] && _sarch="x64" -source _buildscripts/functions/config_handling -source _buildscripts/functions/helpers -source _buildscripts/functions/messages +# helper functions +for subroutine in ${_needed_functions} ; do + source _buildscripts/functions/${subroutine} +done # Determine the sync folder if [[ ${_cur_repo} = *-testing ]] && [[ ${_cur_repo} != lib32-testing ]] ; then - _sync_folder="_testing/" + _sync_folder="_testing-${_sarch}/" +elif [[ ${_cur_repo} = *-unstable ]] ; then + _sync_folder="_unstable-${_sarch}/" else - _sync_folder="_repo/remote/" + _sync_folder="_repo/remote/" fi @@ -39,86 +45,82 @@ load_configs check_rsync check_accounts -question() { - echo -e -n "\033[1;32m::\033[1;0m\033[1;0m $1\033[1;0m" -} - sync_down() { - msg "syncing down" - export RSYNC_PASSWORD=$(echo ${_rsync_pass}) - if [ "${_sync_folder}" == "_testing/" ] ; then - rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/testing/$_build_arch/* ${_sync_folder} - else - rsync -avh --progress ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* ${_sync_folder} - fi + msg "syncing down" + export RSYNC_PASSWORD=$(echo ${_rsync_pass}) + if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then + rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/testing/$_build_arch/* ${_sync_folder} + elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then + rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/unstable/$_build_arch/* ${_sync_folder} + else + rsync -avh --progress ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* ${_sync_folder} + fi } remove_packages() { - # remove the package(s) from sync folder - msg "removing the packages(s) from ${_sync_folder}" - pushd ${_sync_folder} &>/dev/null - rm -rf ${remove_list} - popd &>/dev/null + # remove the package(s) from sync folder + msg "removing the packages(s) from ${_sync_folder}" + pushd ${_sync_folder} &>/dev/null + rm -rf ${remove_list} + popd &>/dev/null } sync_down # Get the file list in the server export RSYNC_PASSWORD=$(echo ${_rsync_pass}) -if [ "${_sync_folder}" == "_testing/" ] ; then - repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/* | cut -d ":" -f 3 | cut -d " " -f 2` +if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then + repo_files=$(rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/* | awk -F ' ' '{print $NF}') +elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then + repo_files=$(rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/* | awk -F ' ' '{print $NF}') else - repo_files=`rsync -avh --list-only ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* | cut -d ":" -f 3 | cut -d " " -f 2` + repo_files=$(rsync -avh --list-only ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* | awk -F ' ' '{print $NF}') fi -# Get the file list in sync folder -local_files=`ls -a ${_sync_folder}* | cut -d "/" -f 3` +# Get the file list in the sync folder +local_files=$(ls -a ${_sync_folder}* | awk -F '/' '{print $NF}') # Get the list of files to remove remove_list="" for _file in ${local_files} ; do - file_exist="false" - for _compare_file in ${repo_files} ; do - if [ "${_file}" = "${_compare_file}" ] ; then - file_exist="true" - fi - done - - if [ "${file_exist}" = "false" ] ; then - remove_list="${remove_list} ${_file}" - fi + file_exist="false" + for _compare_file in ${repo_files} ; do + if [ "${_file}" = "${_compare_file}" ] ; then + file_exist="true" + fi + done + if [ "${file_exist}" = "false" ] ; then + remove_list="${remove_list} ${_file}" + fi done if [ "${remove_list}" != "" ] ; then - msg "The following packages in _repo/remote don't exist in the sever:" - newline - echo "${remove_list}" - newline - question "Do you want to remove the package(s)? (y/n)" - while true ; do - read yn - - case ${yn} in - [yY]* ) - newline ; - remove_packages ; - break ; - ;; - - [nN]* ) - newline ; - title "The files will be keeped..." ; - newline ; - break ; - ;; - - * ) - echo "Enter (y)es or (n)o" ; - ;; - esac - done + msg "The following packages in ${_sync_folder} don't exist in the sever:" + newline + echo "${remove_list}" + newline + question "Do you want to remove the package(s)? (y/n) " + while true ; do + read yn + case ${yn} in + [yY]* ) + newline ; + remove_packages ; + break ; + ;; + [nN]* ) + newline ; + title "The files will be keeped..." ; + newline ; + break ; + ;; + * ) + echo "Enter (y)es or (n)o" ; + ;; + esac + done fi title "All done" diff --git a/rmpkg.sh b/rmpkg.sh index d0e6379..7165b69 100755 --- a/rmpkg.sh +++ b/rmpkg.sh @@ -19,68 +19,134 @@ # global vars # _script_name="Remove Package(s)" -_cur_repo=`pwd | awk -F '/' '{print $NF}'` +_cur_repo=$(pwd | awk -F '/' '{print $NF}') _needed_functions="config_handling helpers messages" -_args=`echo $1` _build_arch="$_arch" +_sarch="x32" +_args=`echo $1` +[[ ${_arch} = *x*64* ]] && _sarch="x64" # helper functions - for subroutine in ${_needed_functions} ; do - source _buildscripts/functions/${subroutine} + source _buildscripts/functions/${subroutine} done # Determine the sync folder if [[ ${_cur_repo} = *-testing ]] && [[ ${_cur_repo} != lib32-testing ]] ; then - _sync_folder="_testing/" + _sync_folder="_testing-${_sarch}/" +elif [[ ${_cur_repo} = *-unstable ]] ; then + _sync_folder="_unstable-${_sarch}/" else - _sync_folder="_repo/remote/" + _sync_folder="_repo/remote/" fi + # # main # sync_down() { - msg "syncing down" - export RSYNC_PASSWORD=$(echo ${_rsync_pass}) - if [ "${_sync_folder}" == "_testing/" ] ; then - rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/testing/$_build_arch/* ${_sync_folder} - else - rsync -avh --progress ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* ${_sync_folder} - fi + msg "syncing down" + export RSYNC_PASSWORD=$(echo ${_rsync_pass}) + if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then + rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/testing/$_build_arch/* ${_sync_folder} + elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then + rsync -avh --progress ${_rsync_user}@${_rsync_server}::dev/unstable/$_build_arch/* ${_sync_folder} + else + rsync -avh --progress ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* ${_sync_folder} + fi +} + +check_files() +{ + # Get the file list in the server + export RSYNC_PASSWORD=$(echo ${_rsync_pass}) + if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then + repo_files=$(rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/* | awk -F ' ' '{print $NF}') + elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then + repo_files=$(rsync -avh --list-only ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/* | awk -F ' ' '{print $NF}') + else + repo_files=$(rsync -avh --list-only ${_rsync_user}@${_rsync_server}::${_rsync_dir}/* | awk -F ' ' '{print $NF}') + fi + + # Get the file list in the sync folder + local_files=$(ls -a ${_sync_folder}* | awk -F '/' '{print $NF}') + remove_list="" + + for parse_file in ${local_files} ; do + file_exist="false" + for compare_file in ${repo_files} ; do + if [ "${parse_file}" = "${compare_file}" ] ; then + file_exist="true" + fi + done + if [ "${file_exist}" = "false" ] ; then + remove_list="${remove_list} ${parse_file}" + fi + done + + if [ "$remove_list" != "" ] ; then + msg "The following packages in ${_sync_folder} don't exist in the sever:" + newline + echo "${remove_list}" + newline + question "Do you want to remove the package(s)? (y/n)" + while true ; do + read yn + case ${yn} in + [yY]* ) + newline ; + remove_packages; + break + ;; + [nN]* ) + newline ; + title "The files will be keeped..." ; + newline ; + break + ;; + * ) + echo "Enter (y)es or (n)o" + ;; + esac + done + fi } remove_packages() { - # remove the package(s) from sync folder - msg "removing the packages(s) from ${_sync_folder}" - pushd $_sync_folder &>/dev/null - rm -rf ${_pkgz_to_remove} - popd &>/dev/null + # remove the package(s) from sync folder + msg "removing the packages(s) from ${_sync_folder}" + pushd $_sync_folder &>/dev/null + rm -rf ${_pkgz_to_remove} + popd &>/dev/null } sync_up() { - # create new pacman database - msg "creating pacman database" - rm -rf ${_sync_folder}*.db.tar.* - pushd ${_sync_folder} - if [ "${_sync_folder}" == "_testing/" ] ; then - repo-add testing.db.tar.gz *.pkg.* - else - repo-add ${_cur_repo}.db.tar.gz *.pkg.* - fi - popd + # create new pacman database + msg "creating pacman database" + rm -rf ${_sync_folder}*.db.tar.* + pushd ${_sync_folder} &>/dev/null + if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then + repo-add testing.db.tar.gz *.pkg.* + elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then + repo-add unstable.db.tar.gz *.pkg.* + else + repo-add ${_cur_repo}.db.tar.gz *.pkg.* + fi + popd &>/dev/null - # sync local -> server, removing the packages - msg "sync local -> server" - if [ "${_sync_folder}" == "_testing/" ] ; then - rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/ - else - rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::${_rsync_dir} - fi + # sync local -> server, removing the packages + msg "sync local -> server" + if [ "${_sync_folder}" = "_testing-${_sarch}/" ] ; then + rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::dev/testing/$_arch/ + elif [ "${_sync_folder}" = "_unstable-${_sarch}/" ] ; then + rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::dev/unstable/$_arch/ + else + rsync -avh --progress --delay-updates --delete-after ${_sync_folder} ${_rsync_user}@${_rsync_server}::${_rsync_dir} + fi } @@ -89,25 +155,13 @@ sync_up() # clear - -msg "_script_name=$_script_name" -msg "_build_arch=$_build_arch" -msg "_cur_repo=$_cur_repo" -msg "_sync_folder=$_sync_folder" -msg "_sync_user=$_sync_user" -msg "_sync_server=$_sync_server" -msg "_sync_dir=$_sync_dir" -msg "_cur_repo=$_cur_repo" -msg "_arch=$_arch" -msg "_pkgz_to_remove=$_pkgz_to_remove" - title "${_script_name} - $_cur_repo-$_build_arch" if [ "${_args}" = "" ] ; then - error " !! You need to specify a target to remove," - error " single names like \"attica\" or wildcards (*) are allowed." - newline - exit 1 + error " !! You need to specify a target to remove," + error " single names like \"attica\" or wildcards (*) are allowed." + newline + exit 1 fi check_configs @@ -119,13 +173,17 @@ check_accounts # First get the actual packages from the repo sync_down +# Check if there's any outdated file +msg "Searching removed files" +check_files + # Generate the list of packages to remove newline _args=${_args}* -_pkgz_to_remove=`ls ${_sync_folder}/${_args} | cut -d/ -f3` +_pkgz_to_remove=$(ls ${_sync_folder}${_args} | awk -F '/' '{print $NF}') if [ "${_pkgz_to_remove}" = "" ] ; then - exit + exit fi warning "The following packages will be removed:" @@ -133,32 +191,31 @@ newline echo "${_pkgz_to_remove}" newline -question "Do you really want to remove the package(s)? (y/n)" +question "Do you really want to remove the package(s)? (y/n) " while true ; do - read yn + read yn + case $yn in + [yY]* ) + newline ; + remove_packages ; + sync_up ; + newline ; + title "All done" ; + newline ; + break + ;; - case $yn in - [yY]* ) - newline ; - remove_packages ; - sync_up ; - newline ; - title "All done" ; - newline ; - break - ;; + [nN]* ) + exit + ;; - [nN]* ) - exit - ;; + q* ) + exit + ;; - q* ) - exit - ;; - - * ) - echo "Enter (y)es or (n)o" - ;; - esac + * ) + echo "Enter (y)es or (n)o" + ;; + esac done diff --git a/wine/PKGBUILD b/wine/PKGBUILD index 8382320..5e0f813 100644 --- a/wine/PKGBUILD +++ b/wine/PKGBUILD @@ -4,13 +4,13 @@ # maintainer (x86_64): Anke Boersma pkgname=wine -pkgver=1.3.13 +pkgver=1.3.14 pkgrel=1 _pkgbasever=${pkgver/rc/-rc} source=(http://ibiblio.org/pub/linux/system/emulators/$pkgname/$pkgname-$_pkgbasever.tar.bz2) -md5sums=('e6d4cd7e51678f90760e2193893637aa') +md5sums=('c99c8f518d3b2a13a739dfbd6c417e80') pkgdesc="A compatibility layer for running Windows programs" url="http://www.winehq.com"