[pacman-dev] [PATCH] '-Spp and -Supp' options were added to generate uri list without the downloaded package uris

Laszlo Papp djszapi2 at gmail.com
Thu Aug 27 18:31:33 EDT 2009


Signed-off-by: Laszlo Papp <djszapi2 at gmail.com>
---
 src/pacman/pacman.c |    2 +-
 src/pacman/sync.c   |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 25647b5..00b14f5 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -485,7 +485,7 @@ static int parseargs(int argc, char *argv[])
 			case 'o': config->op_q_owns = 1; break;
 			case 'p':
 				config->op_q_isfile = 1;
-				config->op_s_printuris = 1;
+				config->op_s_printuris++;
 				config->flags |= PM_TRANS_FLAG_NOCONFLICTS;
 				config->flags |= PM_TRANS_FLAG_NOLOCK;
 				break;
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index dc93621..b4e2eac 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -678,6 +678,9 @@ static int sync_trans(alpm_list_t *targets)
 			pmpkg_t *pkg = alpm_list_getdata(i);
 			pmdb_t *db = alpm_pkg_get_db(pkg);
 			const char *dburl = alpm_db_get_url(db);
+			if ((config->op_s_printuris >= 2) && !alpm_pkg_download_size(pkg)) {
+				continue;
+			}
 			if(dburl) {
 				printf("%s/%s\n", dburl, alpm_pkg_get_filename(pkg));
 			} else {
-- 
1.6.4.1



More information about the pacman-dev mailing list