xbps_pkg_exec_buffer: pass correct args to the install/remove scripts.
This commit is contained in:
parent
7e2d5344d3
commit
98adbf34a1
@ -40,8 +40,8 @@ xbps_pkg_exec_buffer(struct xbps_handle *xhp,
|
|||||||
bool update)
|
bool update)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
const char *tmpdir;
|
const char *tmpdir, *version;
|
||||||
char *fpath;
|
char *pkgname, *fpath;
|
||||||
int fd, rv;
|
int fd, rv;
|
||||||
|
|
||||||
assert(blob);
|
assert(blob);
|
||||||
@ -85,9 +85,15 @@ xbps_pkg_exec_buffer(struct xbps_handle *xhp,
|
|||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
/* exec script */
|
/* exec script */
|
||||||
rv = xbps_file_exec(xhp, fpath, action, pkgver,
|
pkgname = xbps_pkg_name(pkgver);
|
||||||
|
assert(pkgname);
|
||||||
|
version = xbps_pkg_version(pkgver);
|
||||||
|
assert(version);
|
||||||
|
|
||||||
|
rv = xbps_file_exec(xhp, fpath, action, pkgname, version,
|
||||||
update ? "yes" : "no",
|
update ? "yes" : "no",
|
||||||
xhp->conffile, NULL);
|
xhp->conffile, NULL);
|
||||||
|
free(pkgname);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
remove(fpath);
|
remove(fpath);
|
||||||
|
Loading…
Reference in New Issue
Block a user