[Toybox] cleaning out deprecated code

Rob Landley rob at landley.net
Thu Aug 22 11:34:22 PDT 2019


On 8/21/19 6:02 PM, enh wrote:
>>>> Also, in toybox getconf.c I just bumped into:
>>>>
>>>> // When NDK r19 ships in 2018Q4, switch to _SC_UIO_MAXIOV.
>>>> // (Until then use this workaround for musl.)
>>>> #ifndef UIO_MAXIOV
>>>> #define UIO_MAXIOV 1024
>>>> #endif
>>>>
>>>> Is it safe to yank that now?
>>>
>>> yes, sorry for forgetting about that. r20's out now too!
>>
>> Woot.

Oh, while we're at it, in main.c function main():

  // Up to and including Android M, bionic's dynamic linker added a handler to
  // cause a crash dump on SIGPIPE. That was removed in Android N, but adbd
  // was still setting the SIGPIPE disposition to SIG_IGN, and its children
  // were inheriting that. In Android O, adbd is fixed, but manually asking
  // for the default disposition is harmless, and it'll be a long time before
  // no one's using anything older than O!
  if (CFG_TOYBOX_ON_ANDROID) signal(SIGPIPE, SIG_DFL);

The 7 year time horizon is toybox policy, but not _android_ policy? Are we going
to be building a lot of new toybox for old android devices? (I'd love to say
yes, but how far back does the NDK support? And if we DO build new toybox for
older android devices, I need to add some regression test targets and set up a
build thingy. I have NO clue how to do the magic selinux annotation outside of
AOSP. I've never actually rooted an android device; downloading a random third
party binary to install a rootkit _for_ me always seems... I haven't even
installed the steam dpkg on my laptop because the URL to the binary on their
servers ISN'T HTTPS. Grrr...)

Anyway, Oreo shipped 2 years (as of yesterday), pie is out... how long should
this code stay there?

(I'm thinking of walking through main() as part of my talk in 2 hours, and saw
this and went "Is that still really needed? If so, how long?")

We should probably have notes to schedule the removal of stuff like this (as you
did for the NDK thing above), so I can search for them as part of release prep.
(I have a checklist, I can add that...)

When would THIS one be scheduled for removal? (Android S or so? Given that N
wasn't "Nutella" I'm assuming S won't be Skittles. Kit-kat was a one-off then.
I'm guessing the lawyers were Unhappy. 7 years from Not-Nutella would be August
21, 2024, which seems a bit long even to me.)

(P.S. Yeah, I meant to get a release out before my talk. Didn't happen. Try
again this weekend...)

Rob



More information about the Toybox mailing list