Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
rquery/search: Be quiet when updating as the output is being used in scripts
Bryan Drewery committed 13 years ago
commit 86cbfb477558578f83844022e9ad86da7d868b4e
parent 49c2e93
2 files changed +8 -0
modified pkg/rquery.c
@@ -95,6 +95,7 @@ exec_rquery(int argc, char **argv)
	const char *reponame = NULL;
	bool auto_update;
	bool onematched = false;
+
	bool old_quiet;

	pkg_config_bool(PKG_CONFIG_REPO_AUTOUPDATE, &auto_update);

@@ -168,8 +169,11 @@ exec_rquery(int argc, char **argv)
		return (EX_IOERR);

	/* first update the remote repositories if needed */
+
	old_quiet = quiet;
+
	quiet = true;
	if (auto_update && (ret = pkgcli_update(false)) != EPKG_OK)
		return (ret);
+
	quiet = old_quiet;

	ret = pkgdb_open(&db, PKGDB_REMOTE);
	if (ret != EPKG_OK)
modified pkg/search.c
@@ -248,6 +248,7 @@ exec_search(int argc, char **argv)
	struct pkg *pkg = NULL;
	bool atleastone = false;
	bool auto_update;
+
	bool old_quiet;

	pkg_config_bool(PKG_CONFIG_REPO_AUTOUPDATE, &auto_update);

@@ -366,8 +367,11 @@ exec_search(int argc, char **argv)
		return (EX_IOERR);

	/* first update the remote repositories if needed */
+
	old_quiet = quiet;
+
	quiet = true;
	if (auto_update && (ret = pkgcli_update(false)) != EPKG_OK)
		return (ret);
+
	quiet = old_quiet;

	if (pkgdb_open(&db, PKGDB_REMOTE) != EPKG_OK)
		return (EX_IOERR);