Make some xbps_warn_printf dependent of XBPS_FLAG_VERBOSE.
This commit is contained in:
parent
5c7eaf2f92
commit
da607becf9
@ -151,8 +151,9 @@ xbps_remove_pkg_files(prop_dictionary_t dict, const char *key)
|
|||||||
* Remove the object if possible.
|
* Remove the object if possible.
|
||||||
*/
|
*/
|
||||||
if (remove(path) == -1) {
|
if (remove(path) == -1) {
|
||||||
xbps_warn_printf("can't remove %s `%s': %s\n",
|
if (flags & XBPS_FLAG_VERBOSE)
|
||||||
curobj, file, strerror(errno));
|
xbps_warn_printf("can't remove %s `%s': %s\n",
|
||||||
|
curobj, file, strerror(errno));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Success */
|
/* Success */
|
||||||
|
@ -169,7 +169,7 @@ unpack_archive(prop_dictionary_t pkg_repod,
|
|||||||
size_t nmetadata = 0, entry_idx = 0;
|
size_t nmetadata = 0, entry_idx = 0;
|
||||||
const char *rootdir, *entry_pname, *transact;
|
const char *rootdir, *entry_pname, *transact;
|
||||||
char *buf;
|
char *buf;
|
||||||
int rv, flags;
|
int rv, flags, xflags;
|
||||||
bool preserve, update, replace_files_in_pkg_update;
|
bool preserve, update, replace_files_in_pkg_update;
|
||||||
|
|
||||||
assert(ar != NULL);
|
assert(ar != NULL);
|
||||||
@ -179,6 +179,7 @@ unpack_archive(prop_dictionary_t pkg_repod,
|
|||||||
|
|
||||||
preserve = update = false;
|
preserve = update = false;
|
||||||
rootdir = xbps_get_rootdir();
|
rootdir = xbps_get_rootdir();
|
||||||
|
xflags = xbps_get_flags();
|
||||||
|
|
||||||
if (chdir(rootdir) == -1) {
|
if (chdir(rootdir) == -1) {
|
||||||
xbps_error_printf("cannot chdir to rootdir for "
|
xbps_error_printf("cannot chdir to rootdir for "
|
||||||
@ -415,8 +416,10 @@ unpack_archive(prop_dictionary_t pkg_repod,
|
|||||||
pkgname, version, strerror(rv));
|
pkgname, version, strerror(rv));
|
||||||
goto out;
|
goto out;
|
||||||
} else {
|
} else {
|
||||||
xbps_warn_printf("ignoring existing "
|
if (xflags & XBPS_FLAG_VERBOSE)
|
||||||
"entry: %s\n", entry_pname);
|
xbps_warn_printf("ignoring existing "
|
||||||
|
"entry: %s\n", entry_pname);
|
||||||
|
|
||||||
RUN_PROGRESS_CB();
|
RUN_PROGRESS_CB();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user