Packages that were previously registered in repository's pkg-index.plist
and are now unaccessible are removed.
This fixes issue #1 in github.com/vanilla/xbps.
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
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.
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.
Unless it's set, packages that are dependencies of other installed packages
won't be removed. This flag overrides this behaviour and forces the package removal.
While being here, misc cleanups.
- Indent properly with the longest "pkgver" object while listing or searching
for packages.
- Also match strings in the short description object while searching for
packages in xbps_repo.
This new target 'find-files' can be used to find which installed
package(s) own a file. Exact matches like "/bin/mount" or patterns
like "/usr/lib/libb[ao]b\*" can be specified.
Includes the following change:
* When replacing a package that is going to be updated in the transaction
do not remove it, just overwrite its files and continue. The updated
package will find that old files didn't match the SHA256 hash and will
skip them. This solves the issue of new package updates requiring new
dependencies with files that were previously stored in the old version.
For example gtk+-2.20 containing gdk-pixbuf, and gtk+-2.22 requiring
gdk-pixbuf externally.
* 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.