Add 'which' method to mozfile

RESOLVED WONTFIX

Status

Testing
Mozbase
RESOLVED WONTFIX
6 years ago
6 years ago

People

(Reporter: ahal, Assigned: ahal)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I've needed this in a few places, and I'd like to use it when finding the proper adb binary in b2g automation (since adb tends to get installed all over the place).

https://hg.mozilla.org/build/mozharness/file/bb5df91e065e/mozharness/base/script.py#l302
Created attachment 665911 [details] [diff] [review]
Patch 1.0 - Add which method
Attachment #665911 - Flags: review?(jhammel)

Updated

6 years ago
OS: Linux → All
Hardware: x86_64 → All

Comment 2

6 years ago
Comment on attachment 665911 [details] [diff] [review]
Patch 1.0 - Add which method

+deps = ['mozinfo >= 0.3.3']

Any particular reason for this version number?  Since we don't have a versioning story yet I'd prefer to leave it unpegged as mozinfo.isWin has been there for time immemorial

Comment 3

6 years ago
I'm not opposed to taking this if we really need it, but there is a 3rd party which, http://pypi.python.org/pypi/which , which is also in-tree, https://mxr.mozilla.org/mozilla-central/source/python/which/ . :ahal, what software were you planning on using this for?  Is the 3rd party `which` sufficient?
I guess that is fine. Is the third party which already available in the m-c virtualenv?
On the other hand, this might be something that could eventually be removed from the tree and consolidated into mozbase. Not that I'm volunteering or anything :p

Comment 6

6 years ago
yep: https://mxr.mozilla.org/mozilla-central/source/build/virtualenv/packages.txt#14

not sure how/if it can be used from packaged tests, but i'm sure that is doable

Comment 7

6 years ago
(In reply to Andrew Halberstadt [:ahal] from comment #5)
> On the other hand, this might be something that could eventually be removed
> from the tree and consolidated into mozbase. Not that I'm volunteering or
> anything :p

In general, I would like us to use 3rd party packages if/when possible.  Hopefully this can cut down our maintenance burden

Comment 8

6 years ago
Comment on attachment 665911 [details] [diff] [review]
Patch 1.0 - Add which method

I'm going to take this down for review until we figure out if we want this.  If there is a needed use case, I think we should take it
Attachment #665911 - Flags: review?(jhammel)

Comment 9

6 years ago
Ping....any reason not to close this?
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.