commit: 2cc987336a1ea3bbdb562d25e748700dca53dd57 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat May 27 14:01:29 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat May 27 14:01:59 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cc98733
sys-apps/portage: modernise, sync live Signed-off-by: Sam James <sam <AT> gentoo.org> sys-apps/portage/portage-3.0.47.ebuild | 38 ++++++++++++++---------- sys-apps/portage/portage-9999.ebuild | 53 +++++++++++++++++++++++++--------- 2 files changed, 62 insertions(+), 29 deletions(-) diff --git a/sys-apps/portage/portage-3.0.47.ebuild b/sys-apps/portage/portage-3.0.47.ebuild index 77a95c1762c4..351719796ca4 100644 --- a/sys-apps/portage/portage-3.0.47.ebuild +++ b/sys-apps/portage/portage-3.0.47.ebuild @@ -12,28 +12,39 @@ inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix DESCRIPTION="The package management and distribution system for Gentoo" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" -SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/portage.git + https://github.com/gentoo/portage.git + " + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi LICENSE="GPL-2" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" SLOT="0" IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" RESTRICT="!test? ( test )" BDEPEND=" - app-arch/xz-utils test? ( dev-vcs/git ) " DEPEND=" - !build? ( $(python_gen_impl_dep 'ssl(+)') ) >=app-arch/tar-1.27 dev-lang/python-exec:2 >=sys-apps/sed-4.0.5 sys-devel/patch - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) + !build? ( $(python_gen_impl_dep 'ssl(+)') ) apidoc? ( dev-python/sphinx[${PYTHON_USEDEP}] dev-python/sphinx-epytext[${PYTHON_USEDEP}] ) + doc? ( + app-text/xmlto + ~app-text/docbook-xml-dtd-4.4 + ) " # Require sandbox-2.2 for bug #288863. # For whirlpool hash, require python[ssl] (bug #425046). @@ -70,6 +81,8 @@ RDEPEND=" !<app-portage/repoman-2.3.10 !~app-portage/repoman-3.0.0 " +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 +# NOTE: FEATURES=installsources requires debugedit and rsync PDEPEND=" !build? ( >=net-misc/rsync-2.6.4 @@ -77,8 +90,8 @@ PDEPEND=" >=sys-apps/file-5.44-r3 ) " -# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 -# NOTE: FEATURES=installsources requires debugedit and rsync + +distutils_enable_tests setup.py pkg_pretend() { local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" @@ -91,12 +104,11 @@ pkg_pretend() { } python_prepare_all() { - local PATCHES=( - ) - distutils-r1_python_prepare_all - sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die + if [[ ${PV} != 9999 ]] ; then + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die + fi if use gentoo-dev; then einfo "Disabling --dynamic-deps by default for gentoo-dev..." @@ -184,10 +196,6 @@ python_compile_all() { fi } -python_test() { - esetup.py test -} - python_install() { # Install sbin scripts to bindir for python-exec linking # they will be relocated in pkg_preinst() diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild index 93b8cfe952f4..351719796ca4 100644 --- a/sys-apps/portage/portage-9999.ebuild +++ b/sys-apps/portage/portage-9999.ebuild @@ -8,15 +8,23 @@ PYTHON_COMPAT=( pypy3 python3_{10..11} ) PYTHON_REQ_USE='bzip2(+),threads(+)' TMPFILES_OPTIONAL=1 -inherit distutils-r1 git-r3 linux-info toolchain-funcs tmpfiles prefix +inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix DESCRIPTION="The package management and distribution system for Gentoo" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" -EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage.git - https://github.com/gentoo/portage.git" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/portage.git + https://github.com/gentoo/portage.git + " + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi LICENSE="GPL-2" -KEYWORDS="" SLOT="0" IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" RESTRICT="!test? ( test )" @@ -25,15 +33,19 @@ BDEPEND=" test? ( dev-vcs/git ) " DEPEND=" - !build? ( $(python_gen_impl_dep 'ssl(+)') ) >=app-arch/tar-1.27 dev-lang/python-exec:2 >=sys-apps/sed-4.0.5 sys-devel/patch - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) + !build? ( $(python_gen_impl_dep 'ssl(+)') ) apidoc? ( dev-python/sphinx[${PYTHON_USEDEP}] dev-python/sphinx-epytext[${PYTHON_USEDEP}] - )" + ) + doc? ( + app-text/xmlto + ~app-text/docbook-xml-dtd-4.4 + ) +" # Require sandbox-2.2 for bug #288863. # For whirlpool hash, require python[ssl] (bug #425046). # For compgen, require bash[readline] (bug #445576). @@ -67,7 +79,10 @@ RDEPEND=" !<app-admin/logrotate-3.8.0 !<app-portage/gentoolkit-0.4.6 !<app-portage/repoman-2.3.10 - !~app-portage/repoman-3.0.0" + !~app-portage/repoman-3.0.0 +" +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 +# NOTE: FEATURES=installsources requires debugedit and rsync PDEPEND=" !build? ( >=net-misc/rsync-2.6.4 @@ -75,8 +90,8 @@ PDEPEND=" >=sys-apps/file-5.44-r3 ) " -# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 -# NOTE: FEATURES=installsources requires debugedit and rsync + +distutils_enable_tests setup.py pkg_pretend() { local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" @@ -91,6 +106,10 @@ pkg_pretend() { python_prepare_all() { distutils-r1_python_prepare_all + if [[ ${PV} != 9999 ]] ; then + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die + fi + if use gentoo-dev; then einfo "Disabling --dynamic-deps by default for gentoo-dev..." sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ @@ -177,10 +196,6 @@ python_compile_all() { fi } -python_test() { - esetup.py test -} - python_install() { # Install sbin scripts to bindir for python-exec linking # they will be relocated in pkg_preinst() @@ -256,6 +271,16 @@ pkg_preinst() { if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} fi + + if has_version "<${CATEGORY}/${PN}-2.3.77"; then + elog "The emerge --autounmask option is now disabled by default, except for" + elog "portions of behavior which are controlled by the --autounmask-use and" + elog "--autounmask-license options. For backward compatibility, previous" + elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." + elog "Users can get the old behavior simply by adding --autounmask to the" + elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" + elog "change, see https://bugs.gentoo.org/658648." + fi } pkg_postinst() {