From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id B6FBB1FF17E for ; Thu, 18 Sep 2025 15:52:21 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 29EF5D4B; Thu, 18 Sep 2025 15:52:22 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Thu, 18 Sep 2025 15:50:56 +0200 Message-ID: <20250918135215.95188-5-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250918135215.95188-1-f.ebner@proxmox.com> References: <20250918135215.95188-1-f.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1758203529657 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [RFC qemu-server 4/4] partially fix #2077: remove dependency on Term::ReadLine X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Originally-by: Stefan Hrdlicka [FE: rebase and adapt to rename] Signed-off-by: Fiona Ebner --- 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 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel