I've noticed a tendency of my installation code to every now and again crash. Fun. When it doesn't crash, I get error messages like this (my own messages prefixed by ====>) ====> Installing package: data/openssh-4.1p1-10.9.i586.rpm Instaling package located: data/openssh-4.1p1-10.9.i586.rpm error: File not found by glob: error: File not found by glob: error: File not found by glob: error: open of ? failed: No such file or directory error: error reading from file data/openssh-4.1p1-10.9.i586.rpm Unable to properly install package! I can't quite figure it out, but the glob thing is something that I'll see in the crash stack trace (sporadically). The code used to install these packages is included below, it seems that every 1 out of 5 tries, depending on whether or not I am demonstrating the software to a client, boss, or other person with authority ;) Cheers int installPackage(char *path) { fprintf(stderr, "Instaling package located: %s\n", path); char *files[] = { path }; rpmts transaction; struct rpmInstallArguments_s *rpmargs = malloc(sizeof(struct rpmInstallArguments_s)); bzero(rpmargs, sizeof(struct rpmInstallArguments_s)); rpmargs->installInterfaceFlags = INSTALL_INSTALL | INSTALL_HASH; int ret = rpmReadConfigFiles(NULL, NULL); if (ret != RPMRC_OK) { fprintf(stderr, "Unable to read the RPM configuration!\n"); goto failure; } transaction = rpmtsCreate(); ret = rpmInstall(transaction, rpmargs, (const char **)(files)); if (ret != 0) { fprintf(stderr, "Unable to properly install package!\n"); goto failure; } transaction = rpmtsFree(transaction); free(rpmargs); return QUERY_SUCCESS; failure: transaction = rpmtsFree(transaction); free(rpmargs); return QUERY_FAILURE; } R. Tyler Ballance: Lead Mac Developer at bleep. software contact: tyler@xxxxxxxxxxxxx | jabber: tyler@xxxxxxxxxxxxxxxxxx |
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list