Skip to content

Commit d0ca862

Browse files
committed
lib: initial hooks implementation
1 parent c476c80 commit d0ca862

File tree

6 files changed

+802
-1
lines changed

6 files changed

+802
-1
lines changed

include/xbps_api_impl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,10 @@ struct xbps_repo HIDDEN *xbps_regget_repo(struct xbps_handle *,
128128
const char *);
129129
int HIDDEN xbps_conf_init(struct xbps_handle *);
130130

131+
struct xbps_hooks;
132+
struct xbps_hooks *xbps_hooks_init(struct xbps_handle *xhp);
133+
int xbps_hooks_pre_transaction(struct xbps_handle *xhp);
134+
int xbps_hooks_post_transaction(struct xbps_handle *xhp);
135+
void xbps_hooks_free(struct xbps_hooks *hooks);
136+
131137
#endif /* !_XBPS_API_IMPL_H_ */

lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ OBJS += plist_remove.o plist_fetch.o util.o util_path.o util_hash.o
5858
OBJS += repo.o repo_sync.o
5959
OBJS += rpool.o cb_util.o proplib_wrapper.o
6060
OBJS += package_alternatives.o
61-
OBJS += conf.o log.o
61+
OBJS += conf.o log.o hooks.o
6262
OBJS += $(EXTOBJS) $(COMPAT_OBJS)
6363
# unnecessary unless pkgdb format changes
6464
# OBJS += pkgdb_conversion.o

0 commit comments

Comments
 (0)