Commit graph

43 commits

Author SHA1 Message Date
Juan RP
5ace634ade Remove unused headers.
--HG--
extra : convert_revision : f845161efa23a3c8c9f18f4febc7087347b0cff2
2009-08-12 07:48:03 +02:00
Juan RP
17404bdb42 Mega-commit with improvements and changes done in the past days.
- Introduce package states: unpacked, broken, installed, etc.
  Not yet finished, only unpacked and installed are used for now.

- Move package metadata files in binary packages directly to
  the top directory, this speeds up some ops and makes easier to
  continue working in future changes.

- xbps-bin: -C flag to check the hash of package files has been
  superseded by the 'check' target, which verifies the integrity
  of an installed package.

- Use the 'essential' object when upgrading packages, overwritting
  current files. This is needed for critical packages like sh, libc
  and others.

- Miscellaneous tweaks and improvements thorough the code.

--HG--
extra : convert_revision : 2073fcc123efc24b3e9327b5e22aa91752f20df6
2009-08-08 22:29:48 +02:00
Juan RP
d8353810b6 Reorganize pkg metadata files.plist scheme to improve future changes.
This fixes an item from the TODO about 'xbps-bin -C files' not checking
configuration files.

--HG--
extra : convert_revision : bb661554a6b34a25066749844709b8cbaf5a4d6c
2009-08-01 11:23:41 +02:00
Juan RP
e1e3e254ab Remove dup xbps_cmpver_* func, use just the real one.
--HG--
extra : convert_revision : cde78bdcccc68bb865d5bd76a84c00055f451e96
2009-06-07 05:02:58 +02:00
Juan RP
ed579c9c86 xbps-bin: when checking hashes, process only files.
--HG--
extra : convert_revision : 8228fd7e73209b481d87f5c50cc516989307b2e4
2009-05-07 15:19:20 +00:00
Juan RP
0bad2ab06a xbps-bin: when listing files, do not ignore links.
--HG--
extra : convert_revision : fb8661a02b4574baa9cff3826b54adae7bb71438
2009-05-07 15:16:48 +00:00
Juan RP
99290baf5e Redo previous and use archive_read_format_tar() rather than _all.
--HG--
extra : convert_revision : 3c80ec13642737551b7bf38c25ee5494593aed4d
2009-04-18 23:58:49 +02:00
Juan RP
fd8d47684a Revert "Only add support for bzip2/lzma compression and tar format in"
This reverts commit d8153785d25241d8e22ef664d484cf37a50c8ef2.

--HG--
extra : convert_revision : 62e08401d6a94e78d149ff5ce4ba455d087b39df
2009-04-18 23:55:38 +02:00
Juan RP
e4c31936b2 Only add support for bzip2/lzma compression and tar format in
libarchive.

--HG--
extra : convert_revision : d8153785d25241d8e22ef664d484cf37a50c8ef2
2009-04-18 17:25:04 +02:00
Juan RP
5ce7128616 xbps-repo: use HN_B|HN_DECIMAL in humanize_number.
--HG--
extra : convert_revision : 8d7d34a9d6f79d063e0069357a968c9d2fce6c6f
2009-04-16 16:08:59 +02:00
Juan RP
504e123044 Build code with -Wconversion.
--HG--
extra : convert_revision : ac2ea951cae1e739335e428e0fc4d0f90045b77d
2009-04-11 16:15:06 +02:00
Juan RP
bd3484fa6b Build code with -Wcast-qual, -Wcast-align and -Wsign-compare.
--HG--
extra : convert_revision : d489ad995bb69850cba5a352f3ac85b74a54b5cf
2009-04-11 15:52:32 +02:00
Juan RP
58c6a31297 Define ARCHIVE_READ_BLOCKSIZE and use it rather than using magic numbers.
--HG--
extra : convert_revision : b8e6755400eb6f2bef0ea1eb25a258f9ed1714c2
2009-04-09 18:38:05 +02:00
Juan RP
ecd5d55f17 xbps-repo: added shell style match patterns for the 'search' target.
So you can do you now:

$ xbps-repo search '*'

and it will list all registered packages.

