Commit graph

128 commits

Author SHA1 Message Date
Juan RP
bba692013f xbps-bin: if configure phase fails, print the error string.
--HG--
extra : convert_revision : 5192feaff36631e3fbfa120e7301479e53eb731b
2009-08-14 09:39:46 +02:00
Juan RP
0d04547576 Add the concept of purging a package, such as with dpkg.
By default a package when is removed, its configuration files
and metadata files won't be removed unless the package is purged.

While here add two targets for xbps-bin:

 * purge [<pkgname>|<all>], passing the "all" string (case insensitive)
   will purge all packages that are in this state (XBPS_PKG_STATE_CONFIG_FILES).

 * reconfigure [<pkgname>|<all>], reconfigures a package or "all"
   if package hasn't been configured. Passing -f reconfigures it again
   even if it's state is ok.

--HG--
extra : convert_revision : bd2d3913ca087a0565b05fa9ee3f9b6d5e3cb934
2009-08-13 16:46:20 +02:00
Juan RP
09cede6d8a xbps-repo/index.c: add missing header.
--HG--
extra : convert_revision : daac81a5c27b79e9a6eebc5c57f5d0d034ef091b
2009-08-13 15:40:13 +02:00
Juan RP
5ace634ade Remove unused headers.
--HG--
extra : convert_revision : f845161efa23a3c8c9f18f4febc7087347b0cff2
2009-08-12 07:48:03 +02:00
Juan RP
8cc7f6871d Added xbps_find_new_packages(): checks if there are new versions.
--HG--
extra : convert_revision : dcd764c96c013f8d299849791110af4f9a4a9401
2009-08-12 07:15:09 +02:00
Juan RP
acdbc4bc1a xbps-bin: simplify even more previous commits.
--HG--
extra : convert_revision : 88633d61b4ec42812467fa071035d888927013c4
2009-08-11 19:23:48 +02:00
Juan RP
9f95d9dd8c xbps-bin: fix installation of new packages with autoupdate.
--HG--
extra : convert_revision : 3195174fd64a10bb4fad3fc888a3693796bfb212
2009-08-11 19:11:14 +02:00
Juan RP
45a58485eb xbps-bin: show which pkgs are updated and installed before proceeding.
--HG--
extra : convert_revision : 2c2fcd7f3c5909d14d1519ffc7e8ac0cad124b34
2009-08-11 18:53:24 +02:00
Juan RP
3e42bc6410 Flags are named XBPS_FLAG_XXX, add XBPS_FLAG_FORCE.
--HG--
extra : convert_revision : 4f7ad37910303a87788b2daac9b4ba11bf39becd
2009-08-11 14:01:28 +02:00
Juan RP
bd8e232a2d xbps-bin: get automatic-install value from installed pkg dict.
--HG--
extra : convert_revision : aa96b498ff3c2b2ce8eac15a6d99ec0306f23b02
2009-08-11 12:39:45 +02:00
Juan RP
d8bc610313 xbps-bin: don't overwrite "automatic-install" obj in autoupdate.
--HG--
extra : convert_revision : 3e3783b073d1daf3d38f68005ec6ec3aa8757841
2009-08-11 12:19:00 +02:00
Juan RP
ebd2c8b227 xbps-bin: silent output in check target if there are no errors.
--HG--
extra : convert_revision : 4b2d94a618a49dedb9b96163533db24cd5f67625
2009-08-09 16:21:38 +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
8a31007139 xbps-digest: use the SHA256_DIGEST_STRING_LENGTH constant.
--HG--
extra : convert_revision : 1da9eff8ef7aa5a214bde8036ebfb81df8d9d5f7
2009-07-29 23:13:04 +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
38e6679ff5 Implemented plist caching, that gives >30% performance.
--HG--
extra : convert_revision : 6302893f967be96f99a86d499ca62a8c005e56f7
2009-05-19 01:42:48 +02:00
Juan RP
9f108b4cd2 xbps-bin: implemented (WIP) "autoupdate" target.
Some parts in the library related to findings pkgs in repositories
has been improved vastly by caching the dictionary once.

Duplicated code has been added in xbps-bin/install.c, but will
be fixed soon.

