xbps{,-static}: added support to read zplists from 0.42.
This commit is contained in:
parent
dc8d77be8b
commit
26f3bd0ea7
3 changed files with 55 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
# NOTE: keep this package synchronized with "srcpkgs/xbps".
|
||||
pkgname=xbps-static
|
||||
version=0.41
|
||||
revision=2
|
||||
revision=3
|
||||
bootstrap=yes
|
||||
short_desc="The XBPS package system utilities - static binaries"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
53
srcpkgs/xbps/patches/0003-zplists.patch
Normal file
53
srcpkgs/xbps/patches/0003-zplists.patch
Normal file
|
@ -0,0 +1,53 @@
|
|||
Switch to internalize_from_zfile() to be able to read zplists from 0.42.
|
||||
|
||||
--- lib/pkgdb.c.orig 2014-10-20 08:42:01.750291119 +0200
|
||||
+++ lib/pkgdb.c 2014-10-20 08:42:17.430433368 +0200
|
||||
@@ -155,7 +155,7 @@ xbps_pkgdb_update(struct xbps_handle *xh
|
||||
return cached_rv;
|
||||
|
||||
if (xhp->pkgdb && flush) {
|
||||
- pkgdb_storage = xbps_dictionary_internalize_from_file(xhp->pkgdb_plist);
|
||||
+ pkgdb_storage = xbps_dictionary_internalize_from_zfile(xhp->pkgdb_plist);
|
||||
if (pkgdb_storage == NULL ||
|
||||
!xbps_dictionary_equals(xhp->pkgdb, pkgdb_storage)) {
|
||||
/* flush dictionary to storage */
|
||||
@@ -170,7 +170,7 @@ xbps_pkgdb_update(struct xbps_handle *xh
|
||||
cached_rv = 0;
|
||||
}
|
||||
/* update copy in memory */
|
||||
- if ((xhp->pkgdb = xbps_dictionary_internalize_from_file(xhp->pkgdb_plist)) == NULL) {
|
||||
+ if ((xhp->pkgdb = xbps_dictionary_internalize_from_zfile(xhp->pkgdb_plist)) == NULL) {
|
||||
if (errno == ENOENT)
|
||||
xhp->pkgdb = xbps_dictionary_create();
|
||||
else
|
||||
@@ -346,7 +346,7 @@ xbps_pkgdb_get_pkg_files(struct xbps_han
|
||||
|
||||
plist = xbps_xasprintf("%s/.%s-files.plist", xhp->metadir, pkgname);
|
||||
free(pkgname);
|
||||
- pkgfilesd = xbps_dictionary_internalize_from_file(plist);
|
||||
+ pkgfilesd = xbps_dictionary_internalize_from_zfile(plist);
|
||||
free(plist);
|
||||
|
||||
if (pkgfilesd == NULL) {
|
||||
--- lib/package_remove.c.orig 2014-10-20 08:42:53.597762164 +0200
|
||||
+++ lib/package_remove.c 2014-10-20 08:42:59.429815272 +0200
|
||||
@@ -268,7 +268,7 @@ xbps_remove_pkg(struct xbps_handle *xhp,
|
||||
|
||||
/* internalize pkg files dictionary from metadir */
|
||||
snprintf(metafile, sizeof(metafile), "%s/.%s-files.plist", xhp->metadir, pkgname);
|
||||
- pkgfilesd = xbps_dictionary_internalize_from_file(metafile);
|
||||
+ pkgfilesd = xbps_dictionary_internalize_from_zfile(metafile);
|
||||
if (pkgfilesd == NULL)
|
||||
xbps_dbg_printf(xhp, "WARNING: metaplist for %s "
|
||||
"doesn't exist!\n", pkgver);
|
||||
--- bin/xbps-pkgdb/check.c.orig 2014-10-20 08:43:16.190968036 +0200
|
||||
+++ bin/xbps-pkgdb/check.c 2014-10-20 08:43:21.246014149 +0200
|
||||
@@ -94,7 +94,7 @@ check_pkg_integrity(struct xbps_handle *
|
||||
if (xbps_dictionary_get_cstring_nocopy(opkgd, "metafile-sha256", &sha256)) {
|
||||
buf = xbps_xasprintf("%s/.%s-files.plist",
|
||||
xhp->metadir, pkgname);
|
||||
- filesd = xbps_dictionary_internalize_from_file(buf);
|
||||
+ filesd = xbps_dictionary_internalize_from_zfile(buf);
|
||||
rv = xbps_file_hash_check(buf, sha256);
|
||||
free(buf);
|
||||
if (rv == ENOENT) {
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.41
|
||||
revision=2
|
||||
revision=3
|
||||
bootstrap=yes
|
||||
short_desc="The XBPS package system utilities"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
Loading…
Reference in a new issue