'extra-conflicts=s' => \$extra_conflicts,
# special actions
- 'export' => sub { _set_mode(@_); $export_to = $_[1]; },
- 'import' => sub { _set_mode(@_); $import_from = $_[1]; },
+ 'export=s' => sub { _set_mode(@_); $export_to = $_[1]; },
+ 'import=s' => sub { _set_mode(@_); $import_from = $_[1]; },
'manual-edit' => \&_set_mode,
'distribution-architectures' => \&_set_mode,
'distribution-aliases' => \&_set_mode,
sub calculate_prio {
my $priomap = $yamlmap->{priority};
my $pkg = shift;
- my @s=split("/", $pkg->{'section'});
+ my @s=split("/", $pkg->{'section'}//"");
$pkg->{'component'} = $s[0] if $s[1];
$pkg->{'component'} ||= 'main';
$pkg->{'calprio'} = 0;
undef $printformat if ($ownprintformat && $ownprintformat eq 'none');
foreach $pkg (sort sort_list_func @list) {
+ no warnings;
if ($printformat) {
print print_format($printformat, $pkg, {'cnt' => $cnt, 'scnt' => \%scnt})."\n";
++$cnt;
}
sub forget_packages {
+ no warnings;
my( $name, $pkg, $key, $data );
foreach $name (@_) {
}
$pkg->{'package'} = $name;
}
+ $pkg->{'version'} ||= "";
+ $pkg->{'state'} ||= "";
my $logstr = sprintf("merge-v3 %s %s_%s", $vars->{'time'}, $name, $pkgs->{'version'}).
($pkgs->{'binnmu'} ? ";b".$pkgs->{'binnmu'} : "").
sprintf(" (%s, %s, previous: %s", $vars->{'arch'}, $vars->{'suite'}, $pkg->{'version'}//"").
if (isin($pkgs->{'status'}, qw (installed related)) && $pkgs->{'version'} eq $pkg->{'version'} && ($pkgs->{'binnmu'}//0) < int($pkg->{'binary_nmu_version'}//0)) {
$pkgs->{'status'} = 'out-of-date';
}
- if (isin($pkgs->{'status'}, qw (installed related auto-not-for-us))) {
+ if (isin($pkgs->{'status'}, qw <installed related auto-not-for-us not-for-us>)) {
my $change = 0;
- my $tstate = {'installed' => 'Installed', 'related' => 'Installed', 'auto-not-for-us' => 'Auto-Not-For-Us'}->{$pkgs->{'status'}};
+ my $tstate = {'installed' => 'Installed', 'related' => 'Installed', 'auto-not-for-us' => 'Auto-Not-For-Us', 'not-for-us' => 'Auto-Not-For-Us'}->{$pkgs->{'status'}};
next if isin( $pkg->{'state'}, qw<Not-For-Us Failed Failed-Removed Dep-Wait Dep-Wait-Removed>) && isin( $tstate, qw<Auto-Not-For-Us>);
# if the package is currently current, the status is Installed, not not-for-us
if ($pkg->{'state'} ne $tstate) {
$change++;
}
}
- if (isin($pkgs->{'status'}, qw (related)) and $pkg->{'notes'} ne "related") {
- $pkg->{'notes'} = "related";
+ if (isin($pkgs->{'status'}, qw <related not-for-us>)) {
+ my $tnotes = {'related' => 'related', 'not-for-us' => 'packages-arch-specific'}->{$pkgs->{'status'}};
+ if ($pkg->{'notes'} && $pkg->{'notes'} ne $tnotes) {
+ $pkg->{'notes'} = $tnotes;
+ $change++;
+ }
+ }
+ if ($pkgs->{'notes'} && (($pkg->{'notes'}//"") ne $pkgs->{'notes'})) {
+ $pkg->{'notes'} = $pkgs->{'notes'};
$change++;
}
if ($change) {