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

Bug#1010356: apt: PATH messed up by apt eg starting with /usr/local/sbin in PATH



Package: apt
Version: 2.2.4
Severity: normal

Dear Maintainer,

   * What led up to the situation?
   My postinstall fails to find a called script in /usr/local/sbin

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
     
Test using dpkg directly - note PATH shown in DEBUG line:

root@TSB-168:/home/am43# dpkg -i itrackbox-bluetooth-3.2.1-20220429.112606.7359946.deb 
(Reading database ... 32911 files and directories currently installed.)
Preparing to unpack itrackbox-bluetooth-3.2.1-20220429.112606.7359946.deb ...
/var/lib/dpkg/info/itrackbox-bluetooth.prerm DEBUG /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Unpacking itrackbox-bluetooth (3.2.1-20220429.112606.7359946) over (3.2.1-20220429.112313.7c03e96) ...
Setting up itrackbox-bluetooth (3.2.1-20220429.112606.7359946) ...
/var/lib/dpkg/info/itrackbox-bluetooth.postinst DEBUG /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

and same package via apt:

root@TSB-168:/home/am43# apt install --reinstall ./itrackbox-bluetooth-3.2.1-20220429.112313.7c03e96.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'itrackbox-bluetooth' instead of './itrackbox-bluetooth-3.2.1-20220429.112313.7c03e96.deb'
The following packages will be DOWNGRADED:
  itrackbox-bluetooth
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 0 B/8308 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 /home/am43/itrackbox-bluetooth-3.2.1-20220429.112313.7c03e96.deb itrackbox-bluetooth armhf 3.2.1-20220429.112313.7c03e96 [8308 B]
dpkg: warning: downgrading itrackbox-bluetooth from 3.2.1-20220429.112606.7359946 to 3.2.1-20220429.112313.7c03e96
(Reading database ... 32911 files and directories currently installed.)
Preparing to unpack .../itrackbox-bluetooth-3.2.1-20220429.112313.7c03e96.deb ...
/var/lib/dpkg/info/itrackbox-bluetooth.prerm DEBUG /usr/sbin:/usr/bin:/sbin:/bin
Unpacking itrackbox-bluetooth (3.2.1-20220429.112313.7c03e96) over (3.2.1-20220429.112606.7359946) ...
Setting up itrackbox-bluetooth (3.2.1-20220429.112313.7c03e96) ...
/var/lib/dpkg/info/itrackbox-bluetooth.postinst DEBUG /usr/sbin:/usr/bin:/sbin:/bin
root@TSB-168:/home/am43#

   * What was the outcome of this action?

   My postinst script fails unless I call scripts using full path

   * What outcome did you expect instead?

   PATH should not be messed with


-- Package-specific info:

-- (no /etc/apt/preferences present) --


-- (no /etc/apt/preferences.d/* present) --


-- (/etc/apt/sources.list present, but not submitted) --


-- (/etc/apt/sources.list.d/itrack.list present, but not submitted) --


-- System Information:
Debian Release: 11.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 5.4.106-itb3.03 (PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=C.UTF-8 (charmap=locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  adduser                 3.118
ii  debian-archive-keyring  2021.1.1
ii  gpgv                    2.2.27-2+deb11u1
ii  libapt-pkg6.0           2.2.4
ii  libc6                   2.31-13+deb11u3
ii  libgcc-s1               10.2.1-6
ii  libgnutls30             3.7.1-5
ii  libseccomp2             2.5.1-1+deb11u1
ii  libstdc++6              10.2.1-6
ii  libsystemd0             247.3-7

Versions of packages apt recommends:
ii  ca-certificates  20210119

Versions of packages apt suggests:
pn  apt-doc                      <none>
pn  aptitude | synaptic | wajig  <none>
ii  dpkg-dev                     1.20.9
ii  gnupg                        2.2.27-2+deb11u1
pn  powermgmt-base               <none>

-- debconf information:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory


Reply to: