unpack: keep conf_files replaced with symlinks, unpack as .new-pkgver

This commit is contained in:
Duncaen
2019-03-19 13:12:08 +01:00
parent 2ad2659d4c
commit ea2cb1d369
4 changed files with 89 additions and 17 deletions

View File

@ -63,7 +63,8 @@ xbps_entry_install_conf_file(struct xbps_handle *xhp,
xbps_dictionary_t pkg_filesd,
struct archive_entry *entry,
const char *entry_pname,
const char *pkgver)
const char *pkgver,
bool symlink)
{
xbps_object_t obj, obj2;
xbps_object_iterator_t iter, iter2;
@ -87,9 +88,10 @@ xbps_entry_install_conf_file(struct xbps_handle *xhp,
xbps_dbg_printf(xhp, "%s: processing conf_file %s\n",
pkgver, entry_pname);
if (pkg_filesd == NULL) {
if (pkg_filesd == NULL || symlink) {
/*
* File exists on disk but it's not managed by the same package.
* 1. File exists on disk but it's not managed by the same package.
* 2. File exists on disk as symlink.
* Install it as file.new-<version>.
*/
version = xbps_pkg_version(pkgver);