Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689226 - --buildpkgonly ignores DEPEND hard blockers
Summary: --buildpkgonly ignores DEPEND hard blockers
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: AMD64 Linux
: Normal minor
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 300071 701268
  Show dependency tree
 
Reported: 2019-07-04 06:17 UTC by Raimonds Cicans
Modified: 2020-02-29 02:56 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raimonds Cicans 2019-07-04 06:17:40 UTC
"emerge --buildpkgonly" tries to build package which have DEPEND hard blocking package(s) already installed.
Depending on package combination, build process may fail (but it should not start in first place).

Reproducible: Always

Steps to Reproduce:
1. emerge --oneshot media-plugins/mediastreamer-bcg729
2. emerge --buildpkgonly net-libs/pjproject 
3.
Actual Results:  
"emerge --buildpkgonly net-libs/pjproject" fails at build stage

Expected Results:  
"emerge --buildpkgonly net-libs/pjproject" exit with error message about dependencies problem or uninstall media-plugins/mediastreamer-bcg729 (if no package depends on it).

emerge command without --buildpkgonly flag works flawlessly - exit with error message about dependency problem.

Package net-libs/pjproject is just one example. Problem affect (more or less) all packages that have DEPEND hard blockers.

Portage: latest stable (2.3.66-r1)

Tested on several different AMD64 computers with different profiles.
Comment 1 Zac Medico gentoo-dev 2019-11-15 18:51:28 UTC
They're ignored for --buildpkgonly because of this logic in the depgraph _accept_blocker_conflicts method:

> 	def _accept_blocker_conflicts(self):
> 		acceptable = False
> 		for x in ("--buildpkgonly", "--fetchonly",
> 			"--fetch-all-uri", "--nodeps"):
> 			if x in self._frozen_config.myopts:
> 				acceptable = True
> 				break
> 		return acceptable
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-11-23 11:43:52 UTC
Ping.  This just wastes a few hours of my time on trying to figure out why pytest test are failing.
Comment 4 Larry the Git Cow gentoo-dev 2019-11-26 20:35:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b3131db0e22085dba7d0fb9fc6e5ec70c8c577d

commit 1b3131db0e22085dba7d0fb9fc6e5ec70c8c577d
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-11-26 18:05:47 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-26 20:34:53 +0000

    emerge --buildpkgonly: respect buildtime hard blockers
    
    Bug: https://bugs.gentoo.org/689226
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/depgraph.py                    | 24 ++++++---
 lib/portage/tests/resolver/test_blocker.py | 87 +++++++++++++++++++++++++++++-
 2 files changed, 102 insertions(+), 9 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2019-11-27 03:45:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e36007163e56015301e2146c671fb14b3b0af57

commit 3e36007163e56015301e2146c671fb14b3b0af57
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-11-27 03:39:22 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-27 03:39:57 +0000

    sys-apps/portage: Bump to version 2.3.80
    
     #667432 Rename DCO_SIGNED_OFF_BY config variable to SIGNED_OFF_BY.
     #674562 eapply: Drop -s option for patch.
     #689226 emerge --buildpkgonly: respect buildtime hard blockers
     #699986 emerge: add --quickpkg-direct option
    
    Bug: https://bugs.gentoo.org/701268
    Bug: https://bugs.gentoo.org/667432
    Bug: https://bugs.gentoo.org/674562
    Bug: https://bugs.gentoo.org/689226
    Bug: https://bugs.gentoo.org/699986
    Package-Manager: Portage-2.3.80, Repoman-2.3.18
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.80.ebuild | 261 +++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2019-11-28 01:43:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=a107f5bad841e5fad65298881e5a1feb9ffdbed1

commit a107f5bad841e5fad65298881e5a1feb9ffdbed1
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-11-28 01:40:50 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-28 01:42:26 +0000

    depgraph: fix buildtime_blockers logic
    
    Fixes: 1b3131db0e22 ("emerge --buildpkgonly: respect buildtime hard blockers")
    Bug: https://bugs.gentoo.org/689226
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/depgraph.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Comment 7 Zac Medico gentoo-dev 2019-11-28 02:03:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7418f55285fcbde7b4f9aee3926b3a818b1b865e

commit 7418f55285fcbde7b4f9aee3926b3a818b1b865e
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-11-27 17:57:30 -0800
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-27 17:58:23 -0800

    sys-apps/portage: 2.3.80-r1 revbump for bug 689226
    
    Package-Manager: Portage-2.3.80, Repoman-2.3.19
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest                                            | 1 +
 sys-apps/portage/{portage-2.3.80.ebuild => portage-2.3.80-r1.ebuild} | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)