Skip to content

Commit

Permalink
Backed out changeset 3ccc5333fce1 (bug 1877347) for causing partial g…
Browse files Browse the repository at this point in the history
…eneration build bustages. a=backout

UltraBlame original commit: 0fc754e65091458a757b8794b5e8eacc61556167
  • Loading branch information
marco-c committed Feb 9, 2024
1 parent f2de996 commit 00849b6
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 153 deletions.
139 changes: 0 additions & 139 deletions python/mach/mach/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,142 +891,3 @@

return
None
def
strtobool
(
value
:
str
)
:

#
Reimplementation
of
distutils
.
util
.
strtobool

#
https
:
/
/
docs
.
python
.
org
/
3
.
9
/
distutils
/
apiref
.
html
#
distutils
.
util
.
strtobool

true_vals
=
(
"
y
"
"
yes
"
"
t
"
"
true
"
"
on
"
"
1
"
)

false_vals
=
(
"
n
"
"
no
"
"
f
"
"
false
"
"
off
"
"
0
"
)

value
=
value
.
lower
(
)

if
value
in
true_vals
:

return
1

if
value
in
false_vals
:

return
0

raise
ValueError
(
f
'
Expected
one
of
:
{
"
"
.
join
(
true_vals
+
false_vals
)
}
'
)
2 changes: 1 addition & 1 deletion python/mozbuild/mozbuild/backend/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2640,7 +2640,7 @@
"

from
mach
distutils
.
util
import
Expand Down
2 changes: 1 addition & 1 deletion python/mozbuild/mozbuild/code_analysis/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
"

from
mach
distutils
.
util
import
Expand Down
12 changes: 6 additions & 6 deletions taskcluster/docker/funsize-update-generator/scripts/funsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@
import
AsyncExitStack
from
distutils
.
util
import
strtobool
from
pathlib
import
Path
import
aiohttp
from
mach
.
util
import
strtobool
from
mardor
.
reader
Expand Down
107 changes: 101 additions & 6 deletions taskcluster/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@
Command
CommandArgument
SubCommand
from
mach
.
util
import
strtobool
logger
=
logging
Expand All @@ -120,6 +114,107 @@
"
)
def
strtobool
(
value
)
:

"
"
"
Convert
string
to
boolean
.

Wraps
"
distutils
.
util
.
strtobool
"
deferring
the
import
of
the
package

in
case
it
'
s
not
installed
.
Otherwise
we
have
a
"
chicken
and
egg
problem
"
where

|
mach
bootstrap
|
would
install
the
required
package
to
enable
"
distutils
.
util
"
but

it
can
'
t
because
mach
fails
to
interpret
this
file
.

"
"
"

from
distutils
.
util
import
strtobool

return
bool
(
strtobool
(
value
)
)
def
get_taskgraph_command_parser
(
name
Expand Down

0 comments on commit 00849b6

Please sign in to comment.