all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Moayad Almalat <m.almalat@proxmox.com>
To: pve-devel@pve.proxmox.com
Subject: [pve-devel] [PATCH pve-manger 0/1] Close #1623: replace apt-get to apt
Date: Tue,  7 Jul 2020 12:20:00 +0200	[thread overview]
Message-ID: <20200707102001.124244-1-m.almalat@proxmox.com> (raw)

Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
---
 PVE/API2/APT.pm    |  6 +++---
 PVE/API2/Nodes.pm  |  6 +++---
 PVE/CLI/pveceph.pm |  4 ++--
 bin/pveupgrade     | 10 +++++-----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm
index 2db620aa..01688ed1 100644
--- a/PVE/API2/APT.pm
+++ b/PVE/API2/APT.pm
@@ -275,7 +275,7 @@ __PACKAGE__->register_method({
     name => 'update_database', 
     path => 'update', 
     method => 'POST',
-    description => "This is used to resynchronize the package index files from their sources (apt-get update).",
+    description => "This is used to resynchronize the package index files from their sources (apt update).",
     permissions => {
 	check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
     },
@@ -322,9 +322,9 @@ __PACKAGE__->register_method({
 	    my $aptcfn = "/etc/apt/apt.conf.d/76pveproxy";
 	    PVE::Tools::file_set_contents($aptcfn, $aptconf);
 
-	    my $cmd = ['apt-get', 'update'];
+	    my $cmd = ['apt', 'update'];
 
-	    print "starting apt-get update\n" if !$param->{quiet};
+	    print "starting apt update\n" if !$param->{quiet};
 	    
 	    if ($param->{quiet}) {
 		PVE::Tools::run_command($cmd, outfunc => sub {}, errfunc => sub {});
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 1b133352..75757230 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -884,7 +884,7 @@ __PACKAGE__->register_method ({
 	    node => get_standard_option('pve-node'),
 	    upgrade => {
 		type => 'boolean',
-		description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
+		description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.",
 		optional => 1,
 		default => 0,
 	    },
@@ -1024,7 +1024,7 @@ __PACKAGE__->register_method ({
 	    node => get_standard_option('pve-node'),
 	    upgrade => {
 		type => 'boolean',
-		description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
+		description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.",
 		optional => 1,
 		default => 0,
 	    },
@@ -1160,7 +1160,7 @@ __PACKAGE__->register_method ({
 	    proxy => get_standard_option('spice-proxy', { optional => 1 }),
 	    upgrade => {
 		type => 'boolean',
-		description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
+		description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.",
 		optional => 1,
 		default => 0,
 	    },
diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index af14cbc0..e2c89be2 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -157,9 +157,9 @@ __PACKAGE__->register_method ({
 
 	local $ENV{DEBIAN_FRONTEND} = 'noninteractive';
 	print "update available package list\n";
-	eval { run_command(['apt-get', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) };
+	eval { run_command(['apt', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) };
 
-	my @apt_install = qw(apt-get --no-install-recommends -o Dpkg::Options::=--force-confnew install --);
+	my @apt_install = qw(apt --no-install-recommends -o Dpkg::Options::=--force-confnew install --);
 	my @ceph_packages = qw(
 	    ceph
 	    ceph-common
diff --git a/bin/pveupgrade b/bin/pveupgrade
index 0ce01824..cd20fa75 100755
--- a/bin/pveupgrade
+++ b/bin/pveupgrade
@@ -42,13 +42,13 @@ if (!$st || (time() - $st->mtime) > (3*24*3600)) {
 
 } else {
 
-    my $cmdstr = 'apt-get dist-upgrade';
+    my $cmdstr = 'apt dist-upgrade';
 
-    print "Starting system upgrade: apt-get dist-upgrade\n";
+    print "Starting system upgrade: apt dist-upgrade\n";
 
     my $oldlist = PVE::API2::APT->list_updates({ node => $nodename});
 
-    system('apt-get', 'dist-upgrade'); 
+    system('apt', 'dist-upgrade'); 
 
     my $pkglist = PVE::API2::APT->list_updates({ node => $nodename});
 
@@ -88,7 +88,7 @@ __END__
 
 =head1 NAME
 
-pveupgrade - wrapper arournd "apt-get dist-upgrade"
+pveupgrade - wrapper arournd "apt dist-upgrade"
 
 =head1 SYNOPSIS
 
@@ -96,6 +96,6 @@ pveupgrade - wrapper arournd "apt-get dist-upgrade"
 
 =head1 DESCRIPTION
 
-This is a small wrapper around "apt-get dist-upgrade". We use this to
+This is a small wrapper around "apt dist-upgrade". We use this to
 print additional information (kernel restart required?), and
 optionally run an interactive shell after the update (--shell)
-- 
2.20.1




             reply	other threads:[~2020-07-07 10:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 10:20 Moayad Almalat [this message]
2020-07-07 10:20 ` [pve-devel] [PATCH pve-docs 1/1] " Moayad Almalat
2020-07-07 16:54 ` [pve-devel] applied: Re: [PATCH pve-manger 0/1] " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200707102001.124244-1-m.almalat@proxmox.com \
    --to=m.almalat@proxmox.com \
    --cc=pve-devel@pve.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal