busybox-w32
busybox-w32 copied to clipboard
Potentially incorrect commit adding the `make` applet
As pointed out in https://github.com/rmyorston/busybox-w32/commit/67a630e5af1ace1dd528ea9652ee69102b3136c3#r80495688 and https://github.com/rmyorston/busybox-w32/commit/67a630e5af1ace1dd528ea9652ee69102b3136c3#r80495725, the make
code came into the code base without the code review that would have been appropriate.
-
ar
archive files have a 16 byte field for filenames. Filenames longer than this require additional code. By default upstream BusyBox only handlesar
archives in thedpkg
anddpkg-deb
applets, neither of which requires the use of long filenames. Thear
andmake
applets, on the other hand, do require support for long filenames. HenceFEATURE_AR_LONG_FILENAMES
is enabled when eitherAR
orMAKE
is enabled. - The
ar
,dpkg
anddpkg-deb
applets are limited to dealing with a single archive file. They therefore don't bother to free the filenames they allocate. Themake
applet may be required to handle many archive files. It was considered prudent to avoid leaking memory in this case.
That still does not address the concern that a huge commit was added without any code review that touches things that are pretty clearly outside of the make
applet. These changes should have been made as separate commits in the least, and it would probably have been prudent to explain the reasoning for these patches in the commit messages. For inspiration how to improve your commit game, see https://github.blog/2022-06-30-write-better-commits-build-better-projects/.
good applet! I will try to use make applet to build busybox-w32 itself