[pacman-dev] Add --nolist option for transactions

Dmitry Kudriavtsev me at dk0.us
Mon Jul 9 08:47:09 UTC 2018


On Sat, Jul 07, 2018 at 05:17:32PM +1000, Allan McRae wrote:
> On 07/07/18 10:32, me at dk0.us wrote:
> > From: Dmitry Kudriavtsev <me at dk0.us>
> > 
> > Adds a --nolist option for package transactions. This option removes the list
> > display of packages to be installed or removed.
> > 
> > Signed-off-by: Dmitry Kudriavtsev <me at dk0.us>
> > ---
> 
> I don't think this is a good option to include.

Why not?

> 
> > diff --git a/src/pacman/remove.c b/src/pacman/remove.c
> > index a2269ed8..5df45c69 100644
> > --- a/src/pacman/remove.c
> > +++ b/src/pacman/remove.c
> > @@ -164,8 +164,11 @@ int pacman_remove(alpm_list_t *targets)
> >  	}
> >  
> >  	/* print targets and ask user confirmation */
> > -	display_targets();
> > -	printf("\n");
> > +	if(!config->nolist) {
> > +		display_targets();
> > +		printf("\n");
> > +	}
> > +
> 
> Here pacman would print nothing then ask if it is OK to remove those
> packages.

Should --nolist imply --noconfirm?

> 
> >  	if(yesno(_("Do you want to remove these packages?")) == 0) {
> 
> 
> 
> >  		retval = 1;
> >  		goto cleanup;
> > diff --git a/src/pacman/sync.c b/src/pacman/sync.c
> > index 3c6be89d..1e0c6c91 100644
> > --- a/src/pacman/sync.c
> > +++ b/src/pacman/sync.c
> > @@ -793,8 +793,10 @@ int sync_prepare_execute(void)
> >  		goto cleanup;
> >  	}
> >  
> > -	display_targets();
> > -	printf("\n");
> > +	if(!config->nolist) {
> > +		display_targets();
> > +		printf("\n");
> > +	}
> >  
> >  	int confirm;
> >  	if(config->op_s_downloadonly) {
> > 


More information about the pacman-dev mailing list