@@ -51,8 +51,6 @@ struct item {
5151 struct xbps_file file ;
5252 const char * pkgname ;
5353 const char * pkgver ;
54- const char * target ;
55- uint64_t size ;
5654 enum type type ;
5755 /* index is the index of the package update/install/removal in the transaction
5856 * and is used to decide which package should remove the given file or dir */
@@ -361,16 +359,16 @@ collect_obsoletes(struct xbps_handle *xhp)
361359 xhp -> rootdir , item -> file + 1 );
362360 file = path ;
363361 }
364- lnk = xbps_symlink_target (xhp , file , item -> old .target );
362+ lnk = xbps_symlink_target (xhp , file , item -> old .file . target );
365363 if (lnk == NULL ) {
366364 xbps_dbg_printf ("[obsoletes] %s "
367365 "symlink_target: %s\n" , item -> file + 1 , strerror (errno ));
368366 continue ;
369367 }
370- if (strcmp (lnk , item -> old .target ) != 0 ) {
368+ if (strcmp (lnk , item -> old .file . target ) != 0 ) {
371369 xbps_dbg_printf ("[obsoletes] %s: skipping modified"
372370 " symlink (stored `%s' current `%s'): %s\n" ,
373- item -> old .pkgname , item -> old .target , lnk , item -> file + 1 );
371+ item -> old .pkgname , item -> old .file . target , lnk , item -> file + 1 );
374372 free (lnk );
375373 continue ;
376374 }
@@ -523,32 +521,36 @@ collect_file(struct xbps_handle *xhp, const char *file, size_t size,
523521 item -> old .pkgname = pkgname ;
524522 item -> old .pkgver = pkgver ;
525523 item -> old .type = type ;
526- item -> old .size = size ;
524+ item -> old .file . size = size ;
527525 item -> old .index = idx ;
528526 item -> old .preserve = preserve ;
529527 item -> old .update = update ;
530528 item -> old .removepkg = removepkg ;
531- item -> old .target = target ;
529+ item -> old .file . target = target ;
532530 if (sha256 ) {
533531 item -> old .file .sha256 = strdup (sha256 );
534532 if (!item -> old .file .sha256 )
535533 return errno ;
536534 }
535+ if (type == TYPE_CONFFILE )
536+ item -> old .file .flags |= XBPS_FILE_CONF ;
537537 } else {
538538 item -> new .pkgname = pkgname ;
539539 item -> new .pkgver = pkgver ;
540540 item -> new .type = type ;
541- item -> new .size = size ;
541+ item -> new .file . size = size ;
542542 item -> new .index = idx ;
543543 item -> new .preserve = preserve ;
544544 item -> new .update = update ;
545545 item -> new .removepkg = removepkg ;
546- item -> new .target = target ;
546+ item -> new .file . target = target ;
547547 if (sha256 ) {
548548 item -> new .file .sha256 = strdup (sha256 );
549549 if (!item -> new .file .sha256 )
550550 return errno ;
551551 }
552+ if (type == TYPE_CONFFILE )
553+ item -> new .file .flags |= XBPS_FILE_CONF ;
552554 }
553555 if (item -> old .type && item -> new .type ) {
554556 /*
0 commit comments