Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503490 - emerge should update build dependencies by default
Summary: emerge should update build dependencies by default
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-05 09:44 UTC by Andrei Voropaev
Modified: 2014-05-26 10:15 UTC (History)
0 users

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 Andrei Voropaev 2014-03-05 09:44:44 UTC
As far as I understand, build dependencies by default are installed/updated only when some package requires that.

When one removes unused packages using --depclean, the build dependencies by default are not removed.

This default behavior completely hides from the end user the fact, that there are some packages, that are not needed by the system but lay around for the case they are needed later for building. So far so good.

But, some recent update to emerge now forces update of build dependencies when --depclean is used. This is confusing. I never had to touch --with-bdeps option before, and now I have to always think about when to use it.

Is there any way to make it more consistent? For example, if --depclean requires that build dependencies are up to date, then "emerge world" should by default update them. And if the user decides not to keep build dependencies, then he/she can use --with-bdeps=n both for update and --depclean. Then update won't update them, and depclean will remove them.

Of course, old semantic, when --depclean just didn't care about build dependencies being up to date, is preferrable.

Reproducible: Sometimes

Steps to Reproduce:
1. Have some build dependency that was not updated
2.
3.
Comment 1 Steve L 2014-03-05 15:34:18 UTC
It's only a bug if you're using: --depclean --with-bdeps y (not the default, means: clean the bdeps) imo.

If it happens in normal usage (ie keep the bdeps) how is it supposed to know which to remove if they're not updated? It's always required a full upgrade for that reason; it's needed for the runtime deps case, so the same logic applies.

So you should run: emerge -av -uD --changed-use world --with-bdeps=y
(upgrade the bdeps) at minimum before you depclean normally.
Or use -N instead of --changed-use for a fuller resolve.
Comment 2 Sebastian Luther (few) 2014-03-05 16:21:32 UTC
(In reply to Andrei Voropaev from comment #0)
> But, some recent update to emerge now forces update of build dependencies
> when --depclean is used. This is confusing. I never had to touch
> --with-bdeps option before, and now I have to always think about when to use
> it.

Could you give an example?
Comment 3 Andrei Voropaev 2014-03-06 08:31:04 UTC
I can't give example at least right now, because I've already updated everything with --with-bdeps=y. I'll check my old laptop, maybe update on that one will produce this situation.

I always update the system using "emerge --update --newuse --deep @world". After that I run "emerge --depclean". I use Gentoo since 2002 and last update was the first time when I got message saying that some build dependency is not updated and I should run emerge with --with-bdeps=y. That is why I've decided that some change was introduced. Looks like, there's at least one more person, that has seen this message.

Now, why depclean needs build dependency to be up-to date? I admit, I don't know full algorithm, but it is obvious, that depclean knows that some package is only build dependency, if --with-bdeps is not given, then depclean should just ignore those packages, pretend, that they are not installed. I assume, build-dependencies are updated only when building of some package requires newer version.

Again, if the deplcean algorithm for whatever reason demands, that all of the existing packages are up-to-date, then "emerge --update" by default should also update all build-dependencies.

I know, this is cosmetic question, but this is the first time, when I got confused over the use of emerge, everything else seems so nice and logically perfect :)
Comment 4 dwfreed 2014-03-06 09:10:04 UTC
It's impossible to say without knowing the scenario in which this occurs.  If you can reproduce this on another machine, and provide full details as to how you did it, that'd be greatly appreciated.
Comment 5 Andrei Voropaev 2014-03-08 16:16:41 UTC
Hm. Looks like I was wrong about this thing. I've updated my old laptop and it definitely has 3 build dependencies that are not updated (-p --update --with-bdeps=y lists them). Still, emerge --depclean worked without demanding an update for those packages.

This leads to conclusion, that previous situation was specific to some package. Too bad I didn't record what was that package. All I can say, the system was updated and emerge --depclean recommended to run update one more time with flag --with-bdeps=y.

Now, either one can check when emerge --depclean gives out such message, or I'll keep my eyes open in hope to see this message again. For now, I can mark it as resolved.
Comment 6 Andrei Voropaev 2014-05-26 10:15:06 UTC
Ok. I've hit one problem, where emerge --deplcean demands from me running of update with --with-bdeps=y flag.

Here's the output from emerge -p --depclean


 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 * 
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence, it is often necessary to run `emerge --update
 * --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
 * Dependencies could not be completely resolved due to
 * the following required packages not being installed:
 * 
 *   dev-lang/python-exec:0[python_targets_jython2_5(-),python_targets_jython2_7(-),python_targets_python3_2(-),python_targets_python3_3(-),python_targets_python2_6(-),python_targets_python2_7(-),-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_python3_2(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_python2_6(-),-python_single_target_python2_7(-)] pulled in by:
 *     dev-python/python-exec-10000.1
 * 
 * Have you forgotten to do a complete update prior to depclean? The
 * most comprehensive command for this purpose is as follows:
 * 
 *   emerge --update --newuse --deep --with-bdeps=y @world
 * 
 * Note that the --with-bdeps=y option is not required in many
 * situations. Refer to the emerge manual page (run `man emerge`)
 * for more information about --with-bdeps.
 * 
 * Also, note that it may be necessary to manually uninstall
 * packages that no longer exist in the portage tree, since it may
 * not be possible to satisfy their dependencies.

Running emerge -pv --update --newuse --deep world produces no packages for update. Running the same with --with-bdeps=y produces following list


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS    ] dev-lang/python-exec-0.3.1-r1:0 [2.0.1-r1:2] PYTHON_TARGETS="(jython2_5) (jython2_7) (pypy) (python2_6) (python2_7) (python3_2) (python3_3) (-python3_4)" 73 kB
[ebuild   R    ] dev-python/python-exec-10000.1  PYTHON_TARGETS="(jython2_5) (jython2_7) (pypy%*) (python2_6) (python2_7) (python3_2) (python3_3) (-python3_4) (-pypy2_0%*)" 0 kB
[ebuild     U  ] virtual/awk-1 [0] 0 kB
[ebuild     U  ] app-admin/eselect-ctags-1.16 [1.15] 9 kB
[ebuild     U  ] media-libs/glu-9.0.0-r1 [9.0.0] USE="-static-libs (-multilib%)" 0 kB
[ebuild     U  ] virtual/glu-9.0-r1 [9.0] 0 kB

Total: 6 packages (4 upgrades, 1 in new slot, 1 reinstall), Size of downloads: 82 kB

revdep-rebuild does not find any broken packages.

This problem happens on 32-bit system. On 64-bit system with essentially the same configuration no problems are reported.