Bug 59851
Summary: | rpmInstallSourcePackage() API seg fault | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Melissa Rickman <melissarickman> |
Component: | rpm | Assignee: | Jeff Johnson <jbj> |
Status: | CLOSED WORKSFORME | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-02-15 20:46:31 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Melissa Rickman
2002-02-13 21:16:35 UTC
If your program is small, can you attach here? I can probably tell you what's up even though I'm not a C++ programmer. Jeff, I made some progress with my bug. I ended up using rpmInstall() vs. rpmInstallSource(). However, I now get another seg fault that says Error: no db path set. The source is as follows. #include <rpm/rpmlib.h> void main() { const char * rootdir = "/development" char * str[]={"/development/RPMS/i386/IM-0.1-1.i386.rpm"}; str[1]='/0'; const char ** temp = const_cast<const char**>(str); rpmInstall(rootdir,temp,RPMTRANS_FLAG_NONE,INSTALL_HASH,RPMPR0B_FILTER_NONE,0); } All programs that link against rpmlib need to do if (rpmReadConfigFiles(rcfile, NULL)) exit(EXIT_FAILURE); early on. ok, something is weird with rpm and its files. My rpmrc file resides in /usr/lib. It's visible to ls and when I do rpm --showrc it shows the contents of that file. However, when I use the command # more /usr/lib/rpmrc, it says no such file or dir. This error also happens when I supply this file to rpmReadConfigFiles("/usr/lib/rpmrc", NULL). Another weird thing is that I went to view /usr/include/rpmlib.h with the more command and it says that that file dn exist, but it does! I must be doing something wrong???? There may be a /usr/lib/rpmrc symlink, but the file(s) you want/need are /usr/lib/rpm/rpmrc /usr/lib/rpm/macros and (possibly) /usr/lib/rpm/<arch>-linux/macros This is what is read by rpmReadConfigFiles(NULL, NULL); (Yes, NULL will use defaults). If you need more help, please reopen this bug. Meanwhile I'm gonna close. |