[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Fix unable to set NMU when the package is not installed



Hi,

On 12/3/25 10:32 PM, Miao Wang wrote:
From 38952a04bffe6a0b169e8bb8a1470377c85de68d Mon Sep 17 00:00:00 2001
From: Miao Wang <shankerwangmiao@gmail.com>
Date: Thu, 4 Dec 2025 05:02:47 +0800
Subject: [PATCH] Fix unable to set NMU when the package is not installed

When a package is not installed, and the version of the package begins
with 0~, wanna-build refuses to set its binNMU via --binNMU --override
because the version number 0~ is older than empty. This patch fixes this
by first checking if the installed version number is empty.

Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
---
  bin/wanna-build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/wanna-build b/bin/wanna-build
index facb24e..9fb8e1d 100755
--- a/bin/wanna-build
+++ b/bin/wanna-build
@@ -958,7 +958,7 @@ sub set_one_binnmu {
         }
my $fullver = binNMU_version($version,$binNMUver);
-       if ( version_lesseq( $fullver, $pkg->{'installed_version'} ) )
+       if ( $pkg->{'installed_version'} && version_lesseq( $full_version'} ) )
         {
                 print "$name: binNMU $fullver is not newer than current version $pkg->{'installed_version'}\n";
                 return;

I don't think this patch works. Now the version comparison doesn't have two arguments anymore and there is a stray '}.

Kind regards
Philipp Kern


Reply to: