From c7a97e5230e117116baad064f70cdeecab480620 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 10 Mar 2017 20:40:35 -0800 Subject: sys-apps/portage: remove old upgrade code for bug 612246 Package-Manager: Portage-2.3.4, Repoman-2.3.2 --- sys-apps/portage/portage-2.3.3.ebuild | 103 ---------------------------------- sys-apps/portage/portage-2.3.4.ebuild | 103 ---------------------------------- 2 files changed, 206 deletions(-) (limited to 'sys-apps/portage') diff --git a/sys-apps/portage/portage-2.3.3.ebuild b/sys-apps/portage/portage-2.3.3.ebuild index 07a28907270d..f9f6966ad7e3 100644 --- a/sys-apps/portage/portage-2.3.3.ebuild +++ b/sys-apps/portage/portage-2.3.3.ebuild @@ -224,22 +224,6 @@ pkg_preinst() { chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog} fi - if has_version "<${CATEGORY}/${PN}-2.1.13" || \ - { - has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \ - has_version "<${CATEGORY}/${PN}-2.2.0_alpha189" - } ; then - USERPRIV_UPGRADE=true - USERSYNC_UPGRADE=true - REPOS_CONF_UPGRADE=true - REPOS_CONF_SYNC= - type -P portageq >/dev/null 2>&1 && \ - REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC) - else - USERPRIV_UPGRADE=false - USERSYNC_UPGRADE=false - REPOS_CONF_UPGRADE=false - fi if has_version ">=${CATEGORY}/${PN}-2.3.1" && \ has_version "<${CATEGORY}/${PN}-2.3.3"; then SYNC_DEPTH_UPGRADE=true @@ -279,93 +263,6 @@ new_config_protect() { } pkg_postinst() { - - if ${REPOS_CONF_UPGRADE} ; then - einfo "Generating repos.conf" - local repo_name= - [[ -f ${PORTDIR}/profiles/repo_name ]] && \ - repo_name=$(< "${PORTDIR}/profiles/repo_name") - if [[ -z ${REPOS_CONF_SYNC} ]] ; then - REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf") - REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* } - fi - local sync_type= - [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git - - if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then - sync_type=cvs - REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://} - fi - - cat <<-EOF > "${T}/repos.conf" - [DEFAULT] - main-repo = ${repo_name:-gentoo} - - [${repo_name:-gentoo}] - location = ${PORTDIR:-${EPREFIX}/usr/portage} - sync-type = ${sync_type:-rsync} - sync-uri = ${REPOS_CONF_SYNC} - EOF - - [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf" - - local dest=${EROOT:-${ROOT}}etc/portage/repos.conf - if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then - dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf - fi - # Don't install the config update if the desired repos.conf directory - # and config file exist, since users may accept it blindly and break - # their config (bug #478726). - [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \ - mv "${T}/repos.conf" "$(new_config_protect "${dest}")" - - if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then - einfo "Generating make.conf PORTDIR setting for backward compatibility" - for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do - [[ -e ${dest} ]] && break - done - [[ -d ${dest} ]] && dest=${dest}/portdir.conf - rm -rf "${T}/make.conf" - [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf" - cat <<-EOF >> "${T}/make.conf" - - # Set PORTDIR for backward compatibility with various tools: - # gentoo-bashcomp - bug #478444 - # euse - bug #474574 - # euses and ufed - bug #478318 - PORTDIR="${EPREFIX}/usr/portage" - EOF - mkdir -p "${dest%/*}" - mv "${T}/make.conf" "$(new_config_protect "${dest}")" - fi - fi - - local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}} - - if ${USERSYNC_UPGRADE} && \ - [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then - local ownership=$(get_ownership "${PORTDIR}") - if [[ -n ${ownership} ]] ; then - einfo "Adjusting PORTDIR permissions for usersync" - find "${PORTDIR}" -path "${distdir%/}" -prune -o \ - ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \ - -exec chown "${ownership}" {} + - fi - fi - - # Do this last, since it could take a long time if there - # are lots of live sources, and the user may be tempted - # to kill emerge while it is running. - if ${USERPRIV_UPGRADE} && \ - [[ -d ${distdir} && -w ${distdir} ]] ; then - local ownership=$(get_ownership "${distdir}") - if [[ ${ownership#*:} == portage ]] ; then - einfo "Adjusting DISTDIR permissions for userpriv" - find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \ - -exec chown -R portage:portage {} + - fi - fi - if ${SYNC_DEPTH_UPGRADE}; then ewarn "Please note that this release no longer respects sync-depth for" ewarn "git repositories. There have been too many problems and" diff --git a/sys-apps/portage/portage-2.3.4.ebuild b/sys-apps/portage/portage-2.3.4.ebuild index cc0c18ef3de1..8611b2060ec9 100644 --- a/sys-apps/portage/portage-2.3.4.ebuild +++ b/sys-apps/portage/portage-2.3.4.ebuild @@ -224,22 +224,6 @@ pkg_preinst() { chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog} fi - if has_version "<${CATEGORY}/${PN}-2.1.13" || \ - { - has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \ - has_version "<${CATEGORY}/${PN}-2.2.0_alpha189" - } ; then - USERPRIV_UPGRADE=true - USERSYNC_UPGRADE=true - REPOS_CONF_UPGRADE=true - REPOS_CONF_SYNC= - type -P portageq >/dev/null 2>&1 && \ - REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC) - else - USERPRIV_UPGRADE=false - USERSYNC_UPGRADE=false - REPOS_CONF_UPGRADE=false - fi if has_version ">=${CATEGORY}/${PN}-2.3.1" && \ has_version "<${CATEGORY}/${PN}-2.3.3"; then SYNC_DEPTH_UPGRADE=true @@ -279,93 +263,6 @@ new_config_protect() { } pkg_postinst() { - - if ${REPOS_CONF_UPGRADE} ; then - einfo "Generating repos.conf" - local repo_name= - [[ -f ${PORTDIR}/profiles/repo_name ]] && \ - repo_name=$(< "${PORTDIR}/profiles/repo_name") - if [[ -z ${REPOS_CONF_SYNC} ]] ; then - REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf") - REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* } - fi - local sync_type= - [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git - - if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then - sync_type=cvs - REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://} - fi - - cat <<-EOF > "${T}/repos.conf" - [DEFAULT] - main-repo = ${repo_name:-gentoo} - - [${repo_name:-gentoo}] - location = ${PORTDIR:-${EPREFIX}/usr/portage} - sync-type = ${sync_type:-rsync} - sync-uri = ${REPOS_CONF_SYNC} - EOF - - [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf" - - local dest=${EROOT:-${ROOT}}etc/portage/repos.conf - if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then - dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf - fi - # Don't install the config update if the desired repos.conf directory - # and config file exist, since users may accept it blindly and break - # their config (bug #478726). - [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \ - mv "${T}/repos.conf" "$(new_config_protect "${dest}")" - - if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then - einfo "Generating make.conf PORTDIR setting for backward compatibility" - for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do - [[ -e ${dest} ]] && break - done - [[ -d ${dest} ]] && dest=${dest}/portdir.conf - rm -rf "${T}/make.conf" - [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf" - cat <<-EOF >> "${T}/make.conf" - - # Set PORTDIR for backward compatibility with various tools: - # gentoo-bashcomp - bug #478444 - # euse - bug #474574 - # euses and ufed - bug #478318 - PORTDIR="${EPREFIX}/usr/portage" - EOF - mkdir -p "${dest%/*}" - mv "${T}/make.conf" "$(new_config_protect "${dest}")" - fi - fi - - local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}} - - if ${USERSYNC_UPGRADE} && \ - [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then - local ownership=$(get_ownership "${PORTDIR}") - if [[ -n ${ownership} ]] ; then - einfo "Adjusting PORTDIR permissions for usersync" - find "${PORTDIR}" -path "${distdir%/}" -prune -o \ - ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \ - -exec chown "${ownership}" {} + - fi - fi - - # Do this last, since it could take a long time if there - # are lots of live sources, and the user may be tempted - # to kill emerge while it is running. - if ${USERPRIV_UPGRADE} && \ - [[ -d ${distdir} && -w ${distdir} ]] ; then - local ownership=$(get_ownership "${distdir}") - if [[ ${ownership#*:} == portage ]] ; then - einfo "Adjusting DISTDIR permissions for userpriv" - find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \ - -exec chown -R portage:portage {} + - fi - fi - if ${SYNC_DEPTH_UPGRADE}; then ewarn "Please note that this release no longer respects sync-depth for" ewarn "git repositories. There have been too many problems and" -- cgit v1.2.3-65-gdbad