That means that the following functions were removed:
- xbps_set_{cachedir,flags,rootdir}.
- xbps_get_{cachedir,flags,rootdir}.
With this change fixed an obvious typo that made -c argument to not work,
and now the cache directory is an absolute path not relative to rootdir.
This function replaces xbps_repository_get_path_from_pkg_dict() and
xbps_get_binpkg_local_path(). It takes a pkg dictionary as returned
by a repository pkg index or a transaction dictionary and returns
a string with the full path to the binary pkg, either in local
repos, cachedir or remote repos.
Update all code to use this function... sorry I broke ABI compatiblity.
- There's no need to check rval for prop_dictionary_get_*, we are sure the
objects are there at prop_dictionary_set_* time.
- Avoid two chdir(2) calls per INSTALL/REMOVE run.
- Avoid using access(2) to check for existence of INSTALL/REMOVE scripts,
just try to run the executable directly and check for ENOENT.
* libxbps: improved xbps_get_file_hash() to mmap(2) rather than read(2)
the file we have to process. With mmap'ed files the hash can be
processed 5x faster than before, or even more in some cases.
* libxbps: switch to OpenSSL SHA256 implementation and remove the one
previously used. It's faster and OpenSSL is required for libfetch so
there is not point in using it.
Changes included in this set:
* Added strlcat() and strlcpy() from OpenBSD, always use them if the
system does not have them built in.
* Changed an array of PATH_MAX size allocated in the stack, to a dynamically
allocated buffer from heap. This should reduce memory usage a bit.
* Simplify code that implemented a homegrown realpath(3) implementation,
simply use realpath(3).
* If compiler supports -fstack-protector, build all code with
-D_FORTIFY_SOURCE=2 and --param ssp-buffer-size=1 so that all
buffers are protected.
Some changes were made to the API when making the documentation:
- A few exported functions are now hidden, because they were only used
internally in the library.
- A few exported symbols were renamed to document them better than
previously.
- Cosmetic changes all along the way, as well as some fixes here and there.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100121021019-onbsivlrhdb7t3ou
libxbps:
* Added xbps_set_cachedir() and xbps_get_cachedir(). By default it's
set to /var/cache/xbps if not specified and it's always relative
to the root directory.
* Move mkpath() code from sync_remote_pkgidc.c into its own file mkpath.c
to use it in another parts of the code.
* Added xbps_get_binpkg_local_path(), that returns the local path to
a binary package file, stored in cachedir or local repo.
* Remote pkg index files are now stored directly in metadir/repodir,
skipping the arch directory because binpkgs are now in cachedir.
xbps-bin:
* Added -c flag to set the cachedir.
* Check sha256 hashes in the download stage so that it can check
a downloaded binpkg immediately once is stored.
* If a binpkg doesn't match the hash it will be refetched.
Bump XBPS_RELVER to 20091128.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128013841-kkcvk07lsqdr26w8
libxbps:
- Moved repolist code to lib/repository_pool.c.
- Renamed xbps_{prepare,release}_repolist_data() to
xbps_repository_pool_{init,release} respectively.
- Moved regpkgdb dict code to lib/regpkgs_dictionary.c.
- Renamed xbps_{prepare,release}_regpkgdb_dict() to
xbps_regpkgs_dictionary_{init,release} respectively.
- Use a global reference count for repository_pool and regpkgs_dictionary,
this gives a substantial performance gain while looking for dependencies
in repository pool, among other things.
- Make xbps_find_pkg_* functions return errno and use it to detect
for spurious errors in code using them.
- Add code to detect when a dependency is already unpacked.
xbps-bin:
- Do not set pkg state to unpacked in the transaction, it's set already
while a package is unpacked.
- While installing or updating packages, it now knows when a dependency
is already unpacked and shows it as "unconfigured".
Bump XBPS_RELVER to 20091126.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126022250-uu8x0fa86l4scb5x
remote repositories, so remove its argument.
xbps_sync_repository_pkg_index:
- create the local repo dir in XBPS_META_PATH.
- also add the uri scheme (http://, https://, ftp://) in the created
local directory and subst ':' also with an underscore.
- do not create local repo directories unless the download pkg-index
plist file is verified to be fetched correctly.
xbps_check_is_repo_string_remote:
New function to check if a repo string is a remote repository, use
it in all places where it was used before.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091123042316-rmu4w3ehoxwh3iz8
in pkg dictionary to improve performance in some cases.
Bumped XBPS_RELVER to 20091121.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091122041547-oywx4db75j8uttl3
dependencies, as specified in blueprint "improved-version-matching".
It's possible now to require greater, greater or equal than,
less, less or equal than, and equal pkg versions, as well as using
'{}' and '[^!]' csh patterns in dependencies.
Code lifted from FreeBSD, thanks! :-)
Change XBPS_RELVER to 20091107 to match latest additions.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091107035620-3051wcwrirqn2g14
libfetch from NetBSD's pkgsrc has been imported into lib/fetch, but
the objects are embedded into libxbps. Only a public function to fetch
files has been implemented: xbps_fetch_file().
The library now is built with -fvisibility=hidden by default, and
exported symbols are the ones that use the SYMEXPORT macro.
The code works well enough, but will need many more cleanups.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027004600-0lq9aao67lisbzxv