Commit Graph

141 Commits

Author SHA1 Message Date
Juan RP
af3a2788aa Provide stubs for htobe{32,64}() and be32toh() macros if they aren't defined on Linux.
Tested and verified by Jimmy on xbps@googlegroups.com.
2010-05-04 14:36:32 +02:00
Juan RP
af6949cc43 Apply the commit from portableproplib's git master:
commit b2975842aba26df9b9885ff56b2ff182eda06152
Author: Juan RP <xtraeme@gmail.com>
Date:   Thu Apr 29 18:23:15 2010 +0200

    Remove some dead code found by the LLVM's clang static analyzer.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100429162412-gq0on6wybpoaazgg
2010-04-29 18:24:12 +02:00
Juan RP
28f997bdf7 libxbps: fixed all warnings found by clang.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100428213056-p1b7bh0llq8393r0
2010-04-28 23:30:56 +02:00
Juan RP
b77bebe03a xbps_repository_register(): if repository already exists return EEXIST.
Bump XBPS_RELVER to 20100427.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100427160125-3vid17cb7fy4v3gd
2010-04-27 18:01:25 +02:00
Juan RP
9efe430e7c portableproplib can now be built with -Wextra and -Werror, but still needs
-Wno-cast-qual and -Wno-unused-parameter.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100421090458-gh2f2soq8jz25c3x
2010-04-21 11:04:58 +02:00
Juan RP
4bef22e190 Add change from portableproplib's git master to fix a warning with -Wextra:
commit 1296cfff2dd84a09f973bd446a75d5b92001506d
Author: Juan RP <xtraeme@gmail.com>
Date:   Wed Apr 21 05:47:34 2010 +0200

    prop_object: add cast for -Wextra.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100421034857-oxkoa87srg5olsrx
2010-04-21 05:48:57 +02:00
Juan RP
ea0d37a104 Incorporate a commit from portableproplib's git master to fix two warnings:
commit 72e03f757660ed295f81315d871e51abe22df9dd
Author: Juan RP <xtraeme@gmail.com>
Date:   Wed Apr 21 05:07:53 2010 +0200

    Add a cast that fixes a warning in the new zlib code.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100421030905-ixl5tj2to573xnxz
2010-04-21 05:09:05 +02:00
Juan RP
19af2f4af4 xbps_read_dict_from_archive_entry: added support to uncompress plist files in archives.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100421030437-6ihj6lw9vcwy2csp
2010-04-21 05:04:37 +02:00
Juan RP
6256b34ccc Some changes that will appear in 0.5.0:
* Add proplib-0.4.1 source and use it in XBPS. This is to avoid
   an external dependency, so that we depend on the features of the
   internal library. This also means that proplib is not required anymore.

 * Added support to read/write gzip compressed plists by default, thanks
   to proplib-0.4 that gained new functionality.

That means that from now, XBPS will be able to write compressed gzip
plist files for all metadata related work. This will vastly reduce
bandwidth required for fetching remote repo's pkg index file and
binary packages.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100420122238-zcb85rudt9p34e10
2010-04-20 14:22:38 +02:00
Juan RP
fa9d8c718a lib/register.c: add some DPRINTFs.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100313083102-cz4hwmd94uuh5awv
2010-03-13 09:31:02 +01:00
Juan RP
2daffcc768 Avoid endless loop while sorting dependencies due to missing packages.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100129034440-c1c9q0o5b0r1hhh2
2010-01-29 04:44:40 +01:00
Juan RP
df5b800366 Improve previous and only overwrite files while upgrading packages in the
unpack phase.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100128152108-vfs98fe3wvtort4s
2010-01-28 16:21:08 +01:00
Juan RP
61dde1ac02 Always overwrite files while unpacking, this makes the "essential" obj obsolete.
This helps to catch upgrade problems and simplifies some parts of the code.
Bumped XBPS_RELVER because xbps_remove_pkg() has been changed.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100128150850-gcs93su38t6moydn
2010-01-28 16:08:50 +01:00
Juan RP
920db08f5c lib/remove.c: bump copyright year for previous change.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125072838-shechb5lff4y3zyk
2010-01-25 08:28:38 +01:00
Juan RP
1c4d43306a xbps-bin(8): if -f is set, remove files and configuration files even
if its hash doesn't match for the remove and purge targets respectively.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125070948-841kw2r4knz2793e
2010-01-25 08:09:48 +01:00
Juan RP
17d87b3559 Repair upgrades of preserve packages, i.e kernel.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125052754-6xri8lfmykhof5dz
2010-01-25 06:27:54 +01:00
Juan RP
0ebff2c636 lib/plist.c: fix an assertion.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125011444-xzvixcod832ione4
2010-01-25 02:14:44 +01:00
Juan RP
088baa7699 Add defs for default fetch cache connection limits and use them in
xbps_fetch_cache_connection() if 0 is passed as argument.