--HG--
extra : convert_revision : 2924012a8589a2a6ecaa3863b5091049006c0ef3
2009-05-17 04:09:26 +02:00
Juan RP
993c2790a5 xbps-bin: while updating a package, install reqdeps properly.
--HG--
extra : convert_revision : 4bf0e7965a802a0f30e90d1ec1c0eb94bdbfe1d3
2009-05-08 17:26:06 +00:00
Juan RP
ad12aa9583 xbps-bin: while updating a package, process required deps first.
--HG--
extra : convert_revision : 661277f80f289d4b965df96d2b12c90378d2c8d3
2009-05-08 17:11:45 +00: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
f4cd426deb xbps-src: fix 'xbps-src build-pkg all' after latest changes.
--HG--
extra : convert_revision : d39b501cc701921d109dcc1c713a997bc8c100ee
2009-04-18 16:45:30 +02:00
Juan RP
1487d0128f xbps-pkgdb: added 'getpkgrevision' target.
--HG--
extra : convert_revision : 48de400ba82c93d5f11e822d2b29cee90fdfbf8f
2009-04-18 16:45:10 +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
f0f53cb07e xbps-bin: use -f to bypass questions while installing/removing.
--HG--
extra : convert_revision : edefc4dbf4dbbcdac53579100732e77004a45463
2009-04-09 18:42:07 +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
288f3519c3 xbps-bin: check binpkg hash after asking the question.
--HG--
extra : convert_revision : c858349b4c9e52b75b12612677c583841cdcc926
2009-04-09 16:16:57 +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
6ff28f6d79 xbps-bin: fix a leak in install.c.
--HG--
extra : convert_revision : b333ca851cf33efe1f63af1637192552ff8f7de4
2009-04-09 12:47:17 +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
679117e9a9 xbps-bin: move (auto)remove code into its own file, use xbps_noyes().
--HG--
extra : convert_revision : 20398840d20154d90c7457b7318c651c513c1f72
2009-04-09 11:56:40 +02:00
Juan RP
3698644967 xbps-bin: use xbps_noyes() in the install/update targets.
Now it looks like this:

$ xbps-bin -r ~/blah install initscripts
Finding/sorting required binary packages...
Checking binary package file(s) integrity...

The following new packages will be installed:

  xbps-base-files-0.8_1 gcc-libgcc-4.3.3 glibc-locales-2.9
  ncurses-base-5.7 glibc-2.9 ncurses-libs-5.7 gawk-3.1.6 grep-2.5.4
  coreutils-7.1 sed-4.1.5 ncurses-5.7 kbd-1.15 findutils-4.4.0_1
  net-tools-1.60 rcorder-2009.01 minilogd-2009.01 dhcpcd-4.0.12
  bash-4.0 procps-3.2.7 udev-140_2 initscripts-2009.03_2

Total download size: 16M
Total installed size: 48M

Do you want to continue? [y/N]
...

--HG--
extra : convert_revision : e32a136ee882160637c1930d998c0f5ae3a6b108
2009-04-09 04:54:09 +02:00
Juan RP
f80e1753a8 Remove knowledge from the library to install packages.
The library is only responsible now to find all binary packages
from repositories, sort them and create a dictionary with all
details. The frontend (xbps-bin) provides support for this,
and this allows for more flexibility and removes some stuff
that didn't belong in the library.

While here implemented support to show total download/installed
size for all packages that are going to be installed.

Next step will be to implement user interactivity before
installing/removing/updating packages.

--HG--
extra : convert_revision : 858e9a89bc6a60b348435f2416a8af3ebb6ea5c9
2009-04-09 02:29:15 +02:00
Juan RP
581e908793 xbps-src: fix 'build-pkg all' with pkgs with $revision set.
--HG--
extra : convert_revision : 866ef758ef96722676e575acebee1fe3be8a9df1
2009-04-07 20:13:55 +02:00
Juan RP
4b3adf1db3 xbps-pkgdb: check rval correctly for xbps_remove_pkg_from_file().
--HG--
extra : convert_revision : ae3f35ef7d01c84c5249554cbb08c5bbc63f17c8
2009-04-06 16:58:13 +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
2b1044dd8c xbps-bin: cosmetics changes for *remove targets.
--HG--
extra : convert_revision : c5659a2f268a40a0d909bbdbdbd6a725386d9863
2009-04-03 18:16:26 +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