Before unpacking pkg files always remove INSTALL/REMOVE scripts (if they exist).
This commit is contained in:
parent
7265ea0e4e
commit
e9945dc345
@ -211,21 +211,17 @@ unpack_archive(prop_dictionary_t pkg_repod, struct archive *ar)
|
|||||||
rv = errno;
|
rv = errno;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(transact, "update") == 0)
|
if (strcmp(transact, "update") == 0)
|
||||||
update = true;
|
update = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* While updating, always remove current INSTALL/REMOVE
|
* Always remove current INSTALL/REMOVE scripts in pkg's metadir,
|
||||||
* scripts, because a package upgrade might not have those
|
* as security measures.
|
||||||
* anymore.
|
|
||||||
*/
|
*/
|
||||||
if (update) {
|
if ((rv = remove_metafile("INSTALL", pkgver)) != 0)
|
||||||
if ((rv = remove_metafile("INSTALL", pkgver)) != 0)
|
goto out;
|
||||||
goto out;
|
if ((rv = remove_metafile("REMOVE", pkgver)) != 0)
|
||||||
if ((rv = remove_metafile("REMOVE", pkgver)) != 0)
|
goto out;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Process the archive files.
|
* Process the archive files.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user