]> git.proxmox.com Git - pve-manager.git/commitdiff
Revert "Close #1623: replace apt-get to apt"
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 Jul 2020 08:55:56 +0000 (10:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 Jul 2020 08:55:56 +0000 (10:55 +0200)
This reverts commit 19137ed620b22dc012c17999ff4efc0186c677c0.

PVE/API2/APT.pm
PVE/API2/Nodes.pm
PVE/CLI/pveceph.pm
bin/pveupgrade

index 01688ed1e9a59e67cd2560d6b0bbb1fd96f1d811..2db620aae3368c97dfc6a4e7b0a5e393bd877d45 100644 (file)
@@ -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 update).",
+    description => "This is used to resynchronize the package index files from their sources (apt-get 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', 'update'];
+           my $cmd = ['apt-get', 'update'];
 
-           print "starting apt update\n" if !$param->{quiet};
+           print "starting apt-get update\n" if !$param->{quiet};
            
            if ($param->{quiet}) {
                PVE::Tools::run_command($cmd, outfunc => sub {}, errfunc => sub {});
index 757572309b5523204345146fa65639b595abb58f..1b13335209c9d1d084098b115d6e4a484b994196 100644 (file)
@@ -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 dist-upgrade' instead of normal shell.",
+               description => "Deprecated, use the 'cmd' property instead! Run 'apt-get 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 dist-upgrade' instead of normal shell.",
+               description => "Deprecated, use the 'cmd' property instead! Run 'apt-get 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 dist-upgrade' instead of normal shell.",
+               description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
                optional => 1,
                default => 0,
            },
index e2c89be25fd54499fd9ee705472c0d8f91ac9658..af14cbc0227ea40d8b15b68f2dc2c4ceeae8b0a0 100755 (executable)
@@ -157,9 +157,9 @@ __PACKAGE__->register_method ({
 
        local $ENV{DEBIAN_FRONTEND} = 'noninteractive';
        print "update available package list\n";
-       eval { run_command(['apt', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) };
+       eval { run_command(['apt-get', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) };
 
-       my @apt_install = qw(apt --no-install-recommends -o Dpkg::Options::=--force-confnew install --);
+       my @apt_install = qw(apt-get --no-install-recommends -o Dpkg::Options::=--force-confnew install --);
        my @ceph_packages = qw(
            ceph
            ceph-common
index cd20fa7509af9d4c7fccb046e6d1ccd784efa59f..0ce01824dbfb410c40df1316d467d6c41b195c06 100755 (executable)
@@ -42,13 +42,13 @@ if (!$st || (time() - $st->mtime) > (3*24*3600)) {
 
 } else {
 
-    my $cmdstr = 'apt dist-upgrade';
+    my $cmdstr = 'apt-get dist-upgrade';
 
-    print "Starting system upgrade: apt dist-upgrade\n";
+    print "Starting system upgrade: apt-get dist-upgrade\n";
 
     my $oldlist = PVE::API2::APT->list_updates({ node => $nodename});
 
-    system('apt', 'dist-upgrade'); 
+    system('apt-get', 'dist-upgrade'); 
 
     my $pkglist = PVE::API2::APT->list_updates({ node => $nodename});
 
@@ -88,7 +88,7 @@ __END__
 
 =head1 NAME
 
-pveupgrade - wrapper arournd "apt dist-upgrade"
+pveupgrade - wrapper arournd "apt-get dist-upgrade"
 
 =head1 SYNOPSIS
 
@@ -96,6 +96,6 @@ pveupgrade - wrapper arournd "apt dist-upgrade"
 
 =head1 DESCRIPTION
 
-This is a small wrapper around "apt dist-upgrade". We use this to
+This is a small wrapper around "apt-get dist-upgrade". We use this to
 print additional information (kernel restart required?), and
 optionally run an interactive shell after the update (--shell)