Commit Graph

49 Commits

Author SHA1 Message Date
Juan RP
391f02ce10 Added some missing changes for previous.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126023256-oyfwnekdeu2h9zi8
2009-11-26 03:32:56 +01:00
Juan RP
5223b6d652 xbps-bin(8), xbps-repo(8): improve descr for some targets.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126022901-34bq1qnrdzeakmnc
2009-11-26 03:29:01 +01:00
Juan RP
87a216fd11 Major changes in libxbps to implement caching in some cases.
libxbps:
 - Moved repolist code to lib/repository_pool.c.
 - Renamed xbps_{prepare,release}_repolist_data() to
   xbps_repository_pool_{init,release} respectively.
 - Moved regpkgdb dict code to lib/regpkgs_dictionary.c.
 - Renamed xbps_{prepare,release}_regpkgdb_dict() to
   xbps_regpkgs_dictionary_{init,release} respectively.
 - Use a global reference count for repository_pool and regpkgs_dictionary,
   this gives a substantial performance gain while looking for dependencies
   in repository pool, among other things.
 - Make xbps_find_pkg_* functions return errno and use it to detect
   for spurious errors in code using them.
 - Add code to detect when a dependency is already unpacked.

xbps-bin:
 - Do not set pkg state to unpacked in the transaction, it's set already
   while a package is unpacked.
 - While installing or updating packages, it now knows when a dependency
   is already unpacked and shows it as "unconfigured".

Bump XBPS_RELVER to 20091126.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126022250-uu8x0fa86l4scb5x
2009-11-26 02:22:50 +00:00
Juan RP
3117c8b4ee xbps-repo(8): added 'show-files' target.
It will search for 'pkgname' and will print its list of files, by
searching it in repository pool. The first repo wins.

Bump XBPS_RELVER to 20091125.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091125021556-n8p6atfbkuvb4doi
2009-11-25 02:15:56 +00:00
Juan RP
3a65c45de3 Refactored shared code between xbps-bin(8) and xbps-repo(8).
- xbps-repo: move protos to defs.h and remove index.h and util.h.
- xbps-bin: move code that belongs to it from xbps-repo to show-info-files.c.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124110539-nsdjp0ajr7nn8pa3
2009-11-24 11:05:39 +00:00
Juan RP
164c661bcf xbps-repo: added 'show-deps' target to mimic xbps-bin(8).
As consequence of this, remove xbps_callback_array_iter_in_repolist().
Nowadays to iter over the repository pool we have a SIMPLEQ, this
allowed to simplify the code and remove some now unneeed stuff.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124104704-oyvrmb3tmd59w4e7
2009-11-24 10:47:04 +00:00
Juan RP
c676622869 Some changes to know if a file was downloaded successfully or not.
Improved xbps-repo sync/add and xbps-fetch to print informative
messages when a transfer was not necessary because local/remote size
and/or mtime matched.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124050326-owez7140fdxwepuk
2009-11-24 05:03:26 +00:00
Juan RP
fe468b2e90 xbps-bin: fix one more for previous commit.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124003052-u6rkvnblvb83hrkv
2009-11-24 00:30:52 +00:00
Juan RP
01cbe9a63b xbps-bin: fix download local dir when fetching binpkgs from remote repos.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091123235632-vbpn1br170fv73l3
2009-11-23 23:56:32 +00:00
Juan RP
bf82b6512d Extensively verified that all functions have its return value
checked for any spurious error, this should make the core more safer :-)

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091123094651-5prw0bkqmt3y8h23
2009-11-23 09:46:51 +00:00
Juan RP
13706cf0a5 xbps-repo: changed the 'sync' target to update from all registered
remote repositories, so remove its argument.