--HG--
extra : convert_revision : d65edb4be6a0d815410d215774acf9ebeb23fa49
2009-04-09 13:14:30 +02:00
Juan RP
1a26816aa3 xbps-repo: use list_strings_sep_in_array() for 'list' target.
--HG--
extra : convert_revision : 0f06fdb6172b0ef8e55af44037166508c4c9996b
2009-04-09 12:59:46 +02:00
Juan RP
92d2087c7e xbps-{bin,repo}: print with correct indentation.
--HG--
extra : convert_revision : be65d8b98702e23eaeac6ff2adb2e726824b64f7
2009-04-09 12:24:15 +02:00
Juan RP
625a77883c Make xbps_remove_pkg_from_* return int rather than bool.
--HG--
extra : convert_revision : 9f413873669b552a4d7a6e25e667fe5ff43f6a78
2009-04-06 16:39:14 +02:00
Juan RP
4bf5c5f750 Introduce xbps_xasprintf() and use it where required.
--HG--
extra : convert_revision : 324a92a4824476059e0993d00c2b925c732a79f8
2009-04-04 19:32:39 +02:00
Juan RP
f5dd58df5d Simplify xbps_{un,}register_repository().
--HG--
extra : convert_revision : 95ac1ddedbc96fe3bf2a9dfe282c20385c8740ff
2009-04-04 18:05:18 +02:00
Juan RP
44926cd53c Performance improvements while installing deps of a binpkg.
--HG--
extra : convert_revision : 2ad3b29cfd22489f76739287176f40dd9535dfee
2009-04-04 05:24:58 +02:00
Juan RP
dfeb2f4143 Define XBPS_PKGINDEX_VERSION constant and use it.
--HG--
extra : convert_revision : e5c982e083d1a03b57feb71799619e7cbbae4239
2009-04-03 19:55:57 +02:00
Juan RP
7a81766b82 xbps-repo: performance fix for the genindex target.
--HG--
extra : convert_revision : 727664eccf8901a5bd39dedd28e3624076025075
2009-04-03 19:45:08 +02:00
Juan RP
b329b3be39 xbps-bin: fix "-C files" as mentioned in TODO.
--HG--
extra : convert_revision : 21dc44831330411f079044c47b5bc6f53c599126
2009-04-03 17:15:38 +02:00
Juan RP
1d718ef09a xbps-repo: new genindex implementation in C.
This version is 12x faster than current implementation in shell script.
To generate an index for 434 packages, current implementation took
5min and 56 seconds. New implementation only took 29 seconds!

New implementation also doesn't add duplicate packages, and updates
the package entry for new package versions.

--HG--
extra : convert_revision : 269d38ee18184b585877fd729bf95e07ce57dd50
2009-04-03 15:44:28 +02:00
Juan RP
80450fcc4c xbps-repo: cosmetic changes for the 'show' target.
--HG--
extra : convert_revision : a7bfd979f9f363fb0174599ecd21dd7045c9e266
2009-04-02 16:15:41 +02:00
Juan RP
a67374bd66 Simplify all code that used rootdir and flags passed via xbps-bin.
Add util funcs to get/set global values for them:
 * xbps_[gs]et_rootdir()
 * xbps_[gs]et_flags()

--HG--
extra : convert_revision : 2584b098e68a684e7b0eeac57c2b1df4aba6589d
2009-03-17 00:32:26 +01:00
Juan RP
aee08a7f8f Make the code build with another bunch of warning flags.
--HG--
extra : convert_revision : 1c5b66b58e4c66ff61e9cef2cb3760ac675c1626
2009-03-13 00:21:55 +01:00
Juan RP
05f918ea93 xbps-repo: in the show target also print the binpkg file size.
Now it looks like:

...
Filename: kernel-2.6.28.1.i686.xbps (size: 16M)
SHA256: 6b2d79ed89697263020979addde7fa2f535d53df0c1b011ea74ec7757cfba2f0
...

