Added basic support to update a single package via "xbps-bin update foo".

--HG--
extra : convert_revision : 7214ab270ccb57a327afeed94f6a2efc4738442d
This commit is contained in:
Juan RP 2009-04-02 02:46:36 +02:00
parent 7db36bf9e0
commit 54b6d87809
7 changed files with 174 additions and 65 deletions

View file

@ -130,8 +130,14 @@ main(int argc, char **argv)
if (argc != 4)
usage();
rv = xbps_register_pkg(NULL, argv[1], argv[2],
argv[3], automatic);
dict = prop_dictionary_create();
if (dict == NULL)
exit(EXIT_FAILURE);
prop_dictionary_set_cstring_nocopy(dict, "pkgname", argv[1]);
prop_dictionary_set_cstring_nocopy(dict, "version", argv[2]);
prop_dictionary_set_cstring_nocopy(dict, "short_desc", argv[3]);
rv = xbps_register_pkg(dict, false, automatic);
if (rv == EEXIST) {
printf("%s=> %s-%s already registered.\n",
in_chroot ? "[chroot] " : "", argv[1], argv[2]);