[pve-devel] [PATCH v2 pmg-api] api: apt: switch to common Proxmox::RS::APT::Repositories package
Fabian Ebner
f.ebner at proxmox.com
Thu Jul 7 12:38:44 CEST 2022
which is shared between PVE and PMG.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
No changes from v1.
(build-)dependency bumps for libproxmox-perl-rs needed.
src/PMG/API2/APT.pm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/PMG/API2/APT.pm b/src/PMG/API2/APT.pm
index 18bb992..d6f050f 100644
--- a/src/PMG/API2/APT.pm
+++ b/src/PMG/API2/APT.pm
@@ -20,7 +20,8 @@ use PVE::JSONSchema qw(get_standard_option);
use PMG::RESTEnvironment;
use PMG::pmgcfg;
use PMG::Config;
-use PMG::RS::APT::Repositories;
+
+use Proxmox::RS::APT::Repositories;
use AptPkg::Cache;
use AptPkg::Version;
@@ -668,7 +669,7 @@ __PACKAGE__->register_method({
code => sub {
my ($param) = @_;
- return PMG::RS::APT::Repositories::repositories();
+ return Proxmox::RS::APT::Repositories::repositories("pmg");
}});
__PACKAGE__->register_method({
@@ -701,7 +702,7 @@ __PACKAGE__->register_method({
code => sub {
my ($param) = @_;
- PMG::RS::APT::Repositories::add_repository($param->{handle}, $param->{digest});
+ Proxmox::RS::APT::Repositories::add_repository($param->{handle}, "pmg", $param->{digest});
}});
__PACKAGE__->register_method({
@@ -748,7 +749,7 @@ __PACKAGE__->register_method({
my $enabled = $param->{enabled};
$options->{enabled} = int($enabled) if defined($enabled);
- PMG::RS::APT::Repositories::change_repository(
+ Proxmox::RS::APT::Repositories::change_repository(
$param->{path},
int($param->{index}),
$options,
--
2.30.2
More information about the pve-devel
mailing list