SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does any one know what pkgtool was written in. I am looking around the net and I still have not found any leads. Things some times are right in front of my face and I am blind... but I am not being lazy...
I want to examine how pkgtool was written. If for example I wanted to modify it or something.
Does any one know what pkgtool was written in. I am looking around the net and I still have not found any leads. Things some times are right in front of my face and I am blind... but I am not being lazy...
I want to examine how pkgtool was written. If for example I wanted to modify it or something.
wow pkgtool was written as a shell script. The shell is indeed powerful. I know for example that Gentoo's package manager was written in python. I wounder if there would be an advantage if one rewrote pkgtool in C. That was my idea. See I am trying to learn how to program and I have gone through books on it and I get the Idea... but non of those books inspired me to do anything so I forget most of what is in there. I was thinking of a project that would be challenging but not so challenging something that like a project that would teach me.. so I though what if I just rewrote something it would teach me a lot about things.
So I though lets rewrite pkgtool.
Quote:
The file command tells you about a file's type and the which command will search the paths for it so try this :
Code:
file $(which pkgtool)
/sbin/pkgtool: Bourne shell script text executable
Thank you you showed me ware to find it locally. But I thought it was cool that you gave me a script to use to figure all that stuff out. So I typed in the command line... never mind as I was writing this I just thought maybe I should type in the command as root and sure enough when I did it worked thanks a lot.
If you want to programm something in C, why not try a graphical (gtk or qt lib) front end for a command tool program ?
(I myself did a graphical front end for 'at' command as a learning project first with motif then with gtk )
re-write pkgtool in C as a learning programming experience could be dangerous I think, if you make an error, you risk some serious damage for your system as pkgtool is rather a critical slackware program...
If you want to programm something in C, why not try a graphical (gtk or qt lib) front end for a command tool program ?
(I myself did a graphical front end for 'at' command as a learning project first with motif then with gtk )
re-write pkgtool in C as a learning programming experience could be dangerous I think, if you make an error, you risk some serious damage for your system as pkgtool is rather a critical Slackware program...
I see your point. O okay at first when I sat down to write my next question I was going to ask why would I want to do Graphics when I am trying to program and then I got it.I think I figured out what your were saying reasoning it out as I typed. Your suggesting a graphics front end for the command line. That is cool. e.g. pkgtool is a graphics front end in the command line.. something of that nature of GUI
Just out of interest I do realize that pkgtool could bring it all down if I messed up but do you think there would be an advantage to having it written in C?
Last edited by khronosschoty; 10-19-2008 at 03:19 PM.
I wounder if there would be an advantage if one rewrote pkgtool in C. That was my idea. See I am trying to learn how to program and I have gone through books on it and I get the Idea... but non of those books inspired me to do anything so I forget most of what is in there. I was thinking of a project that would be challenging but not so challenging something that like a project that would teach me.. so I though what if I just rewrote something it would teach me a lot about things.
I think someone allready done that.
What about to write a front-end / program for pccard tools? I think there is no GUI for that. (but, I think it's too simple task )
Just out of interest I do realize that pkgtool could bring it all down if I messed up but do you think there would be an advantage to having it written in C?
I don't see any advantage, only drawbacks
The major drawback: after each official pkgtool update, you have to rebuild your program to include the change
Other drawback: Heavy string manipulations, deal with system permissions, run as root etc..
For system admin tools like this, I think shell scripts are better suited
You don't need really need memory/CPU performances here, just reliability
I wounder if there would be an advantage if one rewrote pkgtool in C. That was my idea.
This is pointless and there won't be any advantage. Using C makes sense only for CPU-intensive tasks, for large programs or for projects that can't be done using scripts. Script allow high flexibility and very high development speed (script will work right after you modify it). So by doing rewrite into C you'll waste your time. So my advice: try something else.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.