Mageia Bugzilla – Attachment 1184 Details for
Bug 1962
genhdlist2 doesn't reuse most of the existing hdlist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
cleaning API after previous URPM patch
URPM5.diff (text/plain), 1.33 KB, created by
Thierry Vignaud
on 2011-12-06 16:24:18 CET
(
hide
)
Description:
cleaning API after previous URPM patch
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2011-12-06 16:24:18 CET
Size:
1.33 KB
patch
obsolete
>(open_archive) clean API >diff -p -up ./URPM.xs.tv2 ./URPM.xs >--- ./URPM.xs.tv2 2011-12-06 15:20:56.832673044 +0000 >+++ ./URPM.xs 2011-12-06 15:20:41.735661297 +0000 >@@ -1001,7 +1001,7 @@ update_provides_files(URPM__Package pkg, > } > > 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 { >@@ -3402,11 +3402,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)))); >@@ -3462,13 +3461,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;
(open_archive) clean API diff -p -up ./URPM.xs.tv2 ./URPM.xs --- ./URPM.xs.tv2 2011-12-06 15:20:56.832673044 +0000 +++ ./URPM.xs 2011-12-06 15:20:41.735661297 +0000 @@ -1001,7 +1001,7 @@ update_provides_files(URPM__Package pkg, } 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 { @@ -3402,11 +3402,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)))); @@ -3462,13 +3461,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;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1962
:
1181
|
1182
|
1183
| 1184