die "Unknown state to list: $list_state\n"
if !isin( $list_state, qw(needs-build building uploaded
built build-attempted failed installed dep-wait
- not-for-us all failed-removed
+ not-for-us auto-not-for-us all failed-removed
install-wait reupload-wait bd-uninstallable));} },
# options with args
dist =>
die "Bad state $pkg->{'state'} of package $pkg->{Package}\n"
if !isin( $pkg->{'state'},
qw(Needs-Build Building Built Build-Attempted Uploaded Installed Dep-Wait Dep-Wait-Removed
- Failed Failed-Removed Not-For-Us BD-Uninstallable
+ Failed Failed-Removed Not-For-Us BD-Uninstallable Auto-Not-For-Us
) );
}
foreach my $name (keys %$srcs) {
next if $name eq '_binary';
- # state = installed, out-of-date, uncompiled, not-for-us
+ # state = installed, out-of-date, uncompiled, not-for-us, auto-not-for-us
my $pkgs = $srcs->{$name};
my $pkg = $db->{$name};
next;
}
+ if ($pkgs->{'status'} eq 'auto-not-for-us') {
+ next if isin( $pkg->{'state'}, qw(Not-For-Us Failed Failed-Removed Dep-Wait Dep-Wait-Removed));
+ # if the package is currently current, the status is Installed, not not-for-us
+
+ change_state( \$pkg, "Auto-Not-For-Us" );
+ log_ta( $pkg, "--merge-v3: Auto-Not-For-Us" ) unless $simulate;
+ update_source_info($pkg) unless $simulate;
+ print "$logstr set to auto-not-for-us\n" if $verbose || $simulate;
+ next SRCS;
+ }
+
# only uncompiled / out-of-date are left, so check if anything new
if (!(isin($pkgs->{'status'}, qw (uncompiled out-of-date)))) {
print "$logstr package in unknown state: $pkgs->{'status'}\n";
use strict;
use IO::Uncompress::AnyInflate qw(anyinflate);
use Dpkg::Version qw(vercmp);
+use Dpkg::Arch qw(debarch_is);
use Data::Dumper;
sub readsourcebins {
next unless $p->{'name'} and $p->{'version'};
next if $p->{'arch'} eq 'all';
- # TODO: respect the architecture - or not / we already respect it via P-a-s
+ foreach my $tarch (split(/\s+/, $p->{'arch'})) {
+ $p->{'for-us'} = 1 if debarch_is($arch, $tarch);
+ }
delete $p->{'arch'};
# ignore if package already exists with higher version
}
delete $srcs->{$k}->{'compiled'};
$srcs->{$k}->{'status'} = 'installed' if $srcs->{$k}->{'arch'} && $srcs->{$k}->{'arch'} eq 'all';
+
+ if (!$srcs->{$k}->{'for-us'} && $srcs->{$k}->{'status'} ne 'installed') {
+ $srcs->{$k}->{'status'} = 'auto-not-for-us';
+ }
+ delete $srcs->{$k}->{'for-us'};
#my $p = $pas->{$k};
#$p ||= $pas->{'%'.$k};
Build-Conflicts: dash
Architecture: all i386 amd64
+Package: autonfu
+Binary: autonfu
+Version: 1.41.11-1
+Priority: required
+Section: admin
+Architecture: amd64
+
+Package: autonfu1
+Binary: autonfu1
+Version: 1.41.11-1
+Priority: required
+Section: admin
+Architecture: linux-any
+
EOF
;
'section' => 'shell',
'binary' => ['nfu'],
},
+ 'autonfu' => {
+ 'priority' => 'required',
+ 'status' => 'auto-not-for-us',
+ 'version' => '1.41.11-1',
+ 'name' => 'autonfu',
+ 'section' => 'admin',
+ 'binary' => ['autonfu'],
+ },
+ 'autonfu1' => {
+ 'priority' => 'required',
+ 'status' => 'uncompiled',
+ 'version' => '1.41.11-1',
+ 'name' => 'autonfu1',
+ 'section' => 'admin',
+ 'binary' => ['autonfu1'],
+ },
'pbuilder' => {
'priority' => 'extra',
'status' => 'not-for-us',