On 14/02/2022 12:15, Robert Riebisch via Svardos-users wrote:
well?), but using this at post-install time, along with the extra tee,
really seems to be a lot of hoops for not much... Let's not forget that

"a lot of"?
Just two.

Yes, two bricks, but they imply quite a few acrobatic figures:

- loading a hack into memory that intercepts all DOS calls
- running a second copy of COMMAND.COM (memory usage+)
- this copy of COMMAND.COM writes everything into a temporary file,
  logging some stuff to stderr which are changed to stdout by the
  previous hack so they end up in the same temporary file
- when this 2nd copy of COMMAND.COM exits, a tee2 binary is executed,
  fed with the temp file previously made by COMMAND.COM, it reads it,
  echoes it to screen and copies to yet another file (install.log)
- then the temporary file is removed
- then the tee and 2to1 binaries are removed (failures not logged!)
- 2to1 stays in memory until reboot

That is truly a contraption that multiplies the number of things that can go wrong. And it doesn't even fulfill the initial goal, which was to "catch all errors and log to file", since tee creation/removal of pipe-related temp files can also fail and output errors. So this never ends.

A functionally identical version would be something like that:
2to1.com
pkg install stuff.zip >> logfile
del oldfiles >> logfile
(etc)
type logfile

But this still has some of the problems of your proposed solution: the user must wait and see nothing until all is finished. And if he gets an "abort control retry" prompt he won't see it and won't even know he is press something.

And in practice, when disk-related things start to fail, writing logs to disk is not very useful anyway...

A little provocating, but we could reduce the number of hoops to ZERO by
telling anybody to use FreeDOS or MS-DOS. ;-)

That would be more hoops for me when I (re)install FreeDOS on some ancient machines. I created SvarDOS to reduce these hoops so I can use a distribution that is tailored exactly the way I like it (tiny, simple, "to-the-point", with online packages available at hand). I think we both share these values, even if you sometimes exhibit a /slight/ addiction to over-engineering. :)

To sum it all up, I do believe the legacy "MS-DOS way" is a very good compromise: redirect "soft, boring" logs to a file, and output only critical stuff to screen. And this does not require any change or implementing anything new, since it comes with how things are working today (because it is how MS-DOS designed it 40 years ago).

Mateusz

_______________________________________________
Svardos-users mailing list
Svardos-users@lists.osdn.me
https://lists.osdn.me/mailman/listinfo/svardos-users

Reply via email to