From 6ee701eb65fbfc00cbf6ebc16de2d6487ba2cfd7 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 21 Sep 2012 21:03:05 +0200 Subject: [PATCH] Support EAPI="5-progress". --- bin/dohtml.py | 2 +- bin/ebuild.sh | 6 +- doc/package/ebuild.docbook | 1 + doc/package/ebuild/eapi/5-progress.docbook | 133 ++++++++++++++++++ doc/portage.docbook | 1 + pym/portage/__init__.py | 2 +- pym/portage/eapi.py | 10 +- .../tests/update/test_update_dbentry.py | 2 +- 8 files changed, 146 insertions(+), 11 deletions(-) create mode 100644 doc/package/ebuild/eapi/5-progress.docbook diff --git a/bin/dohtml.py b/bin/dohtml.py index 3e80ef5f6..3af270509 100755 --- a/bin/dohtml.py +++ b/bin/dohtml.py @@ -106,7 +106,7 @@ class OptionsClass: self.DOCDESTTREE = os.environ["_E_DOCDESTTREE_"] self.allowed_exts = ['css', 'gif', 'htm', 'html', 'jpeg', 'jpg', 'js', 'png'] - if os.environ.get("EAPI", "0") in ("4-python",): + if os.environ.get("EAPI", "0") in ("4-python", "5-progress"): self.allowed_exts += ['ico', 'svg', 'xhtml', 'xml'] self.allowed_files = [] self.disallowed_dirs = ['CVS'] diff --git a/bin/ebuild.sh b/bin/ebuild.sh index a6ff45301..79da2b518 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -26,7 +26,7 @@ else __strip_duplicate_slashes \ use_with use_enable ; do eval "${x}() { - if has \"\${EAPI:-0}\" 4-python; then + if has \"\${EAPI:-0}\" 4-python 5-progress; then die \"\${FUNCNAME}() calls are not allowed in global scope\" fi }" @@ -35,7 +35,7 @@ else # `use multislot` is false for the "depend" phase. for x in use useq usev usex ; do eval "${x}() { - if has \"\${EAPI:-0}\" 4-python; then + if has \"\${EAPI:-0}\" 4-python 5-progress; then die \"\${FUNCNAME}() calls are not allowed in global scope\" else return 1 @@ -506,7 +506,7 @@ if ! has "$EBUILD_PHASE" clean cleanrm depend && \ [[ -n $EAPI ]] || EAPI=0 fi -if has "${EAPI:-0}" 4-python; then +if has "${EAPI:-0}" 4-python 5-progress; then shopt -s globstar fi diff --git a/doc/package/ebuild.docbook b/doc/package/ebuild.docbook index e268a3d11..98084c8fa 100644 --- a/doc/package/ebuild.docbook +++ b/doc/package/ebuild.docbook @@ -12,5 +12,6 @@ &package_ebuild_eapi_4_python; &package_ebuild_eapi_4_slot_abi; &package_ebuild_eapi_5; +&package_ebuild_eapi_5_progress; diff --git a/doc/package/ebuild/eapi/5-progress.docbook b/doc/package/ebuild/eapi/5-progress.docbook new file mode 100644 index 000000000..142ff8e2e --- /dev/null +++ b/doc/package/ebuild/eapi/5-progress.docbook @@ -0,0 +1,133 @@ +
+ EAPI 5-progress + + Also see the official EAPI 5-progress Specification. + +
+ Helpers +
+ Extended default list of extensions in dohtml + + dohtml by default additionally installs files with .ico, .svg, .xhtml and .xml extensions. + +
+
+ Helpers Banned in Global Scope + + + diropts + docompress + exeopts + insopts + keepdir + libopts + use + use_enable + use_with + useq + usev + + +
+
+
+ Metadata +
+ Support for Period Characters in Package Names + + The "." character is allowed in package names. + +
+
+ Support for Period Characters in USE Flags + + The "." character is allowed in USE flags. + +
+
+ Repository Dependencies + + Repository dependencies are supported in atoms in DEPEND, PDEPEND and RDEPEND and atoms passed to best_version and has_version functions. + Repository dependency is specified by two colons followed by repository name. + + Repository Dependency Examples + + + + + Atom + + + + + dev-lang/python::progress + + + >=dev-lang/python-3.2::progress + + + dev-lang/python:3.2::progress + + + dev-lang/python::progress[xml] + + + dev-lang/python:3.2::progress[xml] + + + +
+
+
+
+ globstar shell option enabled by default + + globstar shell option is enabled by default, which enables recursive expansion of ** pattern in pathname expansion context. + +
+
+ Variables +
+ REPOSITORY Variable + + The new REPOSITORY variable is set in ebuild environment. This variable contains name of repository, which contains currently used ebuild. + +
+
+
+ Extended Repository-Level Configuration + + Repository-level configuration in ${repository_path}/profiles is supported for the following files: + + make.defaults + package.use + package.use.force + package.use.mask + package.use.stable.force + package.use.stable.mask + use.force + use.mask + use.stable.force + use.stable.mask + + +
+
+ Directories Allowed for Profile-Level and Repository-Level Configuration + + The following files can be directories: + + package.mask + package.use + package.use.force + package.use.mask + package.use.stable.force + package.use.stable.mask + use.force + use.mask + use.stable.force + use.stable.mask + + +
+
diff --git a/doc/portage.docbook b/doc/portage.docbook index f5803141e..04db26303 100644 --- a/doc/portage.docbook +++ b/doc/portage.docbook @@ -23,6 +23,7 @@ + diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index afaff516b..83669398f 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -414,7 +414,7 @@ def abssymlink(symlink, target=None): _doebuild_manifest_exempt_depend = 0 -_testing_eapis = frozenset(["4-python", "4-slot-abi", "5_pre2"]) +_testing_eapis = frozenset(["4-python", "4-slot-abi", "5_pre2", "5-progress"]) _deprecated_eapis = frozenset(["4_pre1", "3_pre2", "3_pre1", "5_pre1"]) def _eapi_is_deprecated(eapi): diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py index 42c108b2e..e02e017ee 100644 --- a/pym/portage/eapi.py +++ b/pym/portage/eapi.py @@ -48,7 +48,7 @@ def eapi_exports_EBUILD_PHASE_FUNC(eapi): return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi") def eapi_exports_REPOSITORY(eapi): - return eapi in ("4-python",) + return eapi in ("4-python", "5-progress") def eapi_has_pkg_pretend(eapi): return eapi not in ("0", "1", "2", "3") @@ -69,19 +69,19 @@ def eapi_has_use_dep_defaults(eapi): return eapi not in ("0", "1", "2", "3") def eapi_has_repo_deps(eapi): - return eapi in ("4-python",) + return eapi in ("4-python", "5-progress") def eapi_allows_dots_in_PN(eapi): - return eapi in ("4-python",) + return eapi in ("4-python", "5-progress") def eapi_allows_dots_in_use_flags(eapi): - return eapi in ("4-python",) + return eapi in ("4-python", "5-progress") def eapi_supports_stable_use_forcing_and_masking(eapi): return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi") def eapi_allows_directories_on_profile_level_and_repository_level(eapi): - return eapi in ("4-python",) + return eapi in ("4-python", "5-progress") _eapi_attrs = collections.namedtuple('_eapi_attrs', 'dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC ' diff --git a/pym/portage/tests/update/test_update_dbentry.py b/pym/portage/tests/update/test_update_dbentry.py index ae634f031..0d4c5a02d 100644 --- a/pym/portage/tests/update/test_update_dbentry.py +++ b/pym/portage/tests/update/test_update_dbentry.py @@ -191,7 +191,7 @@ class UpdateDbentryTestCase(TestCase): self.assertTrue(old_pattern.search(rdepend) is None) self.assertTrue("dev-libs/M-moved" in rdepend) - # EAPI 4-python N -> N.moved + # EAPI 4-python/*-progress N -> N.moved rdepend = vardb.aux_get("dev-libs/B-1", ["RDEPEND"])[0] old_pattern = re.compile(r"\bdev-libs/N(\s|$)") self.assertTrue(old_pattern.search(rdepend) is None) -- 2.26.2