Juan RP
6f8b2ca33a
libxbps: simplify how configuration files are handled, use cached values if possible.
2011-01-20 02:55:40 +01:00
Juan RP
0a66dbea5f
NEWS: update with past days changes.
2011-01-19 17:17:39 +01:00
Juan RP
fcbe7f113b
Don't build static bins with PIE, only for dynamic.
2011-01-19 16:52:55 +01:00
Juan RP
8dc6926664
configure: fixes for building with an installed static libxbps.
2011-01-19 14:45:58 +01:00
Juan RP
274c8c432b
lib/Makefile: build libxbps with --export-dynamic.
2011-01-19 14:31:30 +01:00
Juan RP
3a303755c7
xbps_api.h: fix API comments for refcnts.
2011-01-19 11:32:20 +01:00
Juan RP
efea94bec6
Fixed API documentation comments for doxygen.
2011-01-19 00:31:22 +01:00
Juan RP
2adaf610e7
libxbps: xbps_yesno/noyes() are only used in xbps-bin(8), remove from API.
2011-01-18 23:45:12 +01:00
Juan RP
0a8fabbfac
xbps-bin: remove spurios chars in two printf()s.
2011-01-18 23:42:51 +01:00
Juan RP
992e8c6a14
libxbps::xbps_humanize_number(): use common values and hide implementation details from API.
...
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.
2011-01-18 23:10:07 +01:00
Juan RP
e2b55c90be
regpkgdb_dictionary.c: bump copyright year for previous changes.
2011-01-18 20:21:35 +01:00
Juan RP
9180bfce23
libxbps: regpkgdb: use a mutex for {inc,dec}rementing the refcnt.
2011-01-18 20:18:27 +01:00
Juan RP
fe15380e1b
libxbps: modify the API, new func xbps_get_binpkg_repo_uri().
...
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.
2011-01-18 18:21:55 +01:00
Juan RP
6d7121c5bd
xbps_repository_get_pkg_plist_dict: use xbps_repository_pool_find_pkg().
2011-01-18 15:19:27 +01:00
Juan RP
8e0a94d5cc
xbps-repo: use xbps_repository_pool_find_pkg().
2011-01-18 14:57:25 +01:00
Juan RP
503afdd48d
libxbps: extend the API, new func: xbps_repository_pool_find_pkg.
...
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.
2011-01-18 14:44:39 +01:00
Juan RP
1125963da8
libxbps: simplify the algorithm for sorting deps in the transaction.
...
Rather than using a SIMPLEQ to copy the package dictionary and later on
adding all items into the sorted array, just add the pkg dictionary
into the sorted array directly and removing it from the unsorted array.
This reduces memory usage and greatly sorts all packages that aren't
installed automatically in the correct order in the transaction.
Also added a large comment explaining how the algorithm works and
what it is supposed to do and when.
2011-01-17 17:17:02 +01:00
Juan RP
2845f49bf2
Added tag 0.7.3 for changeset b373dfd04ef2
2011-01-16 17:08:24 +01:00
Juan RP
d9fa6da693
NEWS, Changelog: update for 0.7.3.
2011-01-16 17:07:43 +01:00
Juan RP
3c4b375ecf
Fixed a test in config file handling that made all conf_files not properly detected.
2011-01-16 16:55:01 +01:00
Juan RP
0fe503b7f4
configure: -Wformat-security and -Wformat-nonliteral are included in -Wformat=2.
2011-01-15 14:02:34 +01:00
Juan RP
de590b8457
lib/Makefile: build -Wno-error for included libfetch for now.
2011-01-15 13:37:16 +01:00
Juan RP
84f04fb6c4
configure: build with -O2 and -pipe if supported.
2011-01-15 13:36:46 +01:00
Juan RP
3482e68491
configure: make symbol visibility dependent in the configure test, misc changes.
2011-01-15 12:21:38 +01:00
Juan RP
6051eb29ab
Added another bunch of compiler warnings and fix code.
2011-01-15 11:59:44 +01:00
Juan RP
d9001adbad
configure: added --silent option to hide compilation details.
2011-01-15 10:49:35 +01:00
Juan RP
4420bd9427
Really enable the compiler detected flags into its correct var.
2011-01-15 10:41:35 +01:00
Juan RP
33c1a33912
Make configure detect required libraries to link.
2011-01-14 00:30:49 +01:00
Juan RP
57af8f9ee0
xbps_repository_get_pkg_plist_dict: avoid uninitialized var.
2011-01-12 17:15:23 +01:00
Juan RP
2206b27037
Added "--with-external-libfetch" to build against external libfetch.
2011-01-12 17:06:53 +01:00
Juan RP
cb8464bdc6
configure: respect CFLAGS/LDFLAGS passed via env.
2011-01-11 15:04:23 +01:00
Juan RP
2bd1629177
Update to 0.7.2.
2010-12-28 12:15:11 +01:00
Juan RP
7341920338
Added tag 0.7.2 for changeset 25a675190b31
2010-12-28 12:15:01 +01:00
Juan RP
d307226ee7
xbps_unpack_binary_pkg: fix a memleak and make all error paths go to a single point.
2010-12-25 02:38:30 +01:00
Juan RP
71878669da
libxbps: fix a memleak when removing obsolete files in pkg upgrades.
2010-12-25 02:37:25 +01:00
Juan RP
057deb180c
xbps-repo: report the errno string when a repository cannot be added and fix a NULL pointer deref.
2010-12-25 02:35:11 +01:00
Juan RP
5b101eae2b
xbps-repo: fix a memleak in the 'add' target.
2010-12-24 05:43:00 +01:00
Juan RP
57453d1926
xbps-{bin,repo}: use strlcpy().
2010-12-24 05:31:37 +01:00
Juan RP
45b4fada3d
xbps-repo: fix a memleak in the 'show' target.
2010-12-24 05:29:39 +01:00
Juan RP
f2c33b0b08
xbps-repo: fix a memleak in the 'find-files' target.
2010-12-24 05:21:49 +01:00
Juan RP
a7886f62db
xbps-bin: fix a memleak in the 'find-files' target.
2010-12-24 05:21:22 +01:00
Juan RP
cdecb7f793
configure: also check if compiler supports _FORTIFY_SOURCE=2.
2010-12-24 02:36:16 +01:00
Juan RP
05c28b4a6c
Added tag 0.7.1 for changeset 6b51cd806257
2010-12-23 20:08:15 +01:00
Juan RP
5c19d15694
Changelog: update for 0.7.1.
2010-12-23 20:07:51 +01:00
Juan RP
d2baa2b3f6
NEWS: update for 0.7.1.
2010-12-23 20:06:51 +01:00
Juan RP
e3b86d5ff6
xbps-dgraph: use PRIu64 to printf uint64_t from <inttypes.h>.
2010-12-23 17:23:14 +01:00
Juan RP
f9d0a639f2
xbps_repository_pool_init: don't loop forever if repo pkg-index.plist files cannot be internalized.
2010-12-19 17:46:32 +01:00
Juan RP
e01399c242
xbps-uhelper: added -d flag to enable debugging.
2010-12-18 10:26:12 +01:00
Juan RP
bc28aa77d8
xbps_fetch_file: set a 30seconds timeout.
2010-12-18 10:19:09 +01:00
Juan RP
b017f6d024
xbps-repo: fix the 'genindex' target due to 0.7.0 API changes.
2010-12-16 11:37:31 +01:00
Juan RP
e6503b98cc
xbps-uhelper: fix the 'unregister' target, wasn't updated for 0.7.0 API changes.
2010-12-16 00:25:53 +01:00
Juan RP
f9db3b1805
Added tag 0.7.0 for changeset 4a202e7ed155
2010-12-15 15:48:42 +01:00
Juan RP
1d2ef6772e
NEWS: mention typo-fix for strlcat.
2010-12-15 15:47:23 +01:00
Juan RP
03f5211f0c
Changelog: update for 0.7.0.
2010-12-15 15:45:43 +01:00
Juan RP
0ed1e91b1a
NEWS: 0.7.0 will be released today.
2010-12-15 15:44:42 +01:00
Juan RP
ece608a080
xbps-repo(8): implemented 'find-files' target.
2010-12-15 15:14:44 +01:00
Juan RP
8013448097
configure: fix a typo that broke strlcat test. Found by Min Sik Kim reported in issue 2.
2010-12-10 16:25:28 +01:00
Juan RP
60c37406c1
xbps-repo: zero out allocated mem to avoid garbage in the 'search' target.
2010-12-04 10:31:17 +01:00
Juan RP
4f6e20c431
xbps-bin: zero out allocated mem to avoid garbage in the 'list' target.
2010-12-04 10:30:01 +01:00
Juan RP
237991fd79
xbps-bin: added -F flag for the remove target.
...
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.
2010-12-03 17:36:07 +01:00
Juan RP
2401e72b8a
Remove DPRINTF macro, unused.
2010-12-03 17:30:02 +01:00
Juan RP
98a2034fcf
Also show the conflicts object if available and simplify the code.
2010-12-03 06:37:01 +01:00
Juan RP
d2f5535162
lib/plist: no need to check against NULL if prop_object_type() is used.
2010-12-03 06:36:05 +01:00
Juan RP
b3c8a8ef5c
Backed out changeset e82cc0e4b779
...
Otherwise the refcount in repository pool will initialize/release on every op.
2010-11-25 21:33:14 +01:00
Juan RP
c7f6f9f44a
xbps-bin: there's no need to init repository pool.
2010-11-25 16:23:49 +01:00
Juan RP
2c72c81db0
xbps-bin: always check if the there are missing deps regardless of the errno value.
2010-11-25 10:58:44 +01:00
Juan RP
0ac845eb05
NEWS: mention that obsolete dirs are also removed while updating.
2010-11-24 17:01:55 +01:00
Juan RP
278a37a24a
xbps-bin: fix for previous.
2010-11-24 16:39:14 +01:00
Juan RP
940e077fb4
Improvements for xbps-{bin,repo}.
...
- 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.
2010-11-24 16:37:30 +01:00
Juan RP
d2be842ce5
Fix and improve when there are missing deps in the transaction dictionary.
2010-11-23 23:17:04 +01:00
Juan RP
99f3d846de
xbps_purge_pkg: if state is not XBPS_PKG_STATE_CONFIG_FILES, just return 0.
2010-11-21 14:34:49 +01:00
Juan RP
fdec663855
API clean up (part 2), plus misc changes and improvements.
...
- 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
2010-11-19 13:40:13 +01:00
Juan RP
ffc255b715
Starting to clean up the public API, move private stuff into xbps_api_impl.h.
2010-11-13 03:18:58 +01:00
Juan RP
3b931475c0
Make xbps_read_dict_from_archive_entry() private to libxbps, as it's only used internally.
2010-11-10 15:08:21 +01:00
Juan RP
420225d414
xbps-dgraph: new utility to generate dot(1) graphs for package metadata properties.
2010-11-08 23:27:15 +01:00
Juan RP
175b1abf8f
xbps_purge_all_pkgs: no need to check for pkg state because xbps_purge_pkg() does it too.
2010-11-08 12:20:44 +01:00
Juan RP
0584c01088
Better describe xbps_find_pkg_from_plist().
2010-11-08 11:49:29 +01:00
Juan RP
c3afb4f4fb
New function: xbps_get_pkg_dict_from_metadata_plist.
...
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.
2010-11-08 03:14:41 +01:00
Juan RP
25ebcd53f8
xbps_api.h: update comments for @private funcs.
2010-11-08 02:12:03 +01:00
Juan RP
679833156a
Always release the object dictionary returned by xbps_find_pkg_dict_installed().
...
Document this in the public API header and update all code accordingly.
2010-11-08 02:02:35 +01:00
Juan RP
ab10cc3b15
xbps_find_pkg_dict_installed: dictionary MUST be copied before calling
...
xbps_regpkgs_dictionary_release(), otherwise it will be NULL.
Found by executing this function without initializing regpkgdb.
2010-11-08 01:37:53 +01:00
Juan RP
756a5ec654
xbps_api.h: improve description for some defs.
2010-11-08 00:50:19 +01:00
Juan RP
c97c2c3f2f
Update the dot(1) graph for the libxbps transaction dictionary.
2010-11-06 10:28:09 +01:00
Juan RP
ec7cdde1e0
Misc cleanups and performance improvements.
...
- 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.
2010-11-06 06:44:00 +01:00
Juan RP
f8629652da
Make xbps_file_*_exec() always chroot if uid==0 and /bin/sh (+x, relative) exists.
2010-11-06 06:40:19 +01:00
Juan RP
74500381ff
lib/Makefile: remove dup values.
2010-11-04 03:48:23 +01:00
Juan RP
99d38bf176
Rename some files in the library to better describe what they do.
...
--HG--
rename : lib/config_files.c => lib/package_config_files.c
rename : lib/configure.c => lib/package_configure.c
rename : lib/orphans.c => lib/package_orphans.c
rename : lib/purge.c => lib/package_purge.c
rename : lib/register.c => lib/package_register.c
rename : lib/remove.c => lib/package_remove.c
rename : lib/remove_obsoletes.c => lib/package_remove_obsoletes.c
rename : lib/requiredby.c => lib/package_requiredby.c
rename : lib/state.c => lib/package_state.c
rename : lib/unpack.c => lib/package_unpack.c
2010-11-03 20:08:33 +01:00
Juan RP
8ef8d86c12
Some changes for the XBPS libfetch's frontend code.
...
1) Raise the cache connection settings to more sane defaults (8->6, 16->2).
2) Introduce xbps_fetch_unset_cache_connection() to drop the caches.
2010-11-03 12:23:57 +01:00
Juan RP
9c60862e0f
Pass LDFLAGS after the objects when creating the sharedlib, otherwise
...
-Wl,--as-needed will think that zlib is not needed.
2010-11-02 07:40:14 +01:00
Juan RP
8d998948ef
xbps-bin.8: fixed two formatting errors.
2010-10-31 01:59:48 +02:00
Juan RP
e2e5e0478f
Added tag 0.6.2 for changeset fe0d022c4236
2010-10-31 00:50:32 +02:00
Juan RP
1f9c57183d
Changelog: update.
2010-10-31 00:50:16 +02:00
Juan RP
0672cb1dec
NEWS: XBPS 0.6.2 will be released in a few minutes.
2010-10-31 00:49:56 +02:00
Juan RP
8051232e82
libxbps: xbps_repository_unregister(): in remote repositories, also
...
remove the pkg index file and its directory.
2010-10-29 09:10:41 +02:00
Juan RP
49a356df81
xbps_get_pkg_index_plist: fix a memleak.
2010-10-29 08:21:56 +02:00
Juan RP
a0e8fac8cb
Add a Changelog file with all repo changes.
2010-10-27 16:37:25 +02:00
Juan RP
210f2799fc
xbps-bin(8): modify the 'list' target to accept an optional argument to
...
list packages in the specified state, so that you can list packages that
need to be purged, configured and broken (will be used in the future).
2010-10-27 13:10:03 +02:00
Juan RP
ef7da88db1
xbps-bin(8): added a new target "find-files".
...
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.
2010-10-27 00:25:02 +02:00
Juan RP
992583311b
configure: don't use -fPIE and --param ssp-buffer-size if CC != gcc.
2010-10-27 00:19:02 +02:00
Juan RP
c49bd80e20
fetch/ftp.c: fix a cast that caught clang via -Wcast-qual.
2010-10-27 00:17:08 +02:00