Bug 32354 - The order of /usr/bin and /usr/sbin are sometimes swapped in PATH variable
Summary: The order of /usr/bin and /usr/sbin are sometimes swapped in PATH variable
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: IN_ERRATA9
: 32350 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-10-02 13:23 CEST by papoteur
Modified: 2023-11-03 14:25 CET (History)
3 users (show)

See Also:
Source RPM: urpmi, mgaonline
CVE:
Status comment:


Attachments

Description papoteur 2023-10-02 13:23:20 CEST
/usr/bin/urpmi.update is a wrapper script provided by urpmi.
/usr/sbin/urpmi.update is a symlink provided by mgaonline to /usr/libexec/urpmi.update
The latest doesn't work if launched as user.
The first opens a dialog or upgrade credential level through pkexec for the user.
According to which order /usr/bin and /usr/sbin are defined in PATH, launching urpmi.update behaves differently. This can leave the user not being able to be notified of updates.

What I suggest is to remove the link in /usr/sbin
Another option is to replace it with a link to /usr/bin/urpmi.update
Comment 1 Morgan Leijström 2023-10-02 18:50:00 CEST
Is it possible that PATH could be different between Mageia systems unless altered by user?

Could else cause Bug 32350 - No updates offered by mgaapplet

Assignee: bugsquad => mageiatools
CC: (none) => fri

Comment 2 Eric Petit 2023-10-02 19:10:54 CEST
no media update, no update

CC: (none) => surfzoid

Comment 3 papoteur 2023-10-02 21:42:40 CEST
(In reply to Morgan Leijström from comment #1)
> Is it possible that PATH could be different between Mageia systems unless
> altered by user?
The PATH can be altered in the user space, this is the case where the problem has been found. Perhaps by anaconda installation.
But in any case, the system should not be fragile to be not working because of not prohibited settings.
> 
> Could else cause Bug 32350 - No updates offered by mgaapplet
Yes, the effect of this problem is that the metadata files of urpmi are never updated, thus no updates are seen.
Comment 4 papoteur 2023-10-02 22:19:34 CEST
As third option, we can modify this line:
https://gitweb.mageia.org/software/mgaonline/tree/mgaapplet-update-checker#n55
if (!run_program::run('urpmi.update', $media, if_($root, "--urpmi-root=$root"))) {
to add the absolute path to the command.
Comment 5 Morgan Leijström 2023-10-09 20:05:41 CEST
It seems that if GNOME is installed, path gets modified so it does not work.
So also when running Plasma on same system, updates do not get announced.
Workaround is modifying the path.
See Bug 32350#c29

Keywords: (none) => FOR_ERRATA9

papoteur 2023-10-13 09:40:57 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=32382

Comment 6 papoteur 2023-10-13 09:52:53 CEST
I have opened another report for an update of magaonline.
I change this one to follow the problem of the PATH being wrongly set.

Summary: urpmi.update is provided in /usr/bin and /usr/sbin and doesn't behave the same according to how PATH is defined => /usr/bin and /usr/sbin are sometimes inverted in PATH variable
Keywords: FOR_ERRATA9 => IN_ERRATA9

papoteur 2023-10-13 09:54:39 CEST

CC: (none) => guillaume.royer

Morgan Leijström 2023-10-13 17:58:05 CEST

Summary: /usr/bin and /usr/sbin are sometimes inverted in PATH variable => The order of /usr/bin and /usr/sbin are sometimes swapped in PATH variable

Comment 7 Lewis Smith 2023-11-03 14:25:03 CET
*** Bug 32350 has been marked as a duplicate of this bug. ***

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