Commit Graph

22 Commits

Author SHA1 Message Date
Juan RP
120180f89d xbps-pkgdb: use a common func to remove a pkgdict from a plist file.
--HG--
extra : convert_revision : 1d86cdca194aea6fb5ebaff0ac60c205788c63de
2008-12-21 08:43:57 +01:00
Juan RP
017b192a85 xbps-pkgdb: remove unneeded stuff from unregister_pkg().
--HG--
extra : convert_revision : 2482d7b37d913657fc274b4546e0ac995ed2fda4
2008-12-21 06:15:56 +01:00
Juan RP
716d9b9e7c xbps-{bin,pkgdb}: use strcasecmp() to parse argv.
--HG--
extra : convert_revision : deb4624c3f6d031925f3fcea0461d68d37703f89
2008-12-21 03:45:39 +01:00
Juan RP
9b3481a3b6 xbps-pkgdb: play safe with strncpy().
--HG--
extra : convert_revision : 3562b4d657e4c10fdf734d149eec0bd6f36793f8
2008-12-21 02:11:41 +01:00
Juan RP
5722c8aca1 Replace some if conditionals with asserts where appropiate.
--HG--
extra : convert_revision : 991989e77b31d84f9aab2e27a5366c18a78407ae
2008-12-21 01:50:19 +01:00
Juan RP
074f4dddeb xbps-pkgdb: fix the register target.
--HG--
extra : convert_revision : 4259cf00cd001d386a841200242d94cc18604c93
2008-12-20 08:13:18 +01:00
Juan RP
c3c632e387 xbps-bin: implement full support for the 'show' target.
This will try to show the package information by looking in
all repositories registered. The first one that has the package
info wins.

--HG--
extra : convert_revision : 33b93fd115a765d696af76ca20c1669ef277cd35
2008-12-20 05:49:41 +01:00
Juan RP
6698f3a1ff Make xbps_callback_array_in_dict() return a bool.
The func cb accepted also returns a bool now.

--HG--
extra : convert_revision : 1adf9a54e111f5d7f3dd78a829c3cf680d15f769
2008-12-20 04:53:56 +01:00
Juan RP
256b562770 Make xbps_add_array_to_dict accept any object, not just arrays.
Thus it's now named xbps_add_obj_to_dict().

--HG--
extra : convert_revision : 81a53b615cd7578a2c99f40f9b8550e2ee7fa426
2008-12-20 03:55:09 +01:00
Juan RP
00e90663af Use a common key for all arrays of pkgdicts.
--HG--
extra : convert_revision : cab30e527b438afb266f4e6084af7c51357efd17
2008-12-20 03:45:35 +01:00
Juan RP
e992ee5c83 Introduce xbps_callback_array_iter_in_dict().
--HG--
extra : convert_revision : e0696de04df785d99ae1748a2d972a74e04c774f
2008-12-20 00:55:48 +01:00
Juan RP
48b2f033da A bit of reorganization in C/shell code.
With these changes:
 - Added 'sanitize-plist' action to xbps-pkgdb. It takes a plist
   file as argument and writes another one "sanitized" by proplib.
   Use it to sanitize the pkgindex plist file.
 - Split xbps-pkgdb functions to be shared by other files.
 - Split xbps-digest functions to be shared by other files.
 - Rename the plist file to register/unregister installed pkgs to
   regpkgdb.plist, and related stuff in shell scripts.

--HG--
extra : convert_revision : 37731b04c6b41aebac629dfa06106175b9b5e59c
2008-12-19 04:18:49 +01:00
Juan RP
e817d470ab Added a new conf option: XBPS_PACKAGESDIR.
This is to specify where to store the binary packages.

--HG--
extra : convert_revision : 16d810d058b78662a33d8492caf7981e0700808e
2008-12-13 07:04:53 +01:00
Juan RP
8373117030 Another checkpoint in progress for binpkgs.
--HG--
extra : convert_revision : 38f4a4106a2d61757e1feacaec5eaef01f812d59
2008-12-12 18:12:45 +01:00
Juan RP
cf2015f692 xbps-pkgdb: add function to internalize plist file.
--HG--
extra : convert_revision : 0a303377d6c17b80eb9ff36b0309247a624c3e3e
2008-10-30 08:47:00 +01:00
Juan RP
35df6d0c6e Rewrite xbps-pkgdb to use an array of dictionaries per pkg.
That way we can make it extensible in future changes.
Now it looks like this:

<key>packages_installed</key>
<array>
	<dict>
		<key>pkgname</key>
		<string>dash</string>
		<key>short_desc</key>
		<string>POSIX-compliant Unix shell ...</string>
		<key>version</key>
		<string>0.5.4</string>
	</dict>
	...
</array>

xbps list should be faster than before if a lot of packages
are installed.

--HG--
extra : convert_revision : 816e3e73a4fc72fd8e61f3825757d92ad9d5b511
2008-10-30 06:40:11 +01:00
Juan RP
c467d31a66 Simplify check_installed_pkg to avoid calling xbps-pkgdb unnecessarily.
--HG--
extra : convert_revision : 6e0f6f96a65b346e2e2e3c3253e5469d5eed8ede
2008-10-29 22:05:29 +01:00
Juan RP
de6947e0c9 Misc tweaks to messages in xbps-pkgdb.
--HG--
extra : convert_revision : 33bac6965b2efc2d212a95d15114661bd8170255
2008-10-29 20:20:22 +01:00
Juan RP
2cb592e66e Remove bash specific features to not depend on it.
--HG--
extra : convert_revision : 0ff8eac00a603d8aae549a8bfa568bb710e4b0bf
2008-10-29 18:33:55 +01:00
Juan RP
5a0aac4fd2 Added some ANSI colors for messages, may be disabled.
With the -e flag those colors will be disabled. As bonus also
I removed blank lines in .xbps-filelist and other misc tweaks, fixes
I cannot remember now.

--HG--
extra : convert_revision : 5e481d0faa14518363eafc622633d645c335ed78
2008-10-29 03:20:14 +01:00
Juan RP
4179308606 Missed xbps-pkgdb.c in previous commit.
--HG--
extra : convert_revision : 5c064f4c4fb4352d0f50180a295b0b2f28f3a463
2008-10-28 08:01:05 +01:00
pancake
af3fe4c94c * Move xbps-* into utils/ directory
- Simplify Makefile rules

--HG--
extra : convert_revision : f24c98fa56d724772e7c5e9a21cf700e4085d6e2
2008-10-27 18:01:15 +01:00