On Fri, Dec 05, 2008 at 02:00:07PM +0200, Eddy Petrișor wrote: > That sounds sane, but it seems you forgot to attach the patch (the second > time) > and since the current one is outdated, makes sense for me to wait :-) .
Seems I need some holidays... :) And *now* the patch *will be* attached! > > ,---- > > | print STDERR "$cmd\n" if(!$SDCommon::opt_quiet); > > | return 1 if ($SDCommon::opt_ignoreerrors); > > | return (!system(@_)); > > `---- > > That is the whole point, there are some prompts that aren't critical for > successful building the > package in an automated environment (e.g.: things like being unable to > automatically upgrade a > package when no upstream release was done - i.e. the version is the same in > upstream as in our repo) > but still are an abnormal situation. There are several such cases where an > abnormal situation should > just be ignored for automated builders or similar automated tools. It's not about prompts here but about commands being executed. E.g.: You have a command withecho('svn', 'co', 'whatever'); and $opt_noninteractive set. All args of withecho would get passed to withechoNoPrompt which would do the rest. If you then have $opt_ignoreerrors set it would just return 1 but it would never do the 'system(@_)' and so never execute the command. Concludes: withechoNoPrompt with noninteractive and ignoreerrors would not ignore if a command fails but ignore the command at all, wouldn't it? Sorry for bothering if I'm talking nonsense but that's what these lines look like to me... :-/ > In a better implementation, we would rather have prompts with a default > answer preselected in case > of failure so, depending on the thing that failed, svn-bp would ignore by > default or quit by default. I agree! Hauke
Index: SDCommon.pm =================================================================== --- SDCommon.pm (revision 11938) +++ SDCommon.pm (working copy) @@ -575,20 +575,20 @@ %tmp=(); $statusref=\%tmp; $ctx->status("", "BASE", \&collect_name, 1, 1, 0, 1); + my $ignorewarn = 0; for(keys %tmp) { if($tmp{$_} == 2) { $ctx->add($_, 1); - } elsif($tmp{$_} == 11) { # subversion ignores some files, like .swp from vim; see #504233 for details - print STDERR "One or more files are ignore due to global subversion ignore patterns,\n\tquit the process here? [y/n?]: "; - prompt: - my $ans = <STDIN>; - if($ans !~ /^[yn]/i) { - print STDERR "The choices are:\n\tYes (y) which means aborting, or No (n) which means to NOT include those files.\n"; - goto prompt; - } - if($ans =~ /^y$/i) { - exwerror("Aborting.\n"); - } + } elsif($tmp{$_} == 11) { + if $ignorewarn == 0 { + print STDERR <<EOLWARN +Note: One or more files are being ignored due to global subversion +ignore patterns! You should consider changing your svn config. +svn-buildpackage tries to add those files now, though. +EOLWARN + } + $ignorewarn = 1; + $ctx->add($_, 1); } } chdir $curdir;
signature.asc
Description: Digital signature