xbps_sync_repository_pkg_index:
 - create the local repo dir in XBPS_META_PATH.
 - also add the uri scheme (http://, https://, ftp://) in the created
   local directory and subst ':' also with an underscore.
 - do not create local repo directories unless the download pkg-index
   plist file is verified to be fetched correctly.

xbps_check_is_repo_string_remote:
  New function to check if a repo string is a remote repository, use
  it in all places where it was used before.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091123042316-rmu4w3ehoxwh3iz8
2009-11-23 04:23:16 +00:00
Juan RP
3d24672e58 Improve dependency matching via repos and use the "pkgver" object
in pkg dictionary to improve performance in some cases.

Bumped XBPS_RELVER to 20091121.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091122041547-oywx4db75j8uttl3
2009-11-22 05:15:47 +01:00
Juan RP
db9ae90dd4 Improve make output similar to what recent GNU configure scripts do.
Also always build the static bins so that it's done in one pass,
that means that objects are PIC and built with SSP.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091119050337-hkdksjqxy9n7vy7m
2009-11-19 06:03:37 +01:00
Juan RP
bc14a026a5 Improve download code, as well as fixing refetching when syncing to a
remote package index. Bump XBPS_RELVER to 20091118.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091118062814-3pqbs9n1797einhm
2009-11-18 07:28:14 +01:00
Juan RP
cc6417b9bf Fix a typo in xbps-bin/repo manpages.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091117164309-vwq47eaniu6udn9p
2009-11-17 17:43:09 +01:00
Juan RP
2b790a4c2f xbps-bin: rename 'show-manual' target to 'list-manual', it's a better
name IMHO :-)

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091109015919-fl3jr6eehyy1ff1v
2009-11-09 02:59:19 +01:00
Juan RP
adbd3d727c Added support for shell (and csh as well) patterns for required
dependencies, as specified in blueprint "improved-version-matching".

It's possible now to require greater, greater or equal than,
less, less or equal than, and equal pkg versions, as well as using
'{}' and '[^!]' csh patterns in dependencies.

Code lifted from FreeBSD, thanks! :-)

Change XBPS_RELVER to 20091107 to match latest additions.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091107035620-3051wcwrirqn2g14
2009-11-07 04:56:20 +01:00
Juan RP
dce1283e88 xbps-bin: improve 'check all' target output.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091101063206-s6kl51gqfugiapkl
2009-11-01 07:32:06 +01:00
Juan RP
3905c2106c Properly build shared/static libxbps and utils.
xbps-fetch: added -v flag to see verbose messages in libfetch.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030111726-axf9paz2k01ntqzz
2009-10-30 12:17:26 +01:00
Juan RP
e479879e9f xbps-bin: use exit(2) rather than _exit(2).
This was causing premature exiting when piping the program!

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030004257-l94g3e88qroulfym
2009-10-30 01:42:57 +01:00
Juan RP
db58e48822 Added xbps-bin(8) and xbps-repo(8) manpages in asciidoc format.
That means that asciidoc is required to build/install XBPS.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091028153222-ljgdfqqe1ea74xs7
2009-10-28 16:32:22 +01:00
Juan RP
3a2f421109 xbps-bin: added "show-manual" target.
This targets shows the list of packages that were installed manually,
i.e not as dependencies.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091028023913-i4qh7ky1puezyhrt
2009-10-28 03:39:13 +01:00
Juan RP
dc258f4e20 Use xbps_get_root() directly where appropiate.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027111547-tb38qz51ejakn3jc
2009-10-27 12:15:47 +01:00
Juan RP
7aebea684b Implemented support for working with remote repositories.
libfetch from NetBSD's pkgsrc has been imported into lib/fetch, but
the objects are embedded into libxbps. Only a public function to fetch
files has been implemented: xbps_fetch_file().

The library now is built with -fvisibility=hidden by default, and
exported symbols are the ones that use the SYMEXPORT macro.

The code works well enough, but will need many more cleanups.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027004600-0lq9aao67lisbzxv
2009-10-27 01:46:00 +01:00
Juan RP
b689725270 xbps-bin: use a single point to cleanup resources.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023120154-wj4937kmu6ryacpk
2009-10-23 14:01:54 +02:00
Juan RP
ca39d1667e xbps-bin: use a signal handler for SIGINT, SIGTERM and SIGQUIT to
free resources used by libxbps.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023092025-gav4w23f1oc7mgjy
2009-10-23 11:20:25 +02:00
Juan RP
1e792e62f8 xbps-bin: use HN_B and HN_DECIMAL when using humanize_number for a more
detailed output.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023064559-b91xhoveq6qcpfpp
2009-10-23 08:45:59 +02:00
Juan RP
96c501b5cc xbps-bin: while updating a package that needs a new dependent package
the automatic-install object wasn't set correctly, fix this.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091022123221-46rya21xjy1mp8nb
2009-10-22 14:32:21 +02:00
Juan RP
fdc561dfb2 xbps-{bin,repo,pkgdb}: added -V flag that prints the current XBPS
release version as defined in xbps_api.h.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018084204-1xzyptqkjm5dwfjc
2009-10-18 10:42:04 +02:00
Juan RP
ba1c8971a5 Fix "autoupdate" target when no new packages are available.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017041820-tj61sfbw5nz50ioh
2009-10-17 06:18:20 +02:00
Juan RP
3ddf276437 Fixed bug #453422: "xbps shouldn't depend on LZMA utils"
Do not link to libzmadec, rather to liblzma provided by xz.
Pointed by ojab in the bug, thanks!

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017030101-1cw1b11l923hy8cw
2009-10-17 05:01:01 +02:00
Juan RP
058b882037 Fix previous, so that only tries to replace packages if they
are installed! heh

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017025959-4k8ciftjglkbao91
2009-10-17 04:59:59 +02:00
Juan RP
cacb34147a Added support to replace packages with another one. Package metadata
uses an array of strings that lists the packages that should be
removed before new package can be installed.