--HG--
extra : convert_revision : 3e18cbc35b8a85fffefe71dd64815ba23c06b528
2009-03-02 03:06:35 +01:00
Juan RP
be170f0cb7 Fix some problems with dangling links while removing a binpkg.
First remove all links, next files and last dirs.
Only check the SHA256 hash for files, skip links and dirs.

--HG--
extra : convert_revision : b1762d5e795959591c732f625d25adfd1840f592
2009-02-28 17:32:38 +01:00
Juan RP
4edad150c0 xbps-bin: make -C flag work when -r not set.
--HG--
extra : convert_revision : f4248255d94e9562483ef76630707eaefc3a9591
2009-02-27 18:30:59 +01:00
Juan RP
48a5933756 xbps-bin: added -C flag for 'files' target, to check SHA256 hash in files.
--HG--
extra : convert_revision : 28fffd3047de8d8a4b9401618017a880cbf03008
2009-02-27 17:00:41 +01:00
Juan RP
8d243e8dab xbps-bin: implement 'files' target, to show installed files for a pkg.
--HG--
extra : convert_revision : c522253a61c23e8439c6de343e713497a2a10033
2009-02-26 02:46:20 +01:00
Juan RP
cbb1d1bef5 xbps-repo: fix search and show targets when first repo doesn't exist.
--HG--
extra : convert_revision : 2e5410f4461c62ceb51bb1296cab8a9076bc666a
2009-02-18 03:50:05 +01:00
Juan RP
3b18195a6a Change code to compile with -Wall -Wextra.
--HG--
extra : convert_revision : 992e1515458c6ee36cd481d1ba0ff8febf892d12
2009-02-18 01:07:51 +01:00
Juan RP
e59520869b Use a common mk file for all bins, install bins stripped.
--HG--
extra : convert_revision : dd739bbc9c67b099ef690533e02bb3f40aa2dc8a
2009-02-16 18:03:03 +01:00
Juan RP
2b24128059 xbps-bin: added support for the show target.
--HG--
extra : convert_revision : 24b2d30a94c95b22b1c524203cf578da03314335
2009-02-16 16:24:33 +01:00
Juan RP
6b6162bb44 Added support for using noarch packages.
--HG--
extra : convert_revision : a96166ddecb6efe65d35283f25e06a944cc4a038
2009-02-16 00:39:41 +01:00
Juan RP
83ed100fcf Use xbps_callback_array_iter_in_repolist() and removed dup code.
--HG--
extra : convert_revision : 7eb9c1b3df3fc7fde2ff61ac0cce1d635c3fef18
2009-02-14 02:26:11 +01:00
Juan RP
3c7b8186e6 Fix binpkg installation with multiple repositories.
New changes include a modified algorithm of the previous one, which
finally does not fail even with multiple repos, YAY!

Fixed some leaks as well, thanks to valgrind.

--HG--
extra : convert_revision : 3cffe1e9e9e9f7abf225ca3c6643377fc12a94bd
2009-02-14 01:37:12 +01:00
Juan RP
d420d00081 xbps_unregister_repository: return ENOENT if not found, not ENODEV.
--HG--
extra : convert_revision : c1be34bc1840ac351e8e2d301e2c71d247f0ea9c
2009-02-13 00:18:28 +01:00
Juan RP
61f0b09698 New dependency/install/unpack WIP code.
This implementation will be faster and resolv the dependency chain
correctly taking into account indirect/direct deps and priority.

--HG--
extra : convert_revision : cc4ec186f06f944fa8825b176344c4d612658f85
2009-02-07 13:27:24 +01:00
Juan RP
dfb7e2a687 xbps-repo: there's no need to prefix local funcs with xbps_ anymore.
--HG--
extra : convert_revision : d8a2402697ca5709c5ca4e94d94ab4df6b97c818
2009-02-05 15:31:54 +01:00
Juan RP
7740958643 Split repo commands into the new xbps-repo bin.
- Remove lib/info.c that doesn't belong in the lib and add it into the
  bins.
- Every binary now uses its own directory on bin/.

This is in preparation for future changes for correct behaviour of
the library and binaries.

--HG--
extra : convert_revision : 880d16378bf940c4f5478de0362afe883cd5fd2c
2009-02-05 14:46:09 +01:00