xbps-bin: enable fetch cached connection when downloading binpkgs.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124153156-4updprik11nwi7c1
2010-01-24 16:31:56 +01:00
Juan RP
801785cbab Add xbps_fetch_set_cache_connection() to set libfetch's cache connection limits.
Use it in xbps_fetch_file(), by default set with 8 and 16.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124144829-hqsr2bl6uflf0nhu
2010-01-24 15:48:29 +01:00
Juan RP
03e8fa53d9 Merge libfetch-2.30 from NetBSD's pkgsrc.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124144753-ni487x8m7r05847b
2010-01-24 15:47:53 +01:00
Juan RP
a0b5e9e83a Rework Makefiles one more time.
- use printf to print commands rather than echo, which it may not have
  support for escape sequences (-e).
- Remove DESTDIR from SBINDIR, MANDIR, LIBDIR and INCLUDEDIR so that
  you can override it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124125958-8mscedj5ntf288jd
2010-01-24 13:59:58 +01:00
Juan RP
49134b3e62 xbps_find_orphan_packages: improve doxygen documentation.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100123052934-bq05edsd09x3pgds
2010-01-23 06:29:34 +01:00
Juan RP
97266fa921 lib/unpack.c: improve doxygen description.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100123051605-ojcxt8uz91hg1h4k
2010-01-23 06:16:05 +01:00
Juan RP
823fe6d67c Don't export xbps_get_remote_repo_string() to the API, it's only
used internally in the library.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100123051334-8ndutg9gqfljff3p
2010-01-23 06:13:34 +01:00
Juan RP
31f821669f Add infrastructure changes to build the API documentation.
doxygen and graphviz are required. It's disabled by default, use
the BUILD_API_DOCS make(1) argument to enable it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100123013719-pkk3a3823cx09v8l
2010-01-23 02:37:19 +01:00
Juan RP
dac80a3fa2 libxbps: improve doxygen documentation, still not finished.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100122225955-8jd0006rtgjnvl13
2010-01-22 23:59:55 +01:00
Juan RP
4b0c08ebcf xbps_unpack_binary_pkg: multiple fixes and improvements.
- Don't write any archive entry to disk unless the package metadata
  plist files are found.
- Always check for the package metadata plist files in the first 4
  entries, if they aren't found stop the unpacking... invalid archive.
- Don't check for removing INSTALL/REMOVE scripts on each iteration when
  extracting, just check it once before the loop.
- Add doxygen comments and related stuff.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100122225639-wameh8ls94bkm68h
2010-01-22 23:56:39 +01:00
Juan RP
65f241a081 xbps_repository_get_pkg_plist_dict_from_url: stop processing the archive
once that 4 entries are checked for the plist file.

Processing 6 entries is too much, we can be sure that plist file will
always be in the first 4 entries.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100122225433-u440x01bf8io3vd3
2010-01-22 23:54:33 +01:00
Juan RP
c0b280c118 Mega-commit to document the API with doxygen.
Some changes were made to the API when making the documentation:

- A few exported functions are now hidden, because they were only used
  internally in the library.
- A few exported symbols were renamed to document them better than
  previously.
- Cosmetic changes all along the way, as well as some fixes here and there.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100121021019-onbsivlrhdb7t3ou
2010-01-21 03:10:19 +01:00
Juan RP
61d2ea8896 Rework Makefile files, fully parallel builds are now possible.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100118201826-q2zsyooicxi7lcfm
2010-01-18 21:18:26 +01:00
Juan RP
e11a1fe651 xbps_unpack_binary_pkg: fixed some bugs while upgrading essential pkgs.
* A package failed to be upgraded properly if current pkg contained
  INSTALL/REMOVE scripts, while the new one didn't have any of them.
  Fixed this by always removing current scripts if they exist.

* Essential pkgs are never removed (they are replaced) so the pre remove
  action target was never called, now it all works properly.

