[pve-devel] [PATCH qemu-server 3/3] remove dependency on Term::ReadLine (see #2077)

Stefan Hrdlicka s.hrdlicka at proxmox.com
Mon May 9 09:30:34 CEST 2022


depends on change in pve-common

Signed-off-by: Stefan Hrdlicka <s.hrdlicka at proxmox.com>
---
This wasn't in the ticket but I found the dependency here as well and
removed it.

 PVE/CLI/qm.pm  | 4 ++--
 debian/control | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index cf0d6f3..9579967 100755
--- a/PVE/CLI/qm.pm
+++ b/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::Cluster;
@@ -24,6 +23,7 @@ use PVE::Network;
 use PVE::RPCEnvironment;
 use PVE::SafeSyslog;
 use PVE::Tools qw(extract_param);
+use PVE::PTY;
 
 use PVE::API2::Qemu::Agent;
 use PVE::API2::Qemu;
@@ -392,7 +392,7 @@ __PACKAGE__->register_method ({
 
 	my $term = Term::ReadLine->new('qm');
 
-	while (defined(my $input = $term->readline('qm> '))) {
+	while (defined(my $input = PVE::PTY::read_input('qm> '))) {
 	    chomp $input;
 	    next if $input =~ m/^\s*$/;
 	    last if $input =~ m/^\s*q(uit)?\s*$/;
diff --git a/debian/control b/debian/control
index 7de9e84..62869ac 100644
--- a/debian/control
+++ b/debian/control
@@ -38,7 +38,6 @@ Depends: dbus,
          libpve-common-perl (>= 7.1-3),
          libpve-guest-common-perl (>= 4.1-1),
          libpve-storage-perl (>= 6.3-8),
-         libterm-readline-gnu-perl,
          libuuid-perl,
          libxml-libxml-perl,
          perl (>= 5.10.0-19),
-- 
2.30.2




More information about the pve-devel mailing list