On Fri, Aug 28, 2009 at 12:52 AM, Xavier <[email protected]> wrote:
> On Fri, Aug 28, 2009 at 12:31 AM, Laszlo Papp<[email protected]> wrote: > > Signed-off-by: Laszlo Papp <[email protected]> > > --- > > 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 > > > > > > > > I wonder if we could generalize this to my --print patch : > > http://code.toofishes.net/cgit/xavier/pacman.git/commit/?h=working&id=c225948b5ba70993277faa4dff4f312459af7965 > > it might make sense to make this possible for both --print and > --print-uris operation, but then the command line becomes difficult :( > > Hello Xavier! I didn't have so much time at the weekend, but as I saw maybe it would be better to choose a more talkative name for it, e.g. --print-package or something (it's just an example). What will happen if there will be new similar future in the future when the developers or users would like to implement a feature to print out another information, will you choose the name for --print2 or more reasonlable name ? In the second case It would be nice to start it now :) Mabe I'm wrong with it. Nevertheless It's a very good feature, thanks in fact :) Best Regards, Laszlo Papp
