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
This commit is contained in:
parent
09cede6d8a
commit
0d04547576
10 changed files with 389 additions and 195 deletions
|
@ -68,7 +68,7 @@
|
|||
#endif
|
||||
|
||||
/* From lib/configure.c */
|
||||
int xbps_configure_pkg(const char *, const char *);
|
||||
int xbps_configure_pkg(const char *);
|
||||
|
||||
/* from lib/cmpver.c */
|
||||
int xbps_cmpver(const char *, const char *);
|
||||
|
@ -103,19 +103,12 @@ int xbps_prepare_repolist_data(void);
|
|||
void xbps_release_repolist_data(void);
|
||||
prop_dictionary_t xbps_get_pkg_props(void);
|
||||
|
||||
/* From lib/register.c */
|
||||
int xbps_register_pkg(prop_dictionary_t, bool);
|
||||
|
||||
/* From lib/requiredby.c */
|
||||
int xbps_requiredby_pkg_add(prop_array_t, prop_dictionary_t);
|
||||
int xbps_requiredby_pkg_remove(const char *);
|
||||
|
||||
/* From lib/unpack.c */
|
||||
int xbps_unpack_binary_pkg(prop_dictionary_t, bool);
|
||||
|
||||
/* From lib/depends.c */
|
||||
int xbps_find_deps_in_pkg(prop_dictionary_t, prop_dictionary_t);
|
||||
|
||||
/* From lib/orphans.c */
|
||||
prop_array_t xbps_find_orphan_packages(void);
|
||||
|
||||
/* From lib/plist.c */
|
||||
bool xbps_add_obj_to_dict(prop_dictionary_t, prop_object_t,
|
||||
const char *);
|
||||
|
@ -151,14 +144,24 @@ int xbps_remove_pkg_from_dict(prop_dictionary_t, const char *,
|
|||
const char *);
|
||||
int xbps_remove_string_from_array(prop_array_t, const char *);
|
||||
|
||||
/* From lib/purge.c */
|
||||
int xbps_purge_pkg(const char *);
|
||||
|
||||
/* From lib/register.c */
|
||||
int xbps_register_pkg(prop_dictionary_t, bool);
|
||||
int xbps_unregister_pkg(const char *);
|
||||
|
||||
/* From lib/remove.c */
|
||||
int xbps_remove_pkg(const char *, const char *, bool);
|
||||
int xbps_unregister_pkg(const char *);
|
||||
|
||||
/* From lib/repository.c */
|
||||
int xbps_register_repository(const char *);
|
||||
int xbps_unregister_repository(const char *);
|
||||
|
||||
/* From lib/requiredby.c */
|
||||
int xbps_requiredby_pkg_add(prop_array_t, prop_dictionary_t);
|
||||
int xbps_requiredby_pkg_remove(const char *);
|
||||
|
||||
/* From lib/sortdeps.c */
|
||||
int xbps_sort_pkg_deps(prop_dictionary_t);
|
||||
|
||||
|
@ -175,6 +178,9 @@ int xbps_get_pkg_state_dictionary(prop_dictionary_t, pkg_state_t *);
|
|||
int xbps_set_pkg_state_installed(const char *, pkg_state_t);
|
||||
int xbps_set_pkg_state_dictionary(prop_dictionary_t, pkg_state_t);
|
||||
|
||||
/* From lib/unpack.c */
|
||||
int xbps_unpack_binary_pkg(prop_dictionary_t, bool);
|
||||
|
||||
/* From lib/util.c */
|
||||
char * xbps_xasprintf(const char *, ...);
|
||||
char * xbps_get_file_hash(const char *);
|
||||
|
@ -194,7 +200,4 @@ int xbps_get_flags(void);
|
|||
bool xbps_yesno(const char *, ...);
|
||||
bool xbps_noyes(const char *, ...);
|
||||
|
||||
/* From lib/orphans.c */
|
||||
prop_array_t xbps_find_orphan_packages(void);
|
||||
|
||||
#endif /* !_XBPS_API_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue