Skip to content

Commit 1f4d7af

Browse files
committed
Remove support from groups from spma yumng backend
1 parent 65e459e commit 1f4d7af

File tree

3 files changed

+3
-35
lines changed

3 files changed

+3
-35
lines changed

ncm-spma/src/main/pan/components/spma/yumng/config.pan

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
unique template components/spma/yumng/config;
66

7-
# Prefix for packages/groups
7+
# Prefix for packages
88
prefix '/software';
99

1010
# Package to install
@@ -16,7 +16,6 @@ prefix '/software/components/${project.artifactId}';
1616
'packager' = 'yumng';
1717

1818
'register_change' ?= list(
19-
"/software/groups",
2019
"/software/packages",
2120
"/software/repositories",
2221
);

ncm-spma/src/main/pan/components/spma/yumng/schema.pan

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ declaration template components/spma/yumng/schema;
77
include 'components/spma/schema';
88
include 'components/spma/schema-common-yum';
99

10-
type SOFTWARE_GROUP = {
11-
"default" : boolean = true
12-
"mandatory" : boolean = true
13-
"optional" : boolean = false
14-
"names" : string[] = list() with {
15-
if (length(SELF) > 0) deprecated(0, 'Support for YUM groups will be removed in a future release.');
16-
true;
17-
}
18-
};
19-
2010
type component_spma_yumng = {
2111
include structure_component
2212
include component_spma_common
@@ -29,4 +19,3 @@ type component_spma_yumng = {
2919
};
3020

3121
bind "/software/components/spma" = component_spma_yumng;
32-
bind "/software/groups" = SOFTWARE_GROUP;

ncm-spma/src/main/perl/spma/yumng.pm

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use constant DOMAINNAME => "/system/network/domainname";
2626
use constant REPOS_DIR => "/etc/yum.repos.d";
2727
use constant REPOS_TREE => "/software/repositories";
2828
use constant PKGS_TREE => "/software/packages";
29-
use constant GROUPS_TREE => "/software/groups/names";
3029
use constant CMP_TREE => "/software/components/spma";
3130
use constant YUM_PACKAGE_LIST => "/etc/yum/pluginconf.d/versionlock.list";
3231
use constant YUM_CONF_FILE => "/etc/yum.conf";
@@ -180,12 +179,12 @@ sub Configure
180179

181180
my $repos = $config->getElement(REPOS_TREE)->getTree();
182181
my $t = $config->getElement(CMP_TREE)->getTree();
183-
182+
184183
# Display system info
185184
if ( defined($t->{quattor_os_release}) ) {
186185
$self->info("target OS build: ", $t->{quattor_os_release});
187186
}
188-
187+
189188
# Detect OS
190189
my $fhi;
191190
my $os_major;
@@ -387,15 +386,6 @@ sub Configure
387386
}
388387
}
389388

390-
# RHEL7 needs converting groups
391-
if ( $os_major eq '7' ) {
392-
( $cmd_exit, $cmd_out, $cmd_err ) = $self->execute_command( [ "yum groups mark convert " . YUM_PLUGIN_OPTS ], "converting groups", 1 );
393-
if ( $cmd_exit ) {
394-
$self->error("Failed to do group conversion on RHEL7.");
395-
return 0;
396-
}
397-
}
398-
399389
# Get list of packages installed on system before any package modifications.
400390
my $preinstalled = $self->get_installed_rpms();
401391
return 1 if !defined($preinstalled);
@@ -421,13 +411,6 @@ sub Configure
421411
}
422412
}
423413

424-
# Test whether comps/groups are sane.
425-
( $cmd_exit, $cmd_out, $cmd_err ) = $self->execute_command( [ "yum groupinfo core " . YUM_PLUGIN_OPTS ], "testing comps/groups sanity", 1 );
426-
if ( $cmd_exit ) {
427-
$self->error("Groups are not sane - core group missing. Will not continue.");
428-
return 0;
429-
}
430-
431414
# Query metadata for version locked packages including Epoch and write versionlock.list
432415
( $cmd_exit, $cmd_out, $cmd_err ) = $self->execute_command( [REPO_AVAIL_PKGS], "fetching full package list", 1, "/dev/null", 1 );
433416
if ( $cmd_exit ) {
@@ -498,12 +481,10 @@ sub Configure
498481
return 1 unless $t->{run};
499482

500483
# Run test transaction to get complete list of packages to be present on the system
501-
my $groups = $config->getElement(GROUPS_TREE)->getTree();
502484
$self->execute_command( [ "rm -rf " . YUM_TEST_CHROOT ], "cleaning YUM test chroot", 1 );
503485
$self->execute_command( [ "mkdir -p " . YUM_TEST_CHROOT . "/var/cache" ], "setting up YUM test chroot", 1 );
504486
$self->execute_command( [ "ln -s /var/cache/yum " . YUM_TEST_CHROOT . "/var/cache/yum" ], "setting YUM test chroot cache", 1 );
505487
my $yum_install_test_command = "yum install " . YUM_PLUGIN_OPTS . " -C --installroot=" . YUM_TEST_CHROOT;
506-
if (@$groups) { $yum_install_test_command .= " @" . join ( " @", sort @$groups ); }
507488
if (@$wanted_pkgs_locked) { $yum_install_test_command .= " " . join ( " ", sort @$wanted_pkgs_locked ); }
508489
if (@$wanted_pkgs) { $yum_install_test_command .= " " . join ( " ", sort @$wanted_pkgs ); }
509490
( $cmd_exit, $cmd_out, $cmd_err ) = $self->execute_command( [$yum_install_test_command], "performing YUM chroot install test", 1, "/dev/null", "verbose", 1 );
@@ -835,4 +816,3 @@ sub Configure
835816
}
836817

837818
1; # required for Perl modules
838-

0 commit comments

Comments
 (0)