Bug 26471

Summary: urpmi does not handle nodejs requires dependency logic
Product: Mageia Reporter: Joseph Wang <joequant>
Component: RPM PackagesAssignee: Mageia tools maintainers <mageiatools>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Normal CC: joequant, thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: perl-URPM-5.25-1.mga8.src.rpm CVE:
Status comment:
Attachments: patch to file nodejs depends
output of perl test suite

Description Joseph Wang 2020-04-12 00:13:30 CEST
Description of problem:

The current rpm packages for nodejs creates a logical requires of form

(npm(is-windows) >= 1.0.1 with npm(is-windows) < 2)

URPMI does not process complex requires and so the requires logic will not
follow nodejs dependences.  This causes most nodejs packages to fail to build
in the build infrastructure.


Version-Release number of selected component (if applicable):


How reproducible: consist


Steps to Reproduce:
1. urpmi nodejs-is-absolute
2. see large amount of unresolved dependencies
3.
Comment 1 Joseph Wang 2020-04-12 00:15:43 CEST
Created attachment 11582 [details]
patch to file nodejs depends

This is a patch that fixes the dependencies issues for nodejs packages

CC: (none) => joequant

Comment 2 Joseph Wang 2020-04-12 00:16:44 CEST
Created attachment 11583 [details]
output of perl test suite
Comment 3 Lewis Smith 2020-04-12 09:21:15 CEST
Thank you Joseph both for reporting this; and providing the fix!

Assigning to the urpmi/tools team, CC'ing Thierry for 'perl-URPM'.
Maybe it should be the other way round.

CC: (none) => thierry.vignaud
Assignee: bugsquad => mageiatools

Comment 4 Thierry Vignaud 2020-04-20 18:29:59 CEST
nodejs-packaging has already been patched a month ago in order to _not_ emit rich deps.

You only test perl-URPM testsuite, not the full urpmi one.

I'ven't seen any answers to my reports 4 months ago:

For example, it badly broke installing perl packages.
See https://ml.mageia.org/l/arc/dev/2020-01/msg00040.html

2nd example) test script was posted on dev ml:

$ perl with_deps_test.pl
$VAR1 = [
          'crate(libc)[== 0.2.36]',
          'crate(libc/default)[== 0.2.36]',
          'crate(libc/use_std)[== 0.2.36]',
          'rust-libc-devel[== 0.2.36-1.mga7]'
        ];
# Checking against 'crate(libc)[== 0.2.36]'
>> cheking for '(crate(libc) >= 0.2.20 with crate(libc) < 0.3.0)': 1
>> cheking for '(crate(libc) >= 0.1.20 with crate(libc) < 0.2.0)': 1
>> cheking for '(crate(libc) >= 0.3.20 with crate(libc) < 0.1.0)': 0

Only the first boolean dep should have been accepted.
The 2nd shouldn't have been

Severity: major => enhancement

Comment 5 Joseph Wang 2020-05-01 02:30:35 CEST
Yeah.  Fixing nodejs-packaging may be a better way than playing with urpmi.  Marking as fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED