Bug 26471 - urpmi does not handle nodejs requires dependency logic
Summary: urpmi does not handle nodejs requires dependency logic
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-12 00:13 CEST by Joseph Wang
Modified: 2020-05-01 02:30 CEST (History)
2 users (show)

See Also:
Source RPM: perl-URPM-5.25-1.mga8.src.rpm
CVE:
Status comment:


Attachments
patch to file nodejs depends (2.77 KB, patch)
2020-04-12 00:15 CEST, Joseph Wang
Details | Diff
output of perl test suite (639 bytes, application/x-perl)
2020-04-12 00:16 CEST, Joseph Wang
Details

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


Note You need to log in before you can comment on or make changes to this bug.