- xbps_repo_release(): new function to release all resources
associated with a repository object.
- xbps_repo_close(): this now just closes the file descriptor
associated with the archive and associated resources.
- repo_open_local: after getting the repository dictionaries,
use xbps_repo_close() to release archive resources.
Bump XBPS_API_VERSION.
if xbps_repo_open() fails then the repo is removed from array
xbps_repo_remove() but as we've removed the entry from it,
the index won't be valid any more, resulting in skipped entries.
If a entry is removed restart again at the correct index.
Close#127
We use a simple file lock that is created with O_CREAT|O_EXCL.
This should fix the concurrency issues with multiple processes
running xbps-rindex -a/-c on the same repository/arch combo.
At the time we've been searching for the pkg in a repo, no repos
were registered resulting in EINVAL. While here, if there's no
declared repos return ENOENT instead.
If xbps_repo_open() was called with the lock arg set, xbps_repo_close()
will now unlock the repo file lock, without the need to set it.
This avoids the need to always unlock the file lock even if it wasn't
locked previously. This also introduceds an ABI/API break, but this
way it's cleaner.
- Simplify xbps_repo_open::repo_get_dict().
- Use xbps_end() in the utils where necessary.
- Make xbps_end() call xbps_pkgdb_unlock() if necessary.
- Make xbps_end() release rpool resources.
- Make xbps_end() release resources from xbps_handle.
- Fixed 90% of reported leaks (still reachable at exit) from valgrind.
That was to silence valgrind's memcheck with --leak-check=full.
These routines return a xbps_array_t with a full sorted dependency graph
for the target pkg, by querying pkgdb or rpool.
Update xbps-query(8) to use the new libxbps API.
- This mode prints to stdout the matching FILE stored in a binary package.
- ABI break: renamed xbps_get_pkg_plist_from_binpkg() xbps_binpkg_get_plist().
- Added xbps_binpkg_get_file() as a generic way to get pkg file contents.
- Removed useless comments from xbps_api_impl.h.
- xbps_repo_open() accepts a third argument (bool) to acquire a POSIX file
lock on the repository archive.
- xbps_repo_close() accepts a second argument (bool) to release a POSIX file
lock on the repository archive.
This avoids the issue of multiple xbps-rindex(8) processes being blocked
even for different repositories on the same architecture, resulting in
unnecessary contention.
The previous internal "struct rpool" was an extra structure that
can be avoided by just using "struct xbps_repo" directly.
This makes rpool use (at least) 4KB less per repository and 1
extra allocation.
- Repository keys are now stored in a new directory on metadir (/var/db/xbps):
<metadir>/key>
- Repository keys are stored with the hex fingerprint of its RSA
public key in a plist dictionary:
<metadir>/keys/xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.plist
- Drop xbps-rkeys(8) and merge its functionality into xbps-install(8) and
xbps-query(8).
- xbps-query(8) -vL now shows some more details of remote repositories:
3134 http://localhost:8000 (RSA signed, verified)
Signed-by: Void Linux
4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d
16 http://localhost:8000/nonfree (RSA signed, verified)
Signed-by: Void Linux
4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d
Bump XBPS_API_VERSION.
- Remove xbps_repo_get_plist() and try to internalize all members at
xbps_repo_open() time.
- Added xbps_repo_open_idxfiles() to also internalize the index-files
plist from repository, which is really huge and must only be internalized
when needed.
- Improve how signed and verified repositories are detected.
- Misc optimizations and small performance improvements.
Bump XBPS_API_VERSION.
These are the core interfaces in the new API:
rpool - Interface to interact with the repository pool.
rindex - Interface to interact with repository indexes.
pkgdb - Interface to interact with local packages.
transaction - Interface to interact with a transaction.
This also brings new repository index format, making the index file
per architecture and being incompatible with previous versions.
The transaction frequency flush option has been removed, and due to
the nature of package states it was causing more harm than good.
More changes coming soon, but the API shall remain stable from now on.