Re: index warning and bash-completion

2018-03-11 Thread db
On 11 Mar 2018, at 04:01, Ryan Schmidt  wrote:
> On Mar 10, 2018, at 17:47, db wrote:
>> Btw, how can I change the two-week period for the warning. I couldn't find 
>> an option in macports.conf, either to change the period or to suppress it 
>> altogether.
> I don't think we offer any options to configure that. We want users to stay 
> up to date; we don't want to field bug reports about problems we've already 
> fixed.

I think I read about such an option a couple of years ago, but couldn't find 
anything now. Anyway, if there's actually none I suppose I could change it 
myself and have other means to remind me about when I want to resync.

https://github.com/macports/macports-base/blob/1e9e6f19670b22a47b3cc2bb9a9da985986b6203/src/macports1.0/macports.tcl#L1235

Re: index warning and bash-completion

2018-03-10 Thread db
On 10 Mar 2018, at 23:15, Clemens Lang  wrote:
>  
> https://github.com/macports/macports-ports/blob/master/sysutils/bash-completion/files/port
> so if you have time you could try modifying it to drop stderr into nirvana 
> and submit a pull request for that.

Ok, I'll have to take a closer look, as it doesn't show for certain actions 
like info.

Btw, how can I change the two-week period for the warning. I couldn't find an 
option in macports.conf, either to change the period or to suppress it 
altogether.

Re: index warning and bash-completion

2018-03-10 Thread Clemens Lang
On Sat, Mar 10, 2018 at 09:24:27PM +0100, db wrote:
> On 10 Mar 2018, at 20:05, Ryan Schmidt  wrote:
> > Are your port definitions in fact more than two weeks old?
> 
> Yes, but I'd expect the warning after I actually ran the command.

Unfortunately that happens because the bash completion executes 'port
-q', which only hides info messages, but still displays warnings. The
source code for this is at
  
https://github.com/macports/macports-ports/blob/master/sysutils/bash-completion/files/port
so if you have time you could try modifying it to drop stderr into
nirvana and submit a pull request for that.

-- 
Clemens


Re: index warning and bash-completion

2018-03-10 Thread Ryan Schmidt

On Mar 10, 2018, at 14:24, db wrote:

> On 10 Mar 2018, at 20:05, Ryan Schmidt wrote:
>> Are your port definitions in fact more than two weeks old?
> 
> Yes, but I'd expect the warning after I actually ran the command.

When you press tab, the bash completion code runs. Looking at the contents of 
/opt/local/share/bash-completion/completions/port, I see that in order to 
provide the completions to you, it will be running various port commands. For 
example, if you are typing "port contents bash-compl" and then pressing tab, 
expecting it to autocomplete the name of an installed port, it has to run "port 
installed" or something to find the list of installed ports.

I don't know if MacPorts has a flag to suppress the warning. If so, 
/opt/local/share/bash-completion/completions/port should use it. If not, we 
should add one.



Re: index warning and bash-completion

2018-03-10 Thread db
On 10 Mar 2018, at 20:05, Ryan Schmidt  wrote:
> Are your port definitions in fact more than two weeks old?

Yes, but I'd expect the warning after I actually ran the command.


Re: index warning and bash-completion

2018-03-10 Thread Ryan Schmidt
On Mar 10, 2018, at 12:18, db wrote:
> 
> bash-completion for port outputs stderr on pressing tab, right before it 
> completes a word, on certain actions like contents.
> 
> $ port contents bash-complWarning: port definitions are more than two weeks 
> old, consider updating them by running 'port selfupdate'.
> etion
> 
> Can anyone reproduce it?

Are your port definitions in fact more than two weeks old?


index warning and bash-completion

2018-03-10 Thread db
bash-completion for port outputs stderr on pressing tab, right before it 
completes a word, on certain actions like contents.

$ port contents bash-complWarning: port definitions are more than two weeks 
old, consider updating them by running 'port selfupdate'.
etion

Can anyone reproduce it?