Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 470200 Details for
Bug 294719
emerge --onlydeps and PDEPEND
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
onlydeps-with-rdeps patch
0001-Change-onlydeps-behavior.patch (text/plain), 4.21 KB, created by
William Throwe
on 2017-04-16 22:32:34 UTC
(
hide
)
Description:
onlydeps-with-rdeps patch
Filename:
MIME Type:
Creator:
William Throwe
Created:
2017-04-16 22:32:34 UTC
Size:
4.21 KB
patch
obsolete
>From 1551b8a85554c26e2d9b142f489f65a62609d080 Mon Sep 17 00:00:00 2001 >From: William Throwe <wtt6@cornell.edu> >Date: Sat, 11 Mar 2017 20:41:59 -0500 >Subject: [PATCH] Change onlydeps behavior > >--- > man/emerge.1 | 5 +++ > pym/_emerge/depgraph.py | 5 +++ > pym/_emerge/main.py | 6 +++ > .../tests/resolver/test_onlydeps_minimal.py | 47 ++++++++++++++++++++++ > 4 files changed, 63 insertions(+) > create mode 100644 pym/portage/tests/resolver/test_onlydeps_minimal.py > >diff --git a/man/emerge.1 b/man/emerge.1 >index 7db4271..7d3dabf 100644 >--- a/man/emerge.1 >+++ b/man/emerge.1 >@@ -716,6 +716,11 @@ it possible for \fB\-\-deep\fR to be disabled by default. > Only merge (or pretend to merge) the dependencies of the packages > specified, not the packages themselves. > .TP >+.BR "\-\-onlydeps\-with\-rdeps < y | n >" >+Include run time dependencies when \fB\-\-onlydeps\fR is specified. >+When this is disabled only build time dependencies are included. This >+option is enabled by default. >+.TP > .BR "\-\-package\-moves [ y | n ]" > Perform package moves when necessary. This option is enabled > by default. Package moves are typically applied immediately >diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py >index 1379b05..2c27d5b 100644 >--- a/pym/_emerge/depgraph.py >+++ b/pym/_emerge/depgraph.py >@@ -3000,6 +3000,11 @@ class depgraph(object): > edepend["RDEPEND"] = "" > edepend["PDEPEND"] = "" > >+ if pkg.onlydeps and \ >+ self._frozen_config.myopts.get("--onlydeps-with-rdeps") == 'n': >+ edepend["RDEPEND"] = "" >+ edepend["PDEPEND"] = "" >+ > ignore_build_time_deps = False > if pkg.built and not removal_action: > if self._dynamic_config.myparams.get("bdeps") in ("y", "auto"): >diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py >index 76e963a..fda0323 100644 >--- a/pym/_emerge/main.py >+++ b/pym/_emerge/main.py >@@ -147,6 +147,7 @@ def insert_optional_args(args): > '--jobs' : valid_integers, > '--keep-going' : y_or_n, > '--load-average' : valid_floats, >+ '--onlydeps-with-rdeps' : y_or_n, > '--package-moves' : y_or_n, > '--quiet' : y_or_n, > '--quiet-build' : y_or_n, >@@ -559,6 +560,11 @@ def parse_opts(tmpcmdline, silent=False): > "action" : "append", > }, > >+ "--onlydeps-with-rdeps": { >+ "help" : "modify interpretation of depedencies", >+ "choices" : true_y_or_n >+ }, >+ > "--rebuild-exclude": { > "help" :"A space separated list of package names or slot atoms. " + \ > "Emerge will not rebuild these packages due to the " + \ >diff --git a/pym/portage/tests/resolver/test_onlydeps_minimal.py b/pym/portage/tests/resolver/test_onlydeps_minimal.py >new file mode 100644 >index 0000000..13c79ed >--- /dev/null >+++ b/pym/portage/tests/resolver/test_onlydeps_minimal.py >@@ -0,0 +1,47 @@ >+# Copyright 2017 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+ >+from portage.tests import TestCase >+from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase >+ >+class OnlydepsMinimalTestCase(TestCase): >+ >+ def testOnlydepsMinimal(self): >+ ebuilds = { >+ "dev-libs/A-1": { "DEPEND": "dev-libs/B", >+ "RDEPEND": "dev-libs/C", >+ "PDEPEND": "dev-libs/D" }, >+ "dev-libs/B-1": { }, >+ "dev-libs/C-1": { }, >+ "dev-libs/D-1": { }, >+ } >+ installed = { >+ } >+ >+ test_cases = ( >+ ResolverPlaygroundTestCase( >+ ["dev-libs/A"], >+ all_permutations = True, >+ success = True, >+ options = { "--onlydeps": True, >+ "--onlydeps-with-rdeps": "y" }, >+ mergelist = ["dev-libs/B-1", >+ "dev-libs/C-1", >+ "dev-libs/D-1"]), >+ ResolverPlaygroundTestCase( >+ ["dev-libs/A"], >+ all_permutations = True, >+ success = True, >+ options = { "--onlydeps": True, >+ "--onlydeps-with-rdeps": "n" }, >+ mergelist = ["dev-libs/B-1"]), >+ ) >+ >+ playground = ResolverPlayground(ebuilds=ebuilds, >+ installed=installed, debug=False) >+ try: >+ for test_case in test_cases: >+ playground.run_TestCase(test_case) >+ self.assertEqual(test_case.test_success, True, test_case.fail_msg) >+ finally: >+ playground.cleanup() >-- >2.10.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 294719
:
211251
|
466762
|
466830
|
467468
|
467470
| 470200