This for example fixes reinstalling jpeg and libjpeg-turbo multiple
times. Also if the "automatic-install" obj is in the pkg to be
replaced, copy it to the new pkg to be preserved.
Bumped XBPS_API_VERSION.
Reverse dependencies weren't respected when replacing a pkg with
another pkg that is providing a virtual pkg for the former.
This resulted in reversedeps being completely lost when new pkg
is installed.
- xbps_repository_update_packages: return ENOENT if regpkgdb is NULL
(no packages currently registered).
- xbps_repository_update_packages: return EEXIST if no updates are
available.
- xbps_repository_pool: return ENOTSUP if no repositories were
registered.
- make xbps-{bin,repo} handle ENOTSUP errors.
Along with this change, compat code has been added (from NetBSD)
for systems that don't have it. The compat code has been reorganized
to be in a common place and its prototypes in compat.h.
The configure scripts checks if strcasestr() is available, and
uses compat code if not found.
This fixes issue #2 on github.com/vanilla/xbps.
- A configuration file "xbps-conf.plist" replaces the (un)register target
in xbps-repo(8) and (un)set-prop in xbps-bin(8). For now, you can set
the repositories and prefered virtual packages.
- New package pattern matching code from NetBSD. Supports more ways of
matching patterns in packages.
- Multiple bugs fixed in virtual packages related matching code.
--HG--
rename : LICENSE => COPYING
It should be provided in the proplib dictionary with key 'automatic-install'.
This fixes a regression not respecting the 'automatic-install' value stored
in regpkgdb.
Two new booleans were added to struct xbps_handle: install_reason_{auto,manual}.
The backend is able to force auto or manual installation for a package (and
dependencies that were installed/updated) by setting to true any of those
booleans. Bump XBPS_RELVER.
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 structure sets up function callbacks for fetching files and
unpacking binary packages, as well as setting the debug boolean.
This way the affected functions (xbps_fetch_file() and
xbps_unpack_binary_pkg()) do not need to accept the fn cb pointers
and data as arguments.
Bump XBPS_RELVER.
A new function xbps_find_virtual_pkg_in_dict() has been made public
to the API to make this find duplicate packages in the transaction
when updating packages.
The patch adds 150 lines approximately. It is implemented by modifying
xbps_find_pkg_in_dict_by_name() and xbps_find_pkg_in_dict_by_pattern().
When no dictionary is returned if tries to find a virtual package by
looking at the "provides" array object, if found.
This also makes xbps_unpack_binary_pkg follow this convention by avoiding
static variables.
--HG--
branch : progress_callback
rename : bin/xbps-repo/util.c => bin/xbps-bin/util.c
So now its prototype is the following:
int xbps_humanize_number(char *buf, int64_t bytes)
It is a wrapper around NetBSD's humanize_number(3) which uses 6 digits for max
length, HN_AUTOSCALE and HN_NOSPACE|HN_DECIMAL. All users have been updated.
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.
prop_dictionary_t xbps_repository_pool_find_pkg(const char *pkg, bool bypattern, bool best)
This function iterates over the repository pool and returns a pkg
dictionary matching its pkgname if "bypattern" is false, otherwise
if "pkg" matches the pkgdep pattern. If "best" is true, it will look
in all repos and will return the newer version, otherwise the first one
that matches the arguments specified.
With this addition supporting many small registered repos is cheap, because
it checks by-package rather than by-package-list. This also helped to removed
some duplicated code and fix some rare bugs.
Bump XBPS_RELVER to 20110118.
- Rename regpkgs_dictionary to regpkgdb_dictionary to better describe what is is.
- Change some funcs in plist.c to return a boolean rather than int.
- Hide more internal funcs off the API.
- Simplify xbps_repository_update_pkg() and remove its second arg.
- Hide implementation details in xbps_repository_pool, now to iterate over the
pool you have to use xbps_repository_pool_foreach and its struct
repository_pool_index.
- Introduce xbps_{init,end}, to initialize/destroy some stuff in the library.
- Introduce xbps_dbg_printf to printf stuff for debugging purposes.
- xbps-{bin,repo}: added -d arg to enable debugging output.
- Before checking if a config file needs to be installed or such, check that
package contains the "conf_files" array.
- Remove obsolete dirs as well while updating packages.
- If transaction dictionary is ready remove the "missing_deps" array.
Bump XBPS_RELVER to 20101118.
--HG--
rename : lib/regpkgs_dictionary.c => lib/regpkgdb_dictionary.c
This function returns and internalized dictionary from a package's metadata
plist file as specified by its arguments.
Update all code to use it where appropiate.
* 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.
* libxbps: while running INSTALL/REMOVE scripts, do not fail if a script
returns ENOENT but the script exists; that means the script did not match
the expected action on its switch statement and the fact can be simply
ignored.
* libxbps: while upgrading packages and searching for obsolete files,
do not remove the files that did not match previous SHA256 hash. Also,
only remove obsolete dangling symlinks.
* Add proplib-0.4.1 source and use it in XBPS. This is to avoid
an external dependency, so that we depend on the features of the
internal library. This also means that proplib is not required anymore.
* Added support to read/write gzip compressed plists by default, thanks
to proplib-0.4 that gained new functionality.
That means that from now, XBPS will be able to write compressed gzip
plist files for all metadata related work. This will vastly reduce
bandwidth required for fetching remote repo's pkg index file and
binary packages.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100420122238-zcb85rudt9p34e10
This helps to catch upgrade problems and simplifies some parts of the code.
Bumped XBPS_RELVER because xbps_remove_pkg() has been changed.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100128150850-gcs93su38t6moydn
xbps_fetch_cache_connection() if 0 is passed as argument.
xbps-bin: enable fetch cached connection when downloading binpkgs.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124153156-4updprik11nwi7c1
- use printf to print commands rather than echo, which it may not have
support for escape sequences (-e).
- Remove DESTDIR from SBINDIR, MANDIR, LIBDIR and INCLUDEDIR so that
you can override it.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124125958-8mscedj5ntf288jd
doxygen and graphviz are required. It's disabled by default, use
the BUILD_API_DOCS make(1) argument to enable it.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100123013719-pkk3a3823cx09v8l
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