dimkr wrote: Mon Apr 22, 2024 1:07 pm
To clarify: I'm not disappointed with the project itself ...
I'm disappointed with the people ...
Yes I understand. That's what I meant although I didn't say it explicitly. Everything you said is correct. The only thing is, you're one of a kind around here, and I really mean it in a good way. Not everyone (who is doing Puppy development) has the same skill, motivation, inclination (and perhaps time also) to be able to do what you can do. That's why I said it is a hard problem. I'm sure everyone means well, but they just don't view things the way you do.
jamesbond wrote:
Fact is, making a repeatable rebuild is hard work.
An explanation to those who don't understand why this is hard work.
Let's say you're doing a remaster or custom build of Puppy that among other things, includes VLC as a built-in application. You modify the "package list" files, and build the ISO, you click the menu item in JWM - and VLC doesn't launch. After spending the time and effort, you learn that the problem is in the .jwm file: the VLC menu has a "%F" parameter, which isn't supported by JWM, so it chokes when you click the menu to try to launch VLC.
The fix is simple. Edit .jwm, remove the offending %F, and rebuild the ISO. You do that, and problem solved, right?
Well, no. You run the ISO for a while, and when you're ready to publish it, you decide to install an app from the repo just for fun. And then by happenstance you click the VLC menu item again to launch it, and VLC stops working again. Wondering what's wrong, you check on .jwm file again - and whoa! That bedeviled "%F" is back!
After scratching your head for a while, you finally know that when you install an app, "fixmenus" is run to update JWM menus. In other words, .jwm is re-created. Now that gets you thinking. Where is the source file that fixmenus use to get the menu entry? A few questions on this forum eventually leads you to /usr/share/applications/vlc.desktop file. And yes, in the "Exec=" line of that file, you find that annoying "%F". You promptly edit that file, remove that %F, and save it. Then you run fixmenus. VLC launches after you click its menu. You install another app, and click VLC again. It still runs. Very good. Problem solved. Right?
You package the ISO and announce it to the world. Everyone is happy and receptive. All works as intended. Until an annoying person does the forbidden stuff. He accidentally uninstalls VLC, and installs it again. With dread, you read his forum post: VLC does not launch.
You spend lots of time interrogating this guy, until, after about 50 posts later, you figure out what happened. Your answer is simple. "Please do not uninstall and re-install VLC. It is not supported. Why are you doing it anyway, since VLC comes pre-installed?"
Well things chug along for a while, until the upstream distro releases a new version of VLC with a new great feature. Everyone who uses your distro rushes to install the new VLC ... and soon the forum are full with posts "My VLC stops working!" "Mine too" etc.
Cornered into this situation, you begrudgingly decide to make it right this time, once and for all. You want that the action that you do, "removing %F", to be repeatable when someone install, re-install, or update, the VLC package.
After more discussions with elders of this forum, the solution comes to mind. "You need to patch the package manager, so that when it installs VLC, it automatically edits the .desktop file and remove the dreaded %F", they say.
That sure sounds right, but you have a little bit of a fright. The package manager is a huge, convoluted program. When you started doing this remaster or custom build, it was never your intention to mess with this monstrous program. You feel that messing with the package manager is more than what you've bargained for. But as reluctant as you are, "editing the package manager is the only way", the elders say, so timidly you decide to step in.
With nausea you navigate the source code of the package manager. As you go through the source code line by line, you finally arrive at the section, with giant comment that says:
Code: Select all
# ==== EDIT DESKTOP FILES TO MAKE IT WORK WITH JWM ====
Yay! It's already there! This problematic desktop file is apparently a common enough problem that even the package manager already has a special code to deal with it!
So you read that particular section more thoroughly, and you decided to put in the fixes for VLC. The code that edits the .desktop file is full of "cut"s, "head"s, "tail"s, "grep"s, "sed"s and other stuff that is way above your head, stuff that you have never before seen in your life; but hey, how difficult could it be? There are a ton of it already that serve as examples. One for abiword, another one for gnumeric, and there is one for mtpaint ... perhaps it's not so tough. Encouraged, you copy, paste, change a few variable here and there ... and it's done.
Gleefully you use the package manager to install the update, and then click the JWM menu to launch ... and it doesn't work. When you look at .jwm file, you see garbage. Confused, you see the vlc.desktop file. It's garbage too. One or more of the "cut"s, "head"s, "tail"s, "grep"s, "sed"s must have been wrong, but you're not sure which one.
So you try to make some changes, and try again. It doesn't work.
So you try to make some changes, and try again. It still doesn't work.
So you try to make some changes, and try again. It still doesn't work.
...
And finally, after two or three hours of work, you manage to get it working. You have discovered the magic recipe and the right combination of commands that make it work. (Re-)Installing VLC package will now work, because, instead of depending on your manual removing of "%F", it is now done by the script inside the package manager. You can repeatedly install/uninstall VLC with no worries anymore.
And then you publish the updated ISO the world triumphantly, and think you can sleep well that night.
Except that immediately after the upload is completed, you remember something. The hack of editing desktop file, isn't only required for VLC. You also need to do the same thing for libreoffice, for gimp, for krita, for OBS ...
So you pull your download as fast as lightning. Good thing you have not announced anything.
To preemptively avoid another complain, you quickly edit and test, edit and test, edit and test ... the package manager again until all those programs can be installed/upgraded without problems too. That takes you a solid one and a half day.
You build the final ISO, and upload it again; and you make an announcement.
Exhausted, but overjoyed, you watch with satisfaction as people ravenously download your updated ISO. People in the forum all thank you, and praise you for the good fix you've provided, for being a good developer you are, for the responsible person you are.
What a nice warm cozy feeling as a reward for your hard work.
----
MY POINT:
See, removing "%F" once is easy. It takes less than 5 seconds to open the file, press delete 4 times, and save the file. But to make sure that "%F" is always deleted when you install/re-install (=repeatability), is hard. You have to write the patching script, and test it, and test it and test it and test it so that it always works in all circumstances. That 5-seconds job can easily turn into 2-3 hours job.
----
And now, for the final epilogue. This epilogue isn't related to the premise that "repeatability is hard work", but it's just a fun __speculation__ of why changes don't get updated to Woof-CE. I'm not pointing at anybody with this one; just read it for the fun of it if you will.
EPILOGUE:
As you're resting and basking in your glory, along comes dimkr, saying, hey, that's a good fix you found. Why not include that fix in the Woof-CE github, so that all other future Puppies will also have the fix, and they will never again have problems with VLC, Libreoffice, gimp, etc not launching.
But you have never heard about git, let alone github. It sounds like an esoteric tool, that will probably take a lifetime to learn. A glimpse to github.com confirms your guess. You reckon you have more important things to do, like planning for your next releases, or perhaps another variant of your custom pup. Or perhaps, there is this other little nagging bug that you haven't fixed yet. Or perhaps, that corner of your garden that needs trimming, or perhaps the shed cleanup that you have been postponing in the last 3 years, or perhaps you need to clean your house since your family is coming to visit you next week ... after all, you don't live for Puppy alone, you know.
Furthermore, why should you worry. Other puppies are other puppy developers' business. You fixed yours, you made your users happy, and that's enough responsibility for you, isn't it? If others want to apply the fix to other Puppies, they can download your ISO, and they are more than welcome to analyse the changes you have done to the package manager. It's not like you hide your changes ... it's there in the open, that's why it's called open source, isn't it? Just take the changes and apply it to their own puppies, right?
After all, puppy is do-ocracy, they say. You've done your share, it's up to others to do theirs.
THE END