Design lack: pamac-cli reads what it should not read yet
Pamac Version
$ pamac --version
Pamac 10.2.2-5
Libpamac Version
$ pacman -Qi libpamac | grep Ver
Version : 11.1.3-1
Desktop environment
Operating System: Manjaro Linux
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.15.0-1-MANJARO (64-bit)
Graphics Platform: X11
What's not working
Pamac reads user input before the time of the question arrives on the user screen.
How to reproduce?
pamac install any-locally-absent-package-name
or
pamac reinstall firefox
(or any other package)
Type any char(s) immediately (before the question appears).
Done: user input buffer got the data you typed before the Apply transaction ? [y/N]
question appears.
Real machine examples:
$ pamac update
Preparing...
Synchronizing package databases...
yResolving dependencies...
Checking inter-conflicts...
To upgrade (1):
gdbm 1.22-1 (1.21-1) core 267.3 kB
Total download size: 267.3 kB
Total installed size: 153.9 kB
Apply transaction ? [y/N] y
Transaction cancelled.
Note the yResolving
: at that stage I pressed y
, and by the time pamac
shows the question Apply transaction ? [y/N]
my answer for pamac probably became yy
as it opens input buffer for the answer before to ask the question. As y
!= yy
I got transaction cancellation.
Now installation w/o answering after the question arrived:
$ pamac update
Preparing...
Synchronizing package databases...
yResolving dependencies...
Checking inter-conflicts...
To upgrade (1):
gdbm 1.22-1 (1.21-1) core 267.3 kB
Total download size: 267.3 kB
Total installed size: 153.9 kB
Apply transaction ? [y/N]
Download of gdbm (1.22-1) started
Download of gdbm (1.22-1) finished
Checking keyring... [1/1]
Checking integrity... [1/1]
Loading packages files... [1/1]
Checking file conflicts... [1/1]
Checking available disk space... [1/1]
Upgrading gdbm (1.21-1 -> 1.22-1)... [1/1]
Running post-transaction hooks...
Arming ConditionNeedsUpdate... [1/3]
Refreshing PackageKit... [2/3]
Updating the info directory file... [3/3]
Transaction successfully finished.
$
Note the same yResolving
and I did not typed anything after the question Apply transaction ? [y/N]
arrives but got transaction proceeding.
If to do not press anything:
$ pamac reinstall firefox
Preparing...
Warning: firefox-93.0-1 is up to date -- reinstalling
Resolving dependencies...
Checking inter-conflicts...
To reinstall (1):
firefox 93.0-1 extra 62.6 MB
Total download size: 62.6 MB
Apply transaction ? [y/N]
Transaction cancelled.
than pamac
cancels the operation.
So pamac
reading user input then it should not do it yet.
A beginning of investigation
What is that effect related to? May be environment (terminal emulamor and interpreter)?
And how pacman
works there?
But a bit another environment: all are exactly the same, but sudo
used. But I believe in that case of reported issue it does not matter under the sudo
was the execution or not:
$ sudo pacman -Syy baloo
:: Synchronising package databases...
core 174.4 KiB 304 KiB/s 00:01 [####################################################################] 100%
extra 1909.3 KiB 1308 KiB/s 00:01 [####################################################################] 100%
community 6.7 MiB 1580 KiB/s 00:04 [####################################################################] 100%
multilib 176.8 KiB 214 KiB/s 00:01 [####################################################################] 100%
ychaotic-aur 1561.8 KiB 380 KiB/s 00:04 [####################################################################] 100%
warning: baloo-5.87.0-1 is up to date -- reinstalling
resolving dependencies...
ylooking for conflicting packages...
Package (1) Old Version New Version Net Change Download Size
extra/baloo 5.87.0-1 5.87.0-1 0.00 MiB 0.57 MiB
Total Download Size: 0.57 MiB
Total Installed Size: 2.27 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
baloo-5.87.0-1-x86_64 580.4 KiB 1087 KiB/s 00:01 [####################################################################] 100%
(1/1) checking keys in keyring [####################################################################] 100%
(1/1) checking package integrity [####################################################################] 100%
(1/1) loading package files [####################################################################] 100%
(1/1) checking for file conflicts [####################################################################] 100%
(1/1) checking available disk space [####################################################################] 100%
:: Processing package changes...
(1/1) reinstalling baloo [####################################################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...
Note: ylooking
and later :: Proceed with installation? [Y/n] y
and it proceeds.
Does pacman
recognized yy
as y
?
$ sudo pacman -Syy baloo
:: Synchronising package databases...
core 174.4 KiB 408 KiB/s 00:00 [####################################################################] 100%
extra 1909.3 KiB 1032 KiB/s 00:02 [####################################################################] 100%
community 6.7 MiB 1180 KiB/s 00:06 [####################################################################] 100%
multilib 176.8 KiB 323 KiB/s 00:01 [####################################################################] 100%
chaotic-aur 1561.8 KiB 683 KiB/s 00:02 [####################################################################] 100%
warning: baloo-5.87.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Package (1) Old Version New Version Net Change
extra/baloo 5.87.0-1 5.87.0-1 0.00 MiB
Total Installed Size: 2.27 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] yy
$
The answer: no.
So I am unable to catch the reported design lack in pacman
.
For the record if fixing will take some time:
pacman -Qi pacman | grep Ver
Version : 6.0.1-2
Possibly required data: the environment:
$ inxi -Iazy1
Info:
Processes: 278
Uptime: 8h 11m
wakeups: 45
Memory: 31.11 GiB
used: 8.59 GiB (27.6%)
Init: systemd
v: 249
tool: systemctl
Compilers:
gcc: 11.1.0
clang: 12.0.1
Packages:
pacman: 1212
lib: 274
Shell: Zsh
v: 5.8
default: Bash
v: 5.1.8
running-in: konsole
inxi: 3.3.08
$
$ pacman -Qi konsole | grep Ver
Version : 21.08.2-1
Thank you for the app!
Cheers!