Juan RP
4d1cdcac0c
Fix concurrency issues in pkgdb: only allow 1 write transaction at the same time.
...
This implementation relies on a POSIX named semaphore, which is also
required by xbps-rindex(8).
2014-02-23 08:23:14 +01:00
Juan RP
596a8c199f
Improve two phase pkg removal: do the check for all entry types.
2014-02-09 12:53:15 +01:00
Juan RP
d08e76a386
Keep repo metadata if possible when updating repodata (xbps-rindex -a/-c).
...
API/ABI incompat changes, you've been warned.
2014-01-30 13:07:34 +01:00
Juan RP
5eea259c13
Remove the config.h kludge and override vasprintf detection via HAVE_VASPRINTF.
2014-01-20 18:50:33 +01:00
Juan RP
804a39c63b
Added XBPS_ARCH environment var to override uname(2) machine result.
2014-01-09 11:41:25 +01:00
Juan RP
3042dcd7aa
include/xbps_api_impl.h: remove __{BEGIN,END}_DECLS to make musl happy.
2014-01-07 21:19:03 +01:00
Juan RP
d3ffd0885b
xbps.h: drop PATH_MAX completely and use our own definition.
2013-12-29 16:56:43 +01:00
Juan RP
8eb1d3889f
Don't redefine _XOPEN_SOURCE and set it to 700 as previously.
2013-12-29 16:49:24 +01:00
Juan RP
1acce163ce
xbps.h: define _XOPEN_SOURCE for PATH_MAX.
2013-12-29 16:45:53 +01:00
Juan RP
35e4182250
Fully remove the obsolete softreplace code.
2013-12-25 11:12:52 +01:00
Juan RP
ec0d38c469
Implement per pkg RSA signatures and on-demand repository access.
2013-12-24 10:43:55 +01:00
Juan RP
2a21354a1c
Make some reorganization in struct xbps_handle.
...
The variables to set cachedir, rootdir and metadir have been
changed to "array of chars", this way there are no extra allocations.
Update clients accordingly and bump API version.
2013-12-16 11:46:39 +01:00
Juan RP
e64227b617
xbps.h: drop requirement of sys/queue.h.
2013-12-16 08:59:11 +01:00
Juan RP
67cfc4ebad
rpool: switch "struct xbps_repo" to be part of the rpool simpleq.
...
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.
2013-12-16 08:49:33 +01:00
Juan RP
1f16a22791
Add NDEBUG to CPPFLAGS if --enable-debug is unset.
2013-12-06 11:55:08 +01:00
Juan RP
8882b0215f
Redo how the repository keys are stored.
...
- 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.
2013-11-18 16:05:46 +01:00
Juan RP
53ecaf9819
Remove xbps_print_hexfp() from API and move it xbps-rindex, where it belongs.
2013-11-08 09:12:29 +01:00
Juan RP
2952c69c7a
Define NDEBUG for assert() if --enable-debug is not specified.
2013-11-08 09:11:47 +01:00
Juan RP
a5ecaa493f
New utility: xbps-rkeys(8) to manage RSA public keys.
2013-10-09 10:13:07 +02:00
Juan RP
27723e94ff
Optimize repository API functions.
...
- 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.
2013-10-07 10:19:04 +02:00
Juan RP
0db47cff9c
Always build with DEBUG and enable assertions.
2013-10-07 08:20:42 +02:00
Juan RP
8d5c48b861
Added support for the long awaited feature: RSA signed repositories.
2013-10-05 11:38:04 +02:00
Juan RP
5e1432f418
Added support to specify multiple repositories via cmdline ( close #17 ).
2013-09-18 16:45:05 +02:00
Juan RP
023484ca0b
Introduce xbps_{array,pkgdb}_foreach_cb_multi() and use it where appropiate.
...
In some tasks the single threaded implementation outperms the multithreaded
one. Use it where it really makes a difference. The _multi() routines do not
spawn any thread if _SC_NPROCESSORS_ONLN == 1.
Bump XBPS_API_VERSION.
2013-09-17 16:30:13 +02:00
Juan RP
24ff0472dd
Use fs blksize from stat(2)ed file when reading archives.
2013-08-29 14:30:14 +02:00
Juan RP
789165339a
Drop useless/unused xbps_add_obj_to_{array,dict} functions.
2013-08-18 10:25:17 +02:00
Juan RP
1999fbd771
Relax libarchive version requirement to 2.8.0.
2013-08-16 10:26:36 +02:00
Juan RP
84d14286a8
More libarchive-2.x compat.
2013-08-15 11:55:20 +02:00
Juan RP
0c7701f2bc
Introduce xbps_array_foreach_cb() and use it in random code.
...
This routine will spawn a thread per core to process N items stored
in the specified array, the last thread gets the remainder of items left.
Results have shown that xbps benefits if there is a considerable amount
of items and number of threads being spawned.
Use it in xbps_pkgdb_foreach_cb(), xbps-pkgdb(8), xbps-query(8)
and xbps-rindex(8).
On UP systems there's no overhead because pthread(3) is not used at all.
WIP! investigate if it can be used in libxbps (xbps_rpool_foreach()),
and finish conversion of xbps-rindex(8) -c.
2013-07-27 09:47:16 +02:00
Juan RP
432067de48
Remove three unused API functions.
2013-07-27 06:12:59 +02:00
Juan RP
1d0a5faff0
include/xbps.h.in: xbps_api.h -> xbps.h
2013-06-29 06:46:46 +02:00
Juan RP
505a933097
Added support to verify reverse dependencies in a transaction.
...
See https://plus.google.com/106812073015308749022/posts/ZXMHimd8iKd
2013-06-27 16:52:31 +02:00
Juan RP
09e116b7f0
xbps_api.h -> xbps.h
2013-06-20 12:31:02 +02:00
Juan RP
42c0766c00
Get rid of libfetch and proplib external dependencies.
...
The list of required external deps is now confuse, libarchive and openssl.
libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
2013-06-20 10:26:12 +02:00
Juan RP
4ef66d99bb
Drop requirement of confuse header for the public API; it's only used by libxbps.
2013-06-19 11:29:04 +02:00
Juan RP
d419f8ac2a
Move fetch.h to lib/fetch.
2013-06-19 11:03:03 +02:00
Juan RP
0d22fe362c
Increase default libfetch cache limits.
2013-06-19 09:39:39 +02:00
Juan RP
3abe48b68a
Introduce xbps_repo_get_pkg_plist() and use it in xbps-query -R.
2013-06-14 10:22:10 +02:00
Juan RP
5f2bba7f4e
Move functionality to resolve revdeps from repos to libxbps.
2013-06-14 08:13:51 +02:00
Juan RP
99be698979
Use a single file to store repository data.
...
This is just the starting point to extend repositories with PGP signatures.
2013-06-10 10:28:39 +02:00
Juan RP
5fd7565e6c
xbps-install(8): -R now overrides the repository list set in a configuration file.
...
Now -R can be used independently if a configuration file exists or not.
2013-04-18 18:17:14 +02:00
Juan RP
57bb7baf5e
unpack: use archive_entry_{filetype,uid,gid,mode} rather than stored struct stat.
2013-03-15 13:18:30 +01:00
Juan RP
b9888fd7be
xbps_match_virtual_pkg_in_dict: add support to match vpkgs with exact version.
2013-03-10 10:07:54 +01:00
Juan RP
b976a45aed
New code to find pkg obsolete files, with a proper kyua test.
...
Previous code incorrectly found obsolete files in this case:
(curpkg) - in files: /etc/foo.conf
(newpkg) - in conf_files: /etc/foo.conf
and removed this file because the code couldn't find it in the same
array. The new code fixes this case and compares the whole pkg filelist.
2013-03-09 13:30:56 +01:00
Juan RP
c504a73f08
Re-use pkgname from unpack to handle config files.
2013-03-08 10:11:16 +01:00
Juan RP
50ea03df2a
Revert code to update xbps independently; I'll use another way to implement this.
2013-03-08 09:44:57 +01:00
Juan RP
5eddf04898
Ignore executing install/remove scripts if XBPS_TARGET_ARCH is set.
...
Instead a two stage approach is necessary when packages for target arch
are installed:
- XBPS_TARGET_ARCH=arch xbps-install foo <- only unpack
- xbps-reconfigure -a <- configure natively or via an emulator
2013-03-07 18:08:12 +01:00
Juan RP
0a1859987a
Respect automatic-install mode from pkgdb in transaction updates.
...
Also simplify register/unregister and remove useless state definitions.
2013-03-07 10:03:59 +01:00
Juan RP
90b6803825
Introduce XBPS_STATE_CONFIGURE_DONE and use it in xbps-reconfigure(8).
2013-03-07 09:24:04 +01:00
Juan RP
5533259557
Also version XBPS_PKGINDEX to 1.7.
2013-03-05 07:34:37 +01:00
Juan RP
7c1a0ac3e8
New pkgdb (0.21) and repo index (1.7) format, see NEWS for info.
2013-03-05 04:08:42 +01:00
Juan RP
460e2e07fe
include/xbps_api.h.in: drop __{BEGIN,END}_DECLS.
2013-03-03 11:21:26 +01:00
Juan RP
5471c7f46c
Add libarchive compat definitions for 3.1.2.
2013-02-20 14:52:01 +01:00
Juan RP
ae7b76e245
xbps_fetch_file: don't fsync(3) before closing fd; slowdowns considerably slow storage.
2013-02-20 10:46:21 +01:00
Juan RP
2b5d3bb8f4
libxbps: when resolving deps, ignore all of them that depend on the origin pkg.
2013-02-07 18:50:55 +01:00
Juan RP
178a6b58ae
Remove another transaction obj from pkgdb and make xbps-pkgdb catch it.
2013-02-07 17:49:28 +01:00
Juan RP
d8769c4873
Workaround fix for 'xbps-install -yf xbps <-> xbps-git'.
2013-02-05 12:10:24 +01:00
Juan RP
5c1688944d
xbps-install: make -f preserve conf files; use it twice to overwrite all files.
2013-02-02 11:30:42 +01:00
Juan RP
66cf15f1c2
Update API docs.
2012-12-19 01:01:27 +01:00
Juan RP
22adf99e40
Faster generation of dynamic reverse dependencies and do this exactly once.
2012-12-15 07:33:49 +01:00
Juan RP
1d42986b75
libxbps: finish support for rindex 1.6.
2012-12-07 17:11:52 +01:00
Juan RP
2c1e4e502d
XBPS can now be built on NetBSD (and probably any other BSD variant).
2012-12-06 12:58:17 +01:00
Juan RP
e277823268
xbps_api.h.in: don't redefine __{BEGIN,END}_DECLS; which is true on BSD.
2012-12-06 10:54:01 +01:00
Juan RP
2e2da80cfc
find_repo_deps: find pkgd from pkgdb by name as it checks for version later.
2012-12-02 16:34:01 +01:00
Juan RP
f45352dbf8
Added support for dynamic generation of revdeps for installed packages.
2012-11-30 17:40:52 +01:00
Juan RP
63c1883201
Major API/ABI cleanup bringing performance improvements and fixes.
...
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.
2012-11-30 07:11:51 +01:00
Juan RP
7f577e005c
metadir: replace uthash simply with a dictionary.
2012-11-21 23:07:38 +01:00
Juan RP
ddca33b4a9
XBPS_RELVER: embed the latest git rev hash.
2012-11-20 00:38:23 +01:00
Juan RP
bdd93b7aa7
Introduce xbps_pkgdb_get_virtualpkgd() and use in xbps_metadir_get_pkgd().
2012-11-19 21:46:54 +01:00
Juan RP
5de4fb1f0a
xbps-install: -f will also overwrite pkg files.
2012-11-19 20:50:58 +01:00
Juan RP
a311294f0a
libxbps: added support to "inject" vpkg config files at initialization time.
2012-11-19 15:42:24 +01:00
Juan RP
1147e7ce3c
xbps_find_pkg_orphans: there's no need to check pkg state, any state is ok.
2012-11-19 14:07:05 +01:00
Juan RP
46f7a808b4
xbps_metadir: use an hash table (via uthash): 15s vs 1m10s.
2012-11-18 02:38:24 +01:00
Juan RP
fcdb6b0930
unpack: use pkg dictionary from metadir to find obsoletes!
2012-11-17 15:14:11 +01:00
Juan RP
b0fab7a3ee
Implemented a cache to get pkg dicts from metadir.
...
This improves xbps-pkgdb -a marginally, but still seems to be a bit slow.
2012-11-16 21:50:52 +01:00
Juan RP
34bd49f85a
New pkg metadata structure for 0.18. See the NEWS file for info.
2012-11-16 16:55:35 +01:00
Juan RP
a77727887d
Improvements for xbps_fetch_file and xbps_repository_sync_index.
...
xbps_fetch_file:
- A temp file is created with .part extension to improve resuming.
- Files are downloaded in cwd.
- Switch to futimens(2) and fsync(2).
xbps_repository_sync_index:
- Do not create local repodir in metadir if it already exists.
- Simplify the code thanks to new xbps_fetch_file().
2012-11-11 11:29:49 +01:00
Juan RP
df0d5d7330
Get rid of pkg state half-unpacked; not-installed state is good enough.
2012-11-11 09:42:30 +01:00
Juan RP
05984a31b1
xbps_rpool_sync: new arg to specify the file; bump XBPS_API_VERSION.
2012-11-07 10:37:58 +01:00
Juan RP
ca095df52f
libxbps: some tweaks for struct xbps_state_cb_data.
...
- Renamed args pkgname/version to arg0/arg1 to make them generic.
- Update bins with this and make some tweaks in state_cb.
Bumped API version.
2012-11-07 10:11:06 +01:00
Juan RP
a5707e5b8d
Bump XBPS_API_VERSION for latest changes in libxbps behaviour.
2012-10-26 11:35:01 +02:00
Juan RP
863f12e349
Improved finding obsolete files while upgrading pkgs.
2012-10-24 07:45:00 +02:00
Juan RP
22a86d82f8
Added support for installing exact dependencies, i.e pkg X depends on 'Y-1.0_1'.
2012-10-09 07:35:59 +02:00
Juan RP
6592164010
xbps_api.h.in: bump XBPS_APIVER.
2012-10-06 09:23:27 +02:00
Juan RP
b13df00ded
Use a common place to set XBPS_VERSION.
2012-10-03 10:10:20 +02:00
Juan RP
7909f597cb
xbps_path_from_repository_uri: do not look for binpkgs in repo arch dirs anymore.
2012-09-30 10:13:06 +02:00
Juan RP
54b6cc7ec1
xbps-{bin,repo}: add -B flag to set default repo if xbps.conf not found.
...
(cherry picked from commit 75eac1a1426040a833e0b10e208f2e55fa359532)
2012-09-29 19:10:48 +02:00
Juan RP
e370ff0625
libxbps: use a new bool in struct xbps_handle to track successful initialization.
...
(cherry picked from commit 03374950680f6a839b1ee2df8e3a4e1dfb110fa8)
2012-09-29 19:09:03 +02:00
Juan RP
b422fa654e
xbps_api.h: next version will be 0.17.
2012-08-10 08:44:41 +02:00
Juan RP
8eba2d7ea3
xbps-repo: replaced 'genindex' target with 'index-{add,clean}'.
...
See the NEWS file for more information.
2012-07-17 12:31:04 +02:00
Juan RP
9edd60c3a7
libxbps: extend the list of symlinks in rootdir to be ignored.
2012-07-14 12:11:55 +02:00
Juan RP
2f1e975607
Added "install-date" object to pkg's pkgdb dictionary, make xbps-bin(8) print it.
2012-07-11 12:19:39 +02:00
Juan RP
34697e8022
libxbps: improve matching obsolete files, skip matches by hash and filename.
...
Don't remove top level symlinks (/bin, /sbin and /lib) if they were found
as obsoletes. This is a workaround for the system transition to /usr.
2012-07-10 23:22:25 +02:00
Juan RP
172435bd7e
xbps_check_is_installed_pkg_by_pattern: do not reset errno, leave it as is.
2012-07-04 12:59:40 +02:00
Juan RP
94238302f2
transaction_ops: in update, check if curpkg has been previously added.
2012-07-04 11:56:01 +02:00
Juan RP
f1ad8a95de
xbps-repo: fixed issue 24 (xbps-src make-repoidx is doing something wrong).
2012-06-30 11:10:00 +02:00
Juan RP
54bc92bd97
xbps_dictionary_from_archive_entry: simplify and sync zlib code with proplib.
2012-06-20 09:26:00 +02:00
Juan RP
8abd275bfb
libxbps: xbps_rpool_release: don't release repo_pool, it's already released.
2012-06-18 10:49:36 +02:00
Juan RP
c24ce8e4da
libxbps: use memcpy in critical paths for performance, fixed some memleaks.
2012-06-18 10:43:05 +02:00
Juan RP
0f3d4f4a19
libxbps: hide compat symbols.
2012-06-18 09:52:19 +02:00
Juan RP
974b2fe8ad
libxbps: simplify pkgdb_get_pkgd and find_pkg_dict_installed internals.
...
There's no need to prop_dictionary_copy the returned dictionary to
later have to free it again, just return directly the dictionary and
avoid the free(3)s.
2012-06-16 09:02:07 +02:00
Juan RP
068cab8d20
libxbps: performance improvements by caching the most accessed paths.
...
1- We can cache the result of the first xbps_pkgdb_init() when it fails
and avoid the malloc/free/access from it.
2- We cache the uname(2) result into a private var in xbps_handle and
use it in xbps_pkg_arch_match().
This improves performance by ~5% approx and it's close as it was before
introducing the repository index format 1.5.
2012-06-15 15:33:11 +02:00
Juan RP
506625a716
libxbps: also match vpkgs in previous commit.
2012-06-14 12:12:05 +02:00
Juan RP
302b216d8d
libxbps: do not add dups to transaction dictionary due to virtual pkgs.
2012-06-14 11:53:27 +02:00
Juan RP
c31d168e2b
xbps_api.h: document EAGAIN in xbps_transaction_prepare(), fix typos.
2012-06-14 10:01:24 +02:00
Juan RP
6cc5ee2d81
xbps_api.h: fix doc for xbps_rpool_index.
2012-06-14 09:49:32 +02:00
Juan RP
d46c503a97
xbps_api.h: document new xhp arg in some funcs.
2012-06-14 09:43:39 +02:00
Juan RP
3e9e87fc2a
libxbps: require a pointer to xbps_handle in functions that need it.
...
This removes 2 global vars from lib/initend.c and easier to know
what functions require access to xbps_handle.
2012-06-14 08:22:11 +02:00
Juan RP
c61ba8dfcc
Added support for package conflicts.
2012-06-11 16:14:03 +02:00
Juan RP
81610697df
xbps_transaction_install_pkg: proper pkg find order in rpool.
...
Previously it was preferring virtual packages from
configuration file before real packages.
2012-06-09 10:09:46 +02:00
Juan RP
e75a524ee3
xbps_transaction_install_pkg: on exact match properly detect if it's installed.
2012-06-05 22:54:46 +02:00
Juan RP
efefa000b2
xbps_dictionary_metadata_plist_by_url: only accept exact matches.
2012-06-05 20:53:15 +02:00
Juan RP
a00a450fe0
unpack: make sure to use exact file when checking for hash matches.
2012-06-05 20:23:12 +02:00
Juan RP
c37026d4c6
libxbps: require an underscore in strings to detect correctly pkgname/version.
2012-06-05 10:58:39 +02:00
Juan RP
9441f9f14b
libxbps: multiple random changes for overall performance increase.
2012-06-04 23:22:33 +02:00
Juan RP
fa73de309f
libxbps: remove xbps_find_pkg_dict_from_plist_by_xxx (unused).
2012-06-04 21:34:21 +02:00
Juan RP
34c1269504
Fixed installing exact pkg versions on pkgs with hyphens, we use equal sign as delimiter now.
2012-06-03 07:26:48 +02:00
Juan RP
bd3a8982cc
xbps-bin: added support to install exact pkg version, i.e 'foo-1.0'.
2012-06-02 17:35:21 +02:00
Juan RP
642e6fca3a
xbps_rpool_sync: also fetch repository files index, removed accidently in previous.
2012-06-01 15:45:49 +02:00
Juan RP
981b13bd5a
xbps-repo: 'sync' and 'pkg-list' target now accept a repository URI argument.
...
If set, only the matching repository will be used for the task.
2012-06-01 15:02:06 +02:00
Juan RP
652e9afcef
libxbps: fixed xbps_remove_pkg_from_array_by_{name,pattern,pkgver}.
...
The correct index wasn't being passed to prop_array_remove.
2012-06-01 10:53:28 +02:00
Juan RP
7289547432
Welcome "repository index format 1.5". See NEWS for information.
2012-05-31 16:29:56 +02:00
Juan RP
27aacf97f4
xbps_file_exec: simplify and don't chroot when rootdir == /.
...
Before that change we were chroot(2)ing even when rootdir was set to /.
2012-05-30 17:44:39 +02:00
Juan RP
a94dd5dbfa
Revert "libxbps: implement xbps_file_exec() with posix_spawn()."
...
This reverts commit 5aa05f4c72
.
2012-05-30 17:26:25 +02:00
Juan RP
5aa05f4c72
libxbps: implement xbps_file_exec() with posix_spawn().
2012-05-30 14:45:47 +02:00
Juan RP
f40759aabe
libxbps: use same order strategy when checking for deps queued in transaction.
2012-05-30 12:54:28 +02:00
Juan RP
922ee1f1b6
libxbps: rename xbps_repository_pool_xxx to xbps_rpool_xxx.
2012-05-30 10:56:32 +02:00
Juan RP
da4b8b7427
rpool: improve the order while resolving dependencies.
...
See the NEWS file for more information. After that change you don't have
to set a virtual pkg in conf file, if required virtual pkg is in rpool.
2012-05-30 10:22:53 +02:00
Juan RP
f7f4e0bec0
Extend 'soft replace' and also remove obsolete files.
2012-05-25 22:44:58 +02:00
Juan RP
da9b6774c3
Fix previous: propagate "softreplace" obj to pkg being replaced.
2012-05-25 17:58:36 +02:00
Juan RP
6a4de0127d
libxbps: introduce the concept of "soft replace"; see the NEWS file.
2012-05-25 17:24:36 +02:00
Juan RP
d075f7182a
When removing pkg files, remove only dangling symlinks after regular files.
...
This is required for the upcoming eglibc package.
2012-05-25 14:31:42 +02:00
Juan RP
9acec7883b
xbps_remove_pkg: do not error out if files.plist not found, just continue.
2012-05-21 23:03:29 +02:00
Juan RP
28767f2ea8
Added support to put packages "on hold".
2012-05-08 09:19:43 +02:00
Juan RP
5e0b06dc00
xbps-bin: improve def unpack cb to print more meaningful messages.
2012-05-06 16:48:47 +02:00
Juan RP
8a4b143bf3
Show a proper error message if download of a binpkg fails in a transaction.
2012-05-06 09:09:09 +02:00
Juan RP
83bda174ab
libxbps: make xbps_find_virtualpkg_* only look for virtual pkgs.
...
Before this commit they also looked for non virtual packages, which
is not what it was meant when those functions were added.
2012-04-12 11:57:21 +02:00
Juan RP
bfe7ab1c5a
xbps_configure_pkg: simplify and remove "version" arg (API change).
...
The "version" argument (being optional) clearly is not needed and it
can be fully removed. This simplifies the internal implementation as well
as the API.
2012-04-10 10:02:27 +02:00
Juan RP
ef6d1adf91
xbps_set_pkg_state_installed: simplify (API change).
...
The third optional argument "pkgver" clearly is useless because we can
create it internally with "pkgname" and "version" arguments instead.
Also make the "version" argument mandatory.
2012-04-10 09:43:59 +02:00
Juan RP
732ce45b86
libxbps: new function xbps_pkgdb_get_pkgd_by_pkgver().
...
Finds a pkg dictionary in pkgdb by matching its pkgver object.
2012-04-05 10:57:15 +02:00
Juan RP
feacc506de
When reinstalling existing pkgs, remove previous entry in pkgdb's requiredby.
2012-04-04 10:20:29 +02:00
Juan RP
8e0612bb46
A bugfix while sorting dependencies in a transaction (thanks dave).
2012-03-30 01:39:13 +02:00
Juan RP
a5f4848d0b
Use best pkg available when resolving required dependencies.
2012-03-28 12:01:59 +02:00
Juan RP
af593500c3
Fix a couple of issues resolving deps with virtual packages.
2012-03-24 09:21:28 +01:00
Juan RP
e698acf440
Make xbps_find_virtualpkg_conf_xxx private again, unused in test suite now.
2012-03-13 11:37:50 +01:00
Juan RP
9bada162a1
New "metadir" member in xbps_handle to override default metadata dir.
2012-03-13 10:22:35 +01:00
Juan RP
749e03aa29
Make xbps_find_virtualpkg_conf_in_xxx_by_xxx part of the API and add kyua tests.
2012-03-12 17:51:50 +01:00
Juan RP
715990a1e5
Make xbps_find_virtualpkg_in_dict_by_xxx part of the API and add kyua tests.
2012-03-12 16:36:46 +01:00
Juan RP
35c2e2a75d
Enable assertions by default, even with --debug disabled.
2012-03-12 11:22:18 +01:00
Juan RP
06745b70ae
Fixed issue 22: always set perms from binpkg to existing files while unpacking.
2012-03-07 12:00:08 +01:00
Juan RP
dc61fbed0e
libxbps: match required pkgdep by virtual pkg in a transaction.
2012-02-28 20:39:10 +01:00
Juan RP
c965c27dfb
Skip removing obsolete files in some cases.
2012-02-20 20:23:33 +01:00
Juan RP
6e50919d2b
xbps_repository_pool_dictionary_metadata_plist: make it accept a pkgpattern.
2012-02-16 08:55:07 +01:00
Juan RP
cbf7417d1d
xbps_transaction_install_pkg: return EEXIST if pkg already installed.
2012-02-14 00:34:26 +01:00
Juan RP
9a23c2a356
xbps_api.h: fix xbps_transaction_install_pkg doc mismatch.
2012-02-06 13:50:53 +01:00
Juan RP
f48ab4a686
Fixed a bug in rpool to find best pkg available.
2012-01-29 12:12:00 +01:00
Juan RP
b7da3464dd
xbps_repository_sync_pkg_index: update for index 1.4 format.
2012-01-25 06:02:38 +01:00
Juan RP
abb0d260b9
xbps-bin: the install target gains suppor for installing best pkg available.
2012-01-25 02:14:04 +01:00
Juan RP
49baad48f4
Fixed module-init-tools->kmod update as reported by davehome.
...
The problem was that required package dependency was installed, but
the version didn't satisfy the requirement and the code unconditionally
assumed an updated existed in repository pool. Now the code checks
package state to set transaction reason.
2012-01-24 18:45:50 +01:00
Juan RP
e8071802d1
xbps_api.h: fix xbps_handle::flags possible values.
2012-01-22 11:35:26 +01:00
Juan RP
791f1d40b2
xbps_handle: remove debug, install_*, syslog_enabled members.
...
Replaced by definitions that can be set to xbps_handle::flags.
2012-01-22 10:52:35 +01:00
Juan RP
c884634a62
xbps_api.h: fix some defs.
2012-01-22 10:24:37 +01:00
Juan RP
a166d6a2a3
Simplify xbps_transaction_prepare()/commit() and related API changes.
...
- xbps_handle::transd -> new member with transaction dictionary.
- xbps_transaction_prepare: returns an int.
- xbps_transaction_commit: doesn't need any arg now.
- xbps_repository_pool_sync: doesn't need any arg now.
- xbps_pkgdb_update: removed xbps_handle * arg.
- xbps_transaction_missingdeps_get: removed, missing_deps array is in
xbps_handle::transd("missing_deps") array object.
2012-01-22 10:00:46 +01:00
Juan RP
38db570c19
pkgdb: foreach_xxx_pkg_cb -> foreach_xxx_cb.
2012-01-21 10:30:20 +01:00
Juan RP
99f5549a29
xbps_pkgdb_replace_pkgd: fix bool vs int confusion in returned value.
2012-01-20 12:38:24 +01:00
Juan RP
d075411049
Improve API documentation round 1.
2012-01-20 12:17:27 +01:00
Juan RP
6940505de9
regpkgdb rototill: renamed to pkgdb, improve the public API.
2012-01-20 11:10:52 +01:00
Juan RP
9a088937b5
Repository index 1.4 -- see NEWS file for info.
2012-01-19 12:26:40 +01:00
Juan RP
dfc7ff4232
API break: simplify xbps_repository_pool_find_virtualpkg().
2012-01-18 08:25:28 +01:00
Juan RP
d0e1477eeb
Simplify xbps_end() and don't continue if xbps_init() did not succeed.
2012-01-17 16:56:17 +01:00
Juan RP
f2b05d6438
Improved pkg best matching in rpool, and support for exact pkgver matches.
...
- xbps_repository_pool_find_pkg in best match case, now returns the
newest package version available in rpool.
- Added xbps_repository_pool_find_pkg_exact that returns a package
by exact matching a pkgver.
- Removed xbps_handle_alloc(), the user is free to use memory
allocated from heap or stack.
- Improved API documentation in preparation for 0.12.
Bumped XBPS_API_VERSION again.
2012-01-17 16:17:03 +01:00
Juan RP
beb7284681
xbps-repo: faster 'genindex' target implementation for index-files.plist.
2012-01-17 10:50:35 +01:00
Juan RP
4164573b35
Added xbps_match_pkgdep_in_array() to match a pkgdep against pkgpatterns.
...
This fixes xbps_match_pkgpattern_in_array() which had the args swapped
in xbps_pkgpattern_match() resulting in inverted results while resolving
virtual packages in a transaction.
2012-01-16 15:50:06 +01:00
Juan RP
ffa48b2cf3
Fix xbps_configure_packages() by avoiding proplib iterators.
2012-01-16 14:41:16 +01:00
Juan RP
2186e16a5e
Fixed issue 21 "xbps-repo find-files
is awfully slow" reported by ojab.
2012-01-15 14:24:44 +01:00
Juan RP
c83a77c1b5
Fixed issue 19 "xbps-src cannot fetch source with unknown Content-Length".
2012-01-05 12:26:57 +01:00
Juan RP
ab6d4a19f1
xbps_configure_packages: fix flush arg confusion.
2012-01-04 17:59:49 +01:00
Juan RP
a31c20e52a
Make xbps_configure_pkg/packages accept a flush bool arg for frontends.
2012-01-04 17:41:36 +01:00
Juan RP
bae664c639
xbps_match_pkgpattern_in_array: fix swapped args resulting in non matches.
2011-12-29 16:35:56 +01:00
Juan RP
f4f995574c
xbps_remove_pkg_from_dict_by_name: make this work correctly again.
2011-12-28 09:44:25 +01:00
Juan RP
caaba09295
xbps_register_pkg: fix by adding pkgd into regpkgdb array.
2011-12-28 09:21:01 +01:00
Juan RP
a7f3a56e19
Make xbps_(un)register_pkg() accept a boolean arg to flush regpkgdb on success.
2011-12-28 05:57:04 +01:00
Juan RP
b64fb39701
xbps_remove_pkg_from_dict_by_name: simplify.
2011-12-24 16:37:25 +01:00
Juan RP
5a1ab26972
Introduce xbps_regpkgdb_remove_pkgd, and use regpkgdb funcs to make xbps-uhelper work.
2011-12-24 16:09:30 +01:00
Juan RP
3b7491d29b
Merged purge code in remove, configurable transaction regpkgdb flushing.
...
See the NEWS file for info.
2011-12-24 01:05:26 +01:00
Juan RP
d7a32a7eca
Introduce regpkgdb_foreach_reverse_pkg_cb, switch to regpkgdb_foreach_xxx.
2011-12-23 08:16:25 +01:00
Juan RP
ca0905925f
xbps_end: don't continue if we don't have a valid xbps_handle pointer.
2011-12-22 16:55:35 +01:00
Juan RP
3d81d497bd
Redo xbps_repository_pool internals, it's a bit faster now.
2011-12-22 16:38:05 +01:00
Juan RP
7bfcdee791
Introduce xbps_regpkgdb_foreach_pkg_cb() and use it in xbps-bin check.
2011-12-22 14:25:27 +01:00
Juan RP
c40c40e08e
Always preserve current conffiles while installing new packages.
2011-12-19 11:20:27 +01:00
Juan RP
1a4c13e1bf
xbps_remove_pkg: fix path to REMOVE script.
2011-12-16 10:34:05 +01:00
Juan RP
450bf2713d
Also purge packages to replaced in transaction.
2011-12-16 10:21:51 +01:00
Juan RP
32fdb35c56
libxbps: make xh->cachedir to always use a full path after xbps_init().
2011-12-15 14:24:10 +01:00
Juan RP
70e95786dc
libxbps: pass xhp->conffile as last argument when execing INSTALL/REMOVE scripts.
2011-12-15 12:24:59 +01:00
Juan RP
b0ceeaa58e
New configuration file via confuse: xbps.conf.
2011-12-15 11:19:20 +01:00
Juan RP
3f45f563be
xbps-bin: syslog support, enabled by default.
2011-12-06 13:02:49 +01:00
Juan RP
43d85c76b3
xbps-repo: implement new target 'pkg-list' to list pkgs from target repo.
2011-12-03 10:37:31 +01:00
Juan RP
e7562fa72d
libxbps: make xbps_find_*pkg_dict_installed only accept {INSTALL,UNPACK}ED states as valid ones.
2011-11-30 11:11:15 +01:00
Juan RP
9d731ffe09
Introduce xbps_transaction_remove_pkg() and use it for xbps-bin(8).
2011-11-27 09:05:18 +01:00
Juan RP
0ff0aee226
libxbps: added xbps_transaction_autoremove_pkgs(bool purge).
...
This is to add package orphans into the transaction dictionary.
2011-11-25 11:20:03 +01:00