Re: Obeying not-for-us in the database
* Andreas Barth (aba@ayous.org) [140416 00:22]:
> * Philipp Kern (pkern@debian.org) [140415 23:53]:
> > wanna-build does not currently obey not-for-us in the database when
> > there's actually a version available and overwrites it with installed.
> > This means that for stable suites there is no way to prevent building
> > for a package that's about to enter the suite with a few builds missing
> > (e.g. from security). Could that be fixed?
>
> This would be
> diff --git a/bin/wanna-build b/bin/wanna-build
> index 8380753..af09e4d 100755
> --- a/bin/wanna-build
> +++ b/bin/wanna-build
> @@ -2329,7 +2329,7 @@ sub parse_all_v3 {
> 'arch-not-in-arch-list' => 'Auto-Not-For-Us', 'packages-arch-specific' => 'Auto-Not-For-Us', 'overwritten-by-arch-all' => 'Auto-Not-For-Us', 'arch-all-only' => 'Auto-Not-For-Us',
> }->{$pkgs->{'status'}};
> next if isin( $pkg->{'state'}, qw<Not-For-Us>) && isin( $tstate, qw<Auto-Not-For-Us>);
> - # if the package is currently current, the status is Installed, not not-for-us
> + next if isin( $pkg->{'state'}, qw<Installed>) && isin( $tstate, qw<Not-For-Us>);
> if ($pkg->{'state'} ne $tstate) {
> change_state( \$pkg, $tstate);
> if (isin( $tstate, qw<Installed>)) {
should however be
--- a/bin/wanna-build
+++ b/bin/wanna-build
@@ -2328,8 +2328,7 @@ sub parse_all_v3 {
my $tstate = {'installed' => 'Installed', 'related' => 'Installed',
'arch-not-in-arch-list' => 'Auto-Not-For-Us', 'packages-arch-specific' => 'Auto-Not-For-Us', 'overwritten-by-arch-all' => 'Auto-Not-For-Us', 'arch-all-only' => 'Auto-Not-For-Us',
}->{$pkgs->{'status'}};
- next if isin( $pkg->{'state'}, qw<Not-For-Us>) && isin( $tstate, qw<Auto-Not-For-Us>);
- # if the package is currently current, the status is Installed, not not-for-us
+ next if isin( $pkg->{'state'}, qw<Not-For-Us>) && isin( $tstate, qw<Auto-Not-For-Us Installed>);
if ($pkg->{'state'} ne $tstate) {
change_state( \$pkg, $tstate);
if (isin( $tstate, qw<Installed>)) {
(do not change from n-f-u to any of auto-n-f-u nor installed)
I'll wait another few hours before committing.
Andi
Reply to: