Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189659 - app-portage/mirrorselect ebuild misses sys-apps/which dependency
Summary: app-portage/mirrorselect ebuild misses sys-apps/which dependency
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-21 02:52 UTC by eezyy
Modified: 2009-01-01 01:13 UTC (History)
1 user (show)

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


Attachments
mirrorselect-1.3_no_which.patch (mirrorselect_no_which.patch,649 bytes, patch)
2008-02-29 14:33 UTC, michael@smith-li.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description eezyy 2007-08-21 02:52:52 UTC
The "mirrorselect" tool needs the "which" tool to check for additional dependencies. Without it, it will display a misleading error message. To prevent this, it is probably useful to add the dependency to the ebuild, so the tool won't get called without "which" installed. Proposed patch for mirrorselect-1.2.ebuild follows.

--- /tmp/a      2007-08-21 02:44:35.000000000 +0000
+++ /tmp/b      2007-08-21 02:44:58.000000000 +0000
@@ -12,7 +12,8 @@
 IUSE=""

 RDEPEND=">=dev-util/dialog-0.7
-       net-analyzer/netselect"
+       net-analyzer/netselect
+       sys-apps/which"

 S=${WORKDIR}

Reproducible: Always

Steps to Reproduce:
1. emerge --unmerge sys-apps/which
2. emerge mirrorselect
3. mirrorselect -s4 -o -D
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-21 05:53:34 UTC
(In reply to comment #0)
> 1. emerge --unmerge sys-apps/which

Don't unmerge packages that are part of system (grep sys-apps/which /usr/portage/profiles/base/packages).
Comment 2 eezyy 2007-08-21 11:52:15 UTC
So system packages don't get recorded as dependencies, right? I still think this issue has some relevancy, as it makes sense to run mirrorselect early when compiling packages from system. But with the current architecture this is probably more of a documentation issue.
Comment 3 Richard Scott 2007-10-24 08:30:55 UTC
In addition, if you do a stage1 install you don't get `which` installed, so perhaps having it as a dependency would be nice.

Also mirrorselect needs something like `wget`, `fetch` or `curl` as a dependency as I have to also install one during a stage1 install as they are not pulled in.
Comment 4 michael@smith-li.com 2008-02-24 23:59:20 UTC
http://devmanual.gentoo.org/general-concepts/dependencies states that unless there are specific version restrictions, no package outside of system should explicitly define a R?DEPEND on a package in the system target.

As for stage 1 and 2 installs, well, there's a reason they're unsupported. Actually mirrorselect is the least of your problems, because it's not critical that you set custom mirrors during the install.

As far as I'm concerned this does not appear to be a valid bug.
Comment 5 eezyy 2008-02-25 00:28:09 UTC
(In reply to comment #4)
> http://devmanual.gentoo.org/general-concepts/dependencies states that unless
> there are specific version restrictions, no package outside of system should
> explicitly define a R?DEPEND on a package in the system target.
> 

Ok, this makes sense. So the proposed fix is probably not appropriate. Rather than adding a dependency, patching mirrorselect to check for which in $PATH could make sense, so users won't get misleading error messages (maybe already done, haven't looked into mirrorselect lately). It just seems weird that mirrorselect does take into account that download tools may be missing, but does not handle the case when which is missing.

> As for stage 1 and 2 installs, well, there's a reason they're unsupported.
> Actually mirrorselect is the least of your problems, because it's not critical
> that you set custom mirrors during the install.
> 

It's not critical, but it's not all that improbable that someone tries to do that provided that the gentoo documentation mentions the possibility.

Stage 1 and 2 may be unsupported, but it may be argued that it's still useful to make stage 1 and 2 more robust by reducing the possibility of running into problems.

> As far as I'm concerned this does not appear to be a valid bug.
> 

I agree that it belongs to mirrorselect, not to portage.
Comment 6 michael@smith-li.com 2008-02-29 14:33:56 UTC
Created attachment 144944 [details, diff]
mirrorselect-1.3_no_which.patch

Replaces 'which' call with python internal function.

--untested-- It looks correct, but I didn't have time to test it -- please test.
Comment 7 Zac Medico gentoo-dev 2009-01-01 01:13:50 UTC
Thanks, this is fixed in mirrorselect-1.4.