Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Expose xbps_cb_message in libxbps
  • Loading branch information
Chocimier committed Sep 16, 2023
commit b874f2cdbf6e7aacd69568b898653238bbf45d5a
10 changes: 10 additions & 0 deletions include/xbps.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,16 @@ int xbps_array_foreach_cb_multi(struct xbps_handle *xhp,
int (*fn)(struct xbps_handle *, xbps_object_t obj, const char *, void *arg, bool *done),
void *arg);

/**
* Prints package message.
*
* @param[in] xhp Pointer to the xbps_handle struct.
* @param[in] pkgd Package dictionary as stored in the transaction dictionary.
* @param[in] key Key of possibly existing message in \a pkgd: "install-msg" or "remove-msg".
* @return 0 for message printed, ENOENT otherwise
*/
int xbps_cb_message(struct xbps_handle *xhp, xbps_dictionary_t pkgd, const char *key);

/**
* Match a virtual package name or pattern by looking at proplib array
* of strings.
Expand Down
1 change: 0 additions & 1 deletion include/xbps_api_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ bool HIDDEN xbps_remove_pkg_from_array_by_pattern(xbps_array_t, const char *);
bool HIDDEN xbps_remove_pkg_from_array_by_pkgver(xbps_array_t, const char *);
void HIDDEN xbps_fetch_set_cache_connection(int, int);
void HIDDEN xbps_fetch_unset_cache_connection(void);
int HIDDEN xbps_cb_message(struct xbps_handle *, xbps_dictionary_t, const char *);
int HIDDEN xbps_entry_is_a_conf_file(xbps_dictionary_t, const char *);
int HIDDEN xbps_entry_install_conf_file(struct xbps_handle *, xbps_dictionary_t,
xbps_dictionary_t, struct archive_entry *, const char *,
Expand Down
2 changes: 1 addition & 1 deletion lib/package_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "xbps_api_impl.h"

int HIDDEN
int
xbps_cb_message(struct xbps_handle *xhp, xbps_dictionary_t pkgd, const char *key)
{
xbps_data_t msg;
Expand Down