In the build templates one can use: replaces="foo foo-blah foo-libs".

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091017022643-rdyrp9kvmx3m0p0h
2009-10-17 04:26:43 +02:00
Juan RP
f7689695d1 xbps-bin/install.c: use only a function for install/update/autoupdate.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016153732-gbcr30fahvveu2u9
2009-10-16 17:37:32 +02:00
Juan RP
cb1f10d415 xbps-bin: don't initialize repolist data unless we want to update.
xbps_find_new_pkg: always initialize repolist data.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016150435-wpjfd453hpwr5k89
2009-10-16 17:04:35 +02:00
Juan RP
651a4e6254 xbps-bin/xbps_install_pkg(): only sort pkg deps in update mode.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016135513-w4yc413l3i1pwdkm
2009-10-16 15:55:13 +02:00
Juan RP
e1f2a8b7bd xbps-bin: multiple fixes to update packages.
* Fix 'autoupdate' target to look for new packages in ALL repos, not
  just the first one that has the package.
* Fix 'update' target to work correctly.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016133157-asvkv5jb6i9q2ibe
2009-10-16 15:31:57 +02:00
Juan RP
865b06be5d Build xbps-{bin,cmpver,digest,pkgdb,repo} as static, and install them
as foo.static.

Updated README to note the new requirements for it. It will be used
to reduce the number of dependencies when building packages in
the chroot.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015222234-360i67zychjge3nh
2009-10-16 00:22:34 +02:00
Juan RP
3d8fb79e94 xbps-bin: add support to check integrity of all installed packages,
through "xbps-bin check all".

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091005224237-plr75i3wveirhu4p
2009-10-06 00:42:37 +02:00
Juan RP
06f70e182c xbps-bin: rename the 'files' target to 'show-files' for consistency.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091005220659-l3rdop78ju04mi9v
2009-10-06 00:06:59 +02:00
Juan RP
042084b306 xbps-bin: do not mark package as broken if the any task in the check
target failed, just print the info.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091005220111-m2xkbbeupq2v7ccn
2009-10-06 00:01:11 +02:00
Juan RP
f02dd4ccb4 xbps-bin/install.c: improve some printfs.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091005190430-z70qmlhx4ca93jk6
2009-10-05 21:04:30 +02:00
Juan RP
ca2dd0f873 While upgrading a package, print informative line about old package
being removed.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091002152314-hig1qoobs42rvx9z
2009-10-02 17:23:14 +02:00
Juan RP
e668ba5193 Fix #438201 "Upgrading essential pkgs results in duplicated reqby entries"
Always remove reqby entries while upgrading "essential" packages.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091001053542-amaw61ib23hy453n
2009-10-01 07:35:42 +02:00
Juan RP
10531d7d45 Fix xbps_configure_pkg() reporting old version when upgrading packages.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20090825040302-azurxpyalot07j81
2009-08-25 06:03:02 +02:00
Juan RP
59b1942617 Fix memleaks in xbps_show_pkg_deps() and xbps_show_pkg_reverse_deps().
--HG--
extra : convert_revision : xtraeme%40gmail.com-20090822052256-tnf5s1od4oluhygp
2009-08-22 07:22:56 +02:00
Juan RP
6d84cde6f1 xbps-bin: add two new targets 'show-deps' and 'show-revdeps" to print
dependencies and reverse dependencies of a package, respectively.

'xbps-bin show' no longer prints the deps anymore.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20090821231219-n26o21xcxor46nk1
2009-08-22 01:12:19 +02:00
Juan RP
ecfa25833f Improve marginally configuring/purging all packages by looking at its
state in the object dictionary rather than opening and externalizing
the dictionary of every package.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20090821093126-0xw980x0pqtq59q2
2009-08-21 11:31:26 +02:00
juan
3f3b6d00dd Initial import of xbps with code as August '09.
--HG--
extra : convert_revision : juan%40xbps-20090817170720-amxxac4a2e8bza1j
2009-08-17 19:07:20 +02:00