[Pkg-javascript-devel] Bug#1110204: dh-nodejs: nodejs:BuiltUsing uses binary package names rather than source package names
    Julian Gilbey 
    jdg at debian.org
       
    Thu Jul 31 21:52:07 BST 2025
    
    
  
Package: dh-nodejs
Version: 0.15.23
Severity: normal
Tags: patch
The Built-Using dpkg field requires source package names, not binary
package names, whereas dh-nodejs currently emits binary package
names.
My Perl is quite rusty, but I think what would solve it is modifying
the builtUsing function in
/usr/share/perl5/Debian/PkgJs/PackageLock.pm
as follows; I can submit this as a MR on salsa if you would prefer:
sub builtUsing {
    [...]
                    spawn(
                        exec => [
                            'dpkg-query', '--showformat=${Version},${Source}',
                            '--show',     $pkg,
                        ],
                        wait_child      => 1,
                        to_string       => \$version_source,
                        error_to_string => \$err,
                    );
                    chomp $version_source;
                    my @vs = split /,/, $version_source;
                    # Source is empty if the binary package has the same name
                    $vs[1] ||= $pkg;
                    $res{$pkg} = \@vs;
                    debug("Add $vs[1] (= $vs[0]) in \${nodejs:BuiltUsing}");
    [...]
    return join( ',', map { "$res{$_}[1] (= $res{$_}[0])" } sort keys %res );
}
Best wishes,
   Julian
    
    
More information about the Pkg-javascript-devel
mailing list