Juan RP
1b217d1906
transaction_ops: shortest static function name.
2012-11-15 09:25:59 +01:00
Juan RP
ce2f45a3df
unpack: don't extract pkg props.plist, we use pkg data from repo index.
2012-11-15 09:25:31 +01:00
Juan RP
5c0abc9754
libxbps: remove old code and return early if pkg has no rundeps.
2012-11-15 01:37:09 +01:00
Juan RP
ce3d4f1764
unpack: externalize pkg props dictionary from index.
2012-11-13 14:41:04 +01:00
Juan RP
4945755d53
unpack: don't assert if target file of a symlink doesn't exist, it may happen.
2012-11-12 17:10:02 +01:00
Juan RP
2703b55f99
xbps_dictionary_from_archive_entry: faster when plist is already uncompressed.
2012-11-11 16:57:23 +01:00
Juan RP
58333419a0
Shell wildcard patterns can now be used in the PackagesOnHold option.
2012-11-11 16:11:40 +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
f81d8ac1f0
xbps_pkgdb_update: if pkgdb cannot be internalized, create it to simplify code.
2012-11-11 10:03:14 +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
d6735d5685
xbps_xasprintf: do not return NULL anymore; remove checks for this.
2012-11-11 09:37:27 +01:00
Juan RP
0ab60b24c5
xbps_fetch_file: enable fetchRestartCalls.
2012-11-08 09:49:03 +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
4e15230c93
repository_sync_index: fix swapped args passed to XBPS_STATE_REPOSYNC.
2012-11-07 10:18:58 +01:00
Juan RP
45b872f75e
repository_sync_index: use arg[0-1] in XBPS_STATE_REPOSYNC.
2012-11-07 10:13:54 +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
310e619ea3
Remove unnecessary variable assignments reported by cppcheck.
2012-11-06 09:28:34 +01:00
Juan RP
03567ecb70
unpack: correctly take into account rootdir while checking symlinks.
2012-10-27 10:36:39 +02:00
Juan RP
978013bfbf
unpack: match correctly symlinks with absolute path.
2012-10-27 09:42:26 +02:00
Juan RP
264c704529
unpack: do not use realpath(3) on uninstalled symlinks.
2012-10-27 09:36:28 +02:00
Juan RP
c28f882d5c
unpack: misc improvements for previous.
2012-10-26 14:32:04 +02:00
Juan RP
c58ca952a8
unpack: convert printf added in previous to xbps_dbg_printf.
2012-10-26 14:22:18 +02:00
Juan RP
7fdae2d6dc
unpack: handle another case of relative symlink.
2012-10-26 14:17:31 +02:00
Juan RP
d31a3d205a
unpack: use lstat() for symlinks, respect uid/gid if euid == 0, some fixes.
2012-10-26 11:25:17 +02:00
Juan RP
e3d876ade0
pkgdb: some fixes for e545429fa1
.
2012-10-26 11:05:17 +02:00
Juan RP
4023c8115b
unpack: improvements to handle more cases of modified files.
...
- Do not unpack unmodified symlinks.
- Do not unpack files that only differ in mode, just chmod(2) new perms.
- Do not create pkg's metadata dir if this already exists.
2012-10-26 10:27:24 +02:00
Juan RP
e545429fa1
pkgdb: if plist from storage and memory do not differ do not flush to storage.
2012-10-26 10:25:14 +02:00
Juan RP
3e7f35bed1
xbps_configure_pkg: do not flush pkgdb if state hasn't been changed.
2012-10-26 10:24:26 +02:00
Juan RP
89dadb0f20
While checking conf files and there were no changes, do not unpack file from binpkg.
2012-10-26 10:23:12 +02:00
Juan RP
d99c505811
requiredby: skip adding same entry if already exists.
2012-10-26 09:44:07 +02:00
Juan RP
9e11ea950a
Do not inherit unneeded objs from trans dictionary onto pkg's pkgdb dictionary.
2012-10-25 09:29:56 +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
ebc0f27ae1
Do not add to the queue a pkgdep that has been already added via a vpkg.
...
The problem was after merging udev into systemd, udev is now a virtual pkg
and another dependency was requiring it and added systemd (real pkg) to
the list, but later in the sorting phase systemd was added again breaking
the dependency order.
2012-10-06 10:34:29 +02:00
Juan RP
c158acefac
Revert "transaction: keep last dep and remove dup matches while sorting deps."
...
This reverts commit b764f8e19a
.
2012-10-06 10:01:37 +02:00
Juan RP
b764f8e19a
transaction: keep last dep and remove dup matches while sorting deps.
...
This bug has been uncovered due to udev -> systemd merge.
2012-10-06 09:21:26 +02:00
Juan RP
d38dfdd19a
libxbps: unpack: before extracting re-set entry_pname.
2012-10-01 16:41:50 +02:00
Juan RP
bdeeaa46b8
libxbps: unpack: simplify file hash matching code.
2012-09-30 17:07:51 +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
5228b3fbf3
remove_obsoletes: deal with unexistent arrays in both dictionaries.
2012-09-30 08:57:57 +02:00
Juan RP
f7a4718de9
xbps_rpool_dictionary_metadata_plist: do not release dictionary without refcounts!
2012-09-30 08:10:49 +02:00
Juan RP
9c15f103e1
lib/package_unpack: simplify and externalize pkg's plists uncompressed.
2012-09-29 20:49:51 +02:00
Juan RP
092be04783
pkgdb: flush uncompressed pkgdb for performance reasons.
2012-09-29 20:28:39 +02:00
Juan RP
2f13afe7a6
lib/package_unpack.c: fixed build error caused by cherry-pick conflict.
2012-09-29 19:18:32 +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
15e43e550b
xbps_rpool_release: fix a memleak found by valgrind.
...
(cherry picked from commit 90e24f4b18fdde44958584cdc038ff8a88e919a0)
2012-09-29 19:10:28 +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
9e5c7de33b
xbps_dictionary_from_archive_entry: fixed internalizing uncompressed dictionaries.
...
(cherry picked from commit 2debc5c5ee6db1a197fe3afebaa9463934707b10)
2012-09-29 19:05:33 +02:00
Juan RP
0f17197627
libxbps: use a struct allocated from stack for the unpack cb.
...
(cherry picked from commit a658586f27fd0a0c2c78ea96f89b54055e1e73be)
2012-09-29 19:00:04 +02:00
Juan RP
01915e3030
xbps_transaction_update_packages: make packages on hold work (duh!).
...
(cherry picked from commit aa154199a6d7d89bfe040755be289b1d827c5727)
2012-09-29 18:58:21 +02:00
Juan RP
f7a5c55bc7
libxbps: xbps_pkg_arch_match: fix conditional tests.
2012-07-21 21:49:37 +02:00
Juan RP
a756060d38
libxbps: [unpack] fixed passing dangling pointer to unpack cb.
2012-07-21 10:41:19 +02:00
Juan RP
3339d0cd25
libfetch: fix warnings.
2012-07-19 18:00:31 +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
11ecf5438f
Import proplib-0.6.1.
2012-07-10 23:33:19 +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
e879c71a02
transaction_sortdeps: check if dep is installed by pattern.
2012-07-04 11:55:51 +02:00
Juan RP
dfb45f27ef
xbps_transaction_package_replace: misc cosmetic changes to dbg printfs.
2012-07-04 11:54:37 +02:00
Juan RP
abdf6e710d
xbps_remove_pkg: do not pass dangling pointers to state cb after removing pkgdict.
2012-07-04 09:52:51 +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
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
a3adbcda95
libxbps: use prop_array_get_cstring_nocopy().
2012-06-13 09:23:48 +02:00
Juan RP
412d4b7280
libxbps: switch to archive_read_{close,free}.
2012-06-12 22:22:46 +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
20bb1af589
xbps_remove_pkg: return proper error if metadata files cannot be removed.
2012-06-09 10:05:29 +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
a0f91f3342
xbps_file_hash_check_dictionary: fixed for rootdir != /.
2012-06-05 20:51:00 +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
84c6850c28
xbps_file_hash_dictionary: only process exact matches.
2012-06-05 20:22:47 +02:00
Juan RP
cc30039c60
xbps_unpack_binary_pkg: handle ARCHIVE_{EOF,FATAL,RETRY} and use archive_read_{close,free}.
2012-06-05 16:46:50 +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
e9945dc345
Before unpacking pkg files always remove INSTALL/REMOVE scripts (if they exist).
2012-06-04 14:14:46 +02:00
Juan RP
7265ea0e4e
trans: do not increase download_size if binpkgs are in local repos.
2012-06-04 10:09:46 +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
f9c72e1d06
xbps_transaction_install_pkg: properly fix previous commit.
2012-06-02 17:39:36 +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
40864bcdce
Improve xbps_transaction_update_pkg/packages and misc cosmetic changes.
2012-06-02 16:52:01 +02:00
Juan RP
c7e4630056
xbps_rpool_sync: ignore fetch errors, they will be reported by state_cb.
2012-06-01 16:04:47 +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
1bfb1ae028
libxbps: move xbps_pkgpattern_match to util.c and simplify.
2012-05-30 22:38:35 +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