Purpose of openwrt-devel?
Olliver Schinagl
oliver at schinagl.nl
Thu Mar 21 02:00:46 PDT 2024
On 20-03-2024 01:34, Elliott Mitchell wrote:
> On Mon, Mar 18, 2024 at 10:53:12AM +0100, Olliver Schinagl wrote:
>> I expect this to be done very rarely and by users that know what they
>> are doing, but just "automating" a few logical git commands.
>>
>> Performance is not a key-driver here. It's too rarely used.
> True, though being faster is nice.
While true, I don't think we even have to start arguing if runtime is
less then a single second. This on my 12 year old PC, granted, the CPU
is only 8 years and the nvme SSD only 5.
./scripts/kernel_bump.sh -p realtek -s 5.15 -t 6.6 0,40s user 0,33s
system 105% cpu 0,694 total
./scripts/kernel_bump.sh -p ramips -s 6.1 -t 6.6 0,40s user 0,40s
system 106% cpu 0,753 total
Even if you bumped all repo's (with a dumb for-loop) we'd be talking 30
seconds to do _all_ of them at once (which never happens).
>
>> Leaving the tree in failed state imo is a feature. We switch from the
>> normal branch to a special branch to do all operations. The user can
>> always force ably switch back. Ultimately, this is a choice, can a user
>> fix things and inspect failures, or 'oh it failed, lets reset'. Reset
>> instructions during cleanup is a good idea however.
> Therein lines a concern. Why does yours switch to a special branch?
> It is not human, it doesn't need a computer to keep track of commits for
> it. As such it shouldn't need a branch.
Why is this a problem? Why can't a script that is intended to remove
manual labor, behave like a human. There comes the readability and
maintainability argument once again. If a human can read it, he can
modify it. If the script fails, or a special case pops up, a human can
do those steps manually quite easily.
I'm a big beliver in KISS. So yes, the script is not perfect and doesn't
have shiney gold plated parts. But it is simple, can be understood by a
human, by a non-developer even I'd argue.
In the end, computers do what humans tell them to do. In the end, humans
reading things is far more important, then super-optimizing a script,
that's run once or twice a year by a human developer.
And using a branch does have its advantages too. We can switch to the
branch and examine if things go wrong. Again, this is something a human
would do too :)
>
> This is one of the things I meant by "Your shell script is essentially
> replicating the actions a human at a shell might take to perform the
> task". Some things work better for a shell script than the approaches
> humans would use.
As I wrote above, I think this is _better_ anyways :)
>
>
>
> Since I went to the trouble of examining your script and testing it,
> might you reciprocate with similar courtesy? Even if you cannot fill the
> role of reviewer, you can still fill the role of tester.
You are correct, your script is far to big and complex to review (not
only for someone who doesn't know perl :p) but I will try to make some
room to run it.
>
> If you examine the result, you might also discover its approach has some
> rather substantial advantages. At this time I believe with the second
> commit it offers a proper superset of your script's functionality.
>
>
I wonder what this super set is though and why it is so badly needed ...
Olliver
More information about the openwrt-devel
mailing list