[pve-devel] [RFC qemu-server 4/4] partially fix #2077: remove dependency on Term::ReadLine
Fiona Ebner
f.ebner at proxmox.com
Thu Sep 18 15:50:56 CEST 2025
Originally-by: Stefan Hrdlicka <s.hrdlicka at proxmox.com>
[FE: rebase and adapt to rename]
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
Dependency bump for pve-common needed.
Advanced users might be unhappy with not having the editing and
history shortcuts Term::ReadLine provides anymore.
debian/control | 1 -
src/PVE/CLI/qm.pm | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/debian/control b/debian/control
index f02ef742..7af87a05 100644
--- a/debian/control
+++ b/debian/control
@@ -46,7 +46,6 @@ Depends: conntrack,
libpve-common-perl (>= 9.0.3),
libpve-guest-common-perl (>= 5.2.2),
libpve-storage-perl (>= 9.0.7),
- libterm-readline-gnu-perl,
liburi-perl,
libuuid-perl,
perl (>= 5.10.0-19),
diff --git a/src/PVE/CLI/qm.pm b/src/PVE/CLI/qm.pm
index 2e56e234..8ee5033a 100755
--- a/src/PVE/CLI/qm.pm
+++ b/src/PVE/CLI/qm.pm
@@ -12,7 +12,6 @@ use IO::Select;
use IO::Socket::UNIX;
use JSON;
use POSIX qw(strftime);
-use Term::ReadLine;
use URI::Escape;
use PVE::APIClient::LWP;
@@ -23,6 +22,7 @@ use PVE::GuestImport::OVF;
use PVE::INotify;
use PVE::JSONSchema qw(get_standard_option);
use PVE::Network;
+use PVE::PTY;
use PVE::RPCEnvironment;
use PVE::SafeSyslog;
use PVE::Tools qw(extract_param file_get_contents);
@@ -551,9 +551,7 @@ __PACKAGE__->register_method({
print "Entering QEMU Monitor for VM $vmid - type 'help' for help\n";
- my $term = Term::ReadLine->new('qm');
-
- while (defined(my $input = $term->readline('qm> '))) {
+ while (defined(my $input = PVE::PTY::read_line('qm> '))) {
chomp $input;
next if $input =~ m/^\s*$/;
last if $input =~ m/^\s*q(uit)?\s*$/;
--
2.47.2
More information about the pve-devel
mailing list