busybox-w32 icon indicating copy to clipboard operation
busybox-w32 copied to clipboard

Potentially incorrect commit adding the `make` applet

Open dscho opened this issue 2 years ago • 3 comments

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.

dscho avatar Aug 06 '22 14:08 dscho

  1. ar archive files have a 16 byte field for filenames. Filenames longer than this require additional code. By default upstream BusyBox only handles ar archives in the dpkg and dpkg-deb applets, neither of which requires the use of long filenames. The ar and make applets, on the other hand, do require support for long filenames. Hence FEATURE_AR_LONG_FILENAMES is enabled when either AR or MAKE is enabled.
  2. The ar, dpkg and dpkg-deb applets are limited to dealing with a single archive file. They therefore don't bother to free the filenames they allocate. The make applet may be required to handle many archive files. It was considered prudent to avoid leaking memory in this case.

rmyorston avatar Aug 07 '22 10:08 rmyorston

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/.

dscho avatar Aug 08 '22 12:08 dscho

good applet! I will try to use make applet to build busybox-w32 itself

Shumen avatar Aug 26 '22 15:08 Shumen