CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#1605 - prt-get: add check for missing dependencies of installed packages.

Attached to Project: CRUX
Opened by Alexandr Savca (chinarulezzz) - Monday, 05 March 2018, 16:06 GMT
Last edited by Predrag Ivanovic (pedja) - Monday, 18 March 2019, 15:00 GMT
Task Type Improvement
Category tools → prt-get
Status New
Assigned To CRUX Developers (crux)
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

In one release lifetime, the software can obtain new dependencies (libinput for example) and it would be good if 'prt-get' can show that. Also, some packages can be manually deleted (after installing for example), and there is no need to remember whether this package is a dependency of other port or not. We can always check where we've mistaken.

I made the patch to prt-get to check for missing dependencies of currently installed ports.
By the way, I'm not familiar with C++, and the code can look awful))

There is a usage example: https://paste.pound-python.org/show/8DqIKor5T4PegZUB2cxH/

This task depends upon

Comment by Alexandr Savca (chinarulezzz) - Monday, 05 March 2018, 19:41 GMT
2nd, revised version.
Comment by Tim Biermann (tb) - Wednesday, 22 September 2021, 11:10 GMT
+1, I'd say this needs some testing and with what Alexandr said, maybe a code review/cleanup, that I can't provide either.

Can anyone help out?
Comment by John McQuah (farkuhar) - Monday, 13 June 2022, 21:40 GMT
Kudos to Alexandr for offering an actual patch that can be tested. The related task FS#849 generated a lively discussion, but hardly any testable changes to prt-get itself.

That said, the necessary C++ experience is in short supply these days, so in FS#849 I suggested instead that we follow Tim's advice and make sure that new users are "helped properly" in "getting to learn our system tools" (FS#1410). I posted a link to a repository with greatly expanded manpages for prt-get and pkgadd, demonstrating the techniques of piping prt-get output to awk and grep, to obtain the results that Alexandr's patch would provide in a single command. If the manpage is expanded in this way, I think new CRUX users will be less likely to flood the mailing lists or the irc channels with complaints about failing updates.

But training new users to work around the limitations of old tools is a band-aid solution, and doesn't change the fact that patch submissions like Alexandr's can sit for years with no action. I would prefer to make our system tools more inviting for would-be contributors, and not just the handful who have C++ experience.

To the same repository linked in FS#849 I have now added a complete rewrite of prt-get, in a language that will feel more comfortable to writers of shell scripts: https://git.sdf.org/jmq/Documentation/src/branch/master/scripts/prt-auf By answering yes to the first question at the bottom of TODO in the prt-get source tree (mixed install/update mode, whichever is needed?), my rewrite does not suffer from the defect that prompted Alexandr to write his patch. But this same breaking change does entail a slight learning curve to undo years of muscle memory using the 'install' command. It should not be too hard to make the behaviour hew more closely to that of prt-get, if that is what the majority wants.

After testing my rewrite for about a week now, including a few sysup operations, I'm hoping to generate some interest among early testers. With more eyes inspecting the code, the last remaining bugs should be ironed out rather quickly.

Loading...