doInstall() now returns success or error
CVS patchset: 525 CVS date: 1996/04/03 03:46:41
This commit is contained in:
parent
119be69b35
commit
65df4a10e9
|
@ -41,7 +41,7 @@ static void printPercent(const unsigned long amount, const unsigned long total)
|
|||
fflush(stdout);
|
||||
}
|
||||
|
||||
void doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags) {
|
||||
int doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags) {
|
||||
rpmdb db;
|
||||
int fd;
|
||||
int mode, rc;
|
||||
|
@ -79,14 +79,14 @@ void doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags)
|
|||
if (fd < 0) {
|
||||
fprintf(stderr, "error: ftp of %s failed - %s\n", arg,
|
||||
ftpStrerror(fd));
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
fd = open(arg, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
rpmdbClose(db);
|
||||
fprintf(stderr, "error: cannot open %s\n", arg);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,8 @@ void doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags)
|
|||
|
||||
close(fd);
|
||||
rpmdbClose(db);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
void doUninstall(char * prefix, char * arg, int test, int uninstallFlags) {
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
#define RPMINSTALL_PERCENT 1
|
||||
#define RPMINSTALL_HASH 2
|
||||
|
||||
void doInstall(char * prefix, char * arg, int installFlags,
|
||||
int interfaceFlags);
|
||||
int doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags);
|
||||
int doSourceInstall(char * prefix, char * arg, char ** specFile);
|
||||
void doUninstall(char * prefix, char * arg, int test, int uninstallFlags);
|
||||
|
||||
|
|
Loading…
Reference in New Issue