Source code to get the location of installed files after rpm installation
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Usually no source code is installed. And there is no rpm command to list files
in a source code package. ( For very good reasons.)
The 'ls -R' command will do. .. After it is unpacked.
Please specify your Linux OS, like Fedora 15, CentOS 6.0, Mandriva 2010 etc.
if you want further information.
I understood the OP to want to know what the source code for rpm looks like -the part which lists the files installed by by rpm -I mean accessing the rpm database. Of course, the source code for rpm contains the code which does that. One could also look at the code for other package management systems. For slackware it's not even source code since it is all done with shell script. For debian packages it would be apt-get, etc. But since rpm was mentioned the that seemed the logical place to recommend. No matter which system, the code will be reflect the format of the package database. rpm maintains a 'binary' database, I believe. pkgtools(slackware), has a simple flat-file format with one file for each package. I'm not really sure about apt-get, but it seems likely that some of the code might be written in perl.
I understood the OP to want to know what the source code for rpm looks like -the part which lists the files installed by by rpm -I mean accessing the rpm database. Of course, the source code for rpm contains the code which does that. One could also look at the code for other package management systems. For slackware it's not even source code since it is all done with shell script. For debian packages it would be apt-get, etc. But since rpm was mentioned the that seemed the logical place to recommend. No matter which system, the code will be reflect the format of the package database. rpm maintains a 'binary' database, I believe. pkgtools(slackware), has a simple flat-file format with one file for each package. I'm not really sure about apt-get, but it seems likely that some of the code might be written in perl.
Can u plz get me the source codes for it, as i can see that you have properly understood my requirement.
It's in the repository of your distro -even if I get it, you still don't have it.
Just search the web for 'rpm source', or 'rpm srpm'. The sources may be contained in a file with the extension 'srpm' or src.rpm.
Reading some of the 7000 files may answer your question.
If you just want a list of files from a non installed rpm package,
the less command can be used : less name.rpm
Or use the lesspipe / lesspipe.sh / lessfile command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.