diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-02-22 19:24:39 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-02-22 19:24:39 +0000 |
commit | 954ffa5cb2ffbb169c3a852930f0419d2681c98b (patch) | |
tree | 85d9b7cdda5f4dbaf02a7cd6e78eb7742dcbc935 /URPM.xs | |
parent | 29d45cc6bec0ca0e7ad35be7c9d47e5e525e1261 (diff) | |
download | perl-URPM-954ffa5cb2ffbb169c3a852930f0419d2681c98b.tar perl-URPM-954ffa5cb2ffbb169c3a852930f0419d2681c98b.tar.gz perl-URPM-954ffa5cb2ffbb169c3a852930f0419d2681c98b.tar.bz2 perl-URPM-954ffa5cb2ffbb169c3a852930f0419d2681c98b.tar.xz perl-URPM-954ffa5cb2ffbb169c3a852930f0419d2681c98b.zip |
(open_archive) clean API
(backported from trunk)
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -1001,7 +1001,7 @@ update_provides_files(URPM__Package pkg, HV *provides) { } FD_t -open_archive(char *filename, pid_t *pid, int *empty_archive) { +open_archive(char *filename, int *empty_archive) { int fd; FD_t rfd = NULL; struct { @@ -3400,11 +3400,10 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) HV *obsoletes = fobsoletes && SvROK(*fobsoletes) && SvTYPE(SvRV(*fobsoletes)) == SVt_PVHV ? (HV*)SvRV(*fobsoletes) : NULL; if (depslist != NULL) { - pid_t pid = 0; int empty_archive = 0; FD_t fd; - fd = open_archive(filename, &pid, &empty_archive); + fd = open_archive(filename, &empty_archive); if (empty_archive) { XPUSHs(sv_2mortal(newSViv(1 + av_len(depslist)))); @@ -3458,13 +3457,7 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) int ok = Fclose(fd) == 0; - if (pid) { - kill(pid, SIGTERM); - int status; - int rc = waitpid(pid, &status, 0); - ok = rc != -1 && WEXITSTATUS(status) != 1; /* in our standard case, gzip will exit with status code 2, meaning "decompression OK, trailing garbage ignored" */ - pid = 0; - } else if (!empty_archive) { + if (!empty_archive) { ok = av_len(depslist) >= start_id; } SPAGAIN; |