diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-03-24 17:44:59 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-03-24 17:44:59 +0000 |
commit | 0706fc6986773f4e4d391deff4ad5143c464ea4e (patch) | |
tree | 9fd110f9fc996e8a4213eeda994a8c112491b86d /profiles/prefix | |
parent | aa3411e241a201d53a2689766fe419f2756819f3 (diff) |
Revert "gentoo resync : 24.03.2019"
This reverts commit aa3411e241a201d53a2689766fe419f2756819f3.
Diffstat (limited to 'profiles/prefix')
-rw-r--r-- | profiles/prefix/darwin/macos/package.mask | 8 | ||||
-rw-r--r-- | profiles/prefix/sunos/solaris/package.mask | 4 | ||||
-rw-r--r-- | profiles/prefix/windows/cygwin/use.mask | 3 | ||||
-rw-r--r-- | profiles/prefix/windows/winnt/profile.bashrc | 121 |
4 files changed, 124 insertions, 12 deletions
diff --git a/profiles/prefix/darwin/macos/package.mask b/profiles/prefix/darwin/macos/package.mask index 9bbcfc3b53e3..2adeb6a71837 100644 --- a/profiles/prefix/darwin/macos/package.mask +++ b/profiles/prefix/darwin/macos/package.mask @@ -1,12 +1,6 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# Fabian Groffen <grobian@gentoo.org> (22 Mar 2019) -# Newer versions break because they insist on sysroot usage lacking -# -lSystem as looked for by clang/llvm. If your system got this -# package, you have to emerge -C cmake and re-emerge it. ->dev-util/cmake-3.13.4 - # James Le Cuirot <chewi@gentoo.org> (29 Jul 2015) # Recent Oracle releases only support recent Mac OS releases. We can't # keep old versions due to vulnerabilities. diff --git a/profiles/prefix/sunos/solaris/package.mask b/profiles/prefix/sunos/solaris/package.mask index 27668ebed6d3..8b7eafcc2520 100644 --- a/profiles/prefix/sunos/solaris/package.mask +++ b/profiles/prefix/sunos/solaris/package.mask @@ -1,10 +1,6 @@ # Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# Fabian Groffen <grobian@gentoo.org> (22 Mar 2019) -# fails to compile, bug #681316 -=app-crypt/gnupg-2.2.14 - # Fabian Groffen <grobian@gentoo.org> (12 Nov 2018) # this version of binutils produces shared libraries with symbol lookup # errors, probably a versioning problem, confirmed on Solaris 10 and diff --git a/profiles/prefix/windows/cygwin/use.mask b/profiles/prefix/windows/cygwin/use.mask index 392ef405f2e6..a443b8e0a5e2 100644 --- a/profiles/prefix/windows/cygwin/use.mask +++ b/profiles/prefix/windows/cygwin/use.mask @@ -1,9 +1,10 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Re-add Cygwin's libc -elibc_Cygwin # we do have only python-3.6 ready on cygwin +python_targets_python3_4 python_targets_python3_5 python_targets_python3_7 diff --git a/profiles/prefix/windows/winnt/profile.bashrc b/profiles/prefix/windows/winnt/profile.bashrc index 3c12c6519673..7d1251609c0f 100644 --- a/profiles/prefix/windows/winnt/profile.bashrc +++ b/profiles/prefix/windows/winnt/profile.bashrc @@ -27,6 +27,69 @@ windows_setup_dllhelper() { esac } +windows_cleanup_removed_files() { + local removedlist=$1 + rm -f "${removedlist}".new + + if [[ -r ${removedlist} ]]; then + rm -f "${removedlist}".old + fi + # restore in case of system fault + if [[ -r ${removedlist}.old ]]; then + mv "${removedlist}"{.old,} + fi + + touch "${removedlist}"{,.new} # ensure they exist + + while read rmstem; do + # try to remove previously recorded files + for f in "${ROOT}${rmstem}"*; do + ebegin "trying to remove ${f}" + rm -f "${f}" > /dev/null 2>&1 + eend $? + done + # but keep it in list if still exists + for f in "${ROOT}${rmstem}"*; do + [[ -f ${f} ]] && echo "${rmstem}" >> "${removedlist}".new + break + done + done < "${removedlist}" + + # update the list + mv "${removedlist}"{,.old} + mv "${removedlist}"{.new,} + rm "${removedlist}".old +} + +windows_find_removed_slot() { + local f=$1 + local n=0 + while [[ ${n} -lt 100 && -f "${f}${n}" ]]; do + n=$((n=n+1)) + done + + if [[ ${n} -ge 100 ]]; then + echo "too many (>=100) old text files busy of '${f}'" >&2 + exit 1 + fi + + echo $n +} + +windows_prepare_file() { + local failed=0 + my_mv=mv + + [[ "${1}" == */mv ]] && my_mv="${1}.new" + [[ -f "${1}.new" ]] && rm -f "${1}.new" + + cp -p "${1}" "${1}.new" || failed=1 + ${my_mv} "${1}" "${2}" || failed=1 + ${my_mv} "${1}.new" "${1}" || failed=1 + + echo $failed +} + post_src_install() { cd "${ED}" find . -name '*.exe' -o -name '*.dll.a' -o -name '*.so' | @@ -62,6 +125,64 @@ post_src_install() { done } +post_pkg_preinst() { + local removedlist="${EROOT}var/lib/portage/files2bremoved" + windows_cleanup_removed_files $removedlist + + # now go for current package + cd "${D}" + find ".${EROOT}" -type f | xargs -r /usr/bin/file | grep ' PE ' | while read f t + do + f=${f#./} # find prints: "./path/to/file" + f=${f%:} # file prints: "file-argument: type-of-file" + test -r "${ROOT}${f}" || continue + rmstem="${f}.removedbyportage" + # keep list of old busy text files unique + grep "^${rmstem}$" "${removedlist}" >/dev/null \ + || echo "${rmstem}" >> "${removedlist}" + + local n=$(windows_find_removed_slot ${ROOT}${rmstem}) + ebegin "backing up text file ${ROOT}${f} (${n})" + eend $(windows_prepare_file "${ROOT}${f}" "${ROOT}${rmstem}${n}") + done +} + +post_pkg_prerm() { + local removedlist="${EROOT}var/lib/portage/files2bremoved" + save_IFS=$IFS + IFS=' +'; + local MY_PR=${PR} + [[ ${MY_PR} == r0 ]] && MY_PR= + local -a contents=($(<"${EROOT}var/db/pkg/${CATEGORY}/${P}${MY_PR:+-}${MY_PR}/CONTENTS")); + IFS=$save_IFS + local -a cont + for content in "${contents[@]}"; do + cont=($content) + f=${cont[1]} + f=${f#/} + + test -r "${ROOT}${f}" || continue + + if /usr/bin/file "${ROOT}${f}" | grep ' PE ' > /dev/null; then + # $f should be an absolute path to the installed file + rmstem="${f}.removedbyportage" + + grep "^${rmstem}$" "${removedlist}" > /dev/null \ + || echo "${rmstem}" >> "${removedlist}" + + local n=$(windows_find_removed_slot ${ROOT}${rmstem}) + ebegin "preparing ${ROOT}${f} for unmerge ($n)" + eend $(windows_prepare_file "${ROOT}${f}" "${ROOT}${rmstem}${n}") + fi + done +} + +pre_pkg_postrm() { + local removedlist="${EROOT}var/lib/portage/files2bremoved" + windows_cleanup_removed_files $removedlist +} + windows_setup_dllhelper_cp() { if ! [[ $(type -P cp) -ef ${T}/dllhelper/cp ]] then |