Bumped XBPS_RELVER because I consider these bugs so important.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100118184932-pdsb0djvf0swylm3
2010-01-18 19:49:32 +01:00
Juan RP
952e265b8f xbps_repository_pool_init: fix memleaks in error paths, found by cppcheck.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100117232650-qkg4zh4blx2mhy3d
2010-01-18 00:26:50 +01:00
Juan RP
a165d20193 Error and warning messages should go to stderr, make it so.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100115141916-tpg2rga1i4pm42kj
2010-01-15 15:19:16 +01:00
Juan RP
d2a093a401 xbps_repository_install_pkg: don't forget to release repository pool stuff.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114175814-0bin80brsh13swbj
2010-01-14 18:58:14 +01:00
Juan RP
d8a025a56a xbps_repository_install_pkg: before adding pkg into the transaction,
check that it wasn't added before.

This change fixes and endless loop while doing the following:

$ xbps-bin install libXext libX11

where libX11 is a dependency of libXext and was already queued.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114125713-o9vxzayz1tnhlt96
2010-01-14 13:57:13 +01:00
Juan RP
023841b060 Implemented blueprint 'install-pkg-by-pkgmatch' as specified in
https://blueprints.launchpad.net/xbps/+spec/install-pkg-by-pkgmatch

The implementation works as expected, it was easier that I thought.
Bump XBPS_RELVER because the API was changed slightly.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114011431-xv5q6bgahm6v9dbq
2010-01-14 02:14:31 +01:00
Juan RP
15be7b43a4 xbps_pkgmatch: before checking pattern with csh_match(), try to see if
a full match with strcmp() is enough.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114000042-ge4iajc9jownixhe
2010-01-14 01:00:42 +01:00
Juan RP
05bad9c0d5 xbps_remove_pkg: fix a memleak, thanks valgrind.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100113171003-aiome0xxe5l1f96a
2010-01-13 18:10:03 +01:00
Juan RP
3d3c92dcbc Install shlib with 755 perms to match what the world does.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100113155721-c8fb2cg7jfu30mp8
2010-01-13 16:57:21 +01:00
Juan RP
e404632f7e Sync fetch code with libfetch-2.27.
joerg@netbsd libfetch-2.27:
The connection sharing didn't handle the case of active transfers
correctly and tried to close the connection in that case (PR 42607).
Correctly check if there is a transfer going on and just leave the
connection alone in that case.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100111192421-5fddbsek3ayi9wm8
2010-01-11 20:24:21 +01:00
Juan RP
ec907d0646 Restructure the Makefiles, INET6 and SSL support in libfetch is now
mandatory, build executables as PIE objects.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100106101556-tqzwk80xpp0iz20t
2010-01-06 11:15:56 +01:00
Juan RP
d55391e2e9 Cleaned up the Makefiles, improve README about what's required.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091228151958-ehx17nupq3uckhhg
2009-12-28 16:19:58 +01:00
Juan RP
4be79d4535 xbps_register_pkg: if automatic-install obj is there, don't overwrite its value.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091224003242-9twye4isotebbips
2009-12-24 01:32:42 +01:00
Juan RP
7eea0f8e8e xbps-bin(8): implemented Launchpad blueprint "arbitrary-pkgname-args".
See https://blueprints.launchpad.net/xbps/+spec/arbitrary-pkgname-args.

The install, update and remove targets now accept a list of package
names that will be processed.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091222113736-0dawl4whvtdi5dj3
2009-12-22 12:37:36 +01:00
Juan RP
009c2131fc xbps_yesno/noyes: change the funcs to only accept "yes" or "no"
(case insensitive) answers rather than the short ones.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091222112759-0mnzjt3qcwp45ugn
2009-12-22 12:27:59 +01:00
Juan RP
6e863cbf45 lib/fetch/Makefile: ignore fstack-protector warnings.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091218122139-g4ljwb50cvnr8alj
2009-12-18 13:21:39 +01:00
Juan RP
f89e128a81 repository_sync_index.c: add missing sys/stat.h.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091218122054-bm5uchhrmubnfb0m
2009-12-18 13:20:54 +01:00
Juan RP
279219a348 xbps_unpack_binary_pkg: set INSTALL/REMOVE perms to 0750.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091211095846-kwszryu1wlho39eq
2009-12-11 10:58:46 +01:00
Juan RP
6c2a648510 repository_plist.c: fix lp bug #494905 "xbps build failure on x86_64".
fetchIO_read returns ssize_t not int, applied patch from submitter.
Thanks.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091210081328-cxkzuxjapaven6a3
2009-12-10 09:13:28 +01:00
Juan RP
eb885bbcc2 When executing the INSTALL/REMOVE scripts, always pass the UPDATE
value to them.

Bump XBPS_RELVER to 20091209.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091209151435-1yy9f7k2880tswz7
2009-12-09 16:14:35 +01:00