Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ncm-spma/src/main/pan/components/spma/yumng/config.pan
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

unique template components/spma/yumng/config;

# Prefix for packages/groups
# Prefix for packages
prefix '/software';

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

'register_change' ?= list(
"/software/groups",
"/software/packages",
"/software/repositories",
);
11 changes: 0 additions & 11 deletions ncm-spma/src/main/pan/components/spma/yumng/schema.pan
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ declaration template components/spma/yumng/schema;
include 'components/spma/schema';
include 'components/spma/schema-common-yum';

type SOFTWARE_GROUP = {
"default" : boolean = true
"mandatory" : boolean = true
"optional" : boolean = false
"names" : string[] = list() with {
if (length(SELF) > 0) deprecated(0, 'Support for YUM groups will be removed in a future release.');
true;
}
};

type component_spma_yumng = {
include structure_component
include component_spma_common
Expand All @@ -31,4 +21,3 @@ type component_spma_yumng = {
};

bind "/software/components/spma" = component_spma_yumng;
bind "/software/groups" = SOFTWARE_GROUP;
12 changes: 0 additions & 12 deletions ncm-spma/src/main/perl/spma/yumng.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use Text::Glob qw(match_glob);
use constant REPOS_DIR => "/etc/yum.repos.d";
use constant REPOS_TREE => "/software/repositories";
use constant PKGS_TREE => "/software/packages";
use constant GROUPS_TREE => "/software/groups/names";
use constant CMP_TREE => "/software/components/spma";
use constant YUM_PACKAGE_LIST => "/etc/yum/pluginconf.d/versionlock.list";
use constant YUM_CONF_FILE => "/etc/yum.conf";
Expand Down Expand Up @@ -325,16 +324,6 @@ sub Configure
}
}

my $groups = defined($config->getElement(GROUPS_TREE)) ? $config->getElement(GROUPS_TREE)->getTree() : [];
# RHEL7 needs converting groups
if ($os_major eq '7' && @$groups) {
($cmd_exit, $cmd_out, $cmd_err) = $self->execute_command(["yum groups mark convert " . YUM_PLUGIN_OPTS], "converting groups", 1);
if ($cmd_exit) {
$self->error("Failed to do group conversion on RHEL7.");
return 0;
}
}

# Get list of packages installed on system before any package modifications.
my $preinstalled = $self->get_installed_rpms();
return 1 if !defined($preinstalled);
Expand Down Expand Up @@ -448,7 +437,6 @@ sub Configure
$self->execute_command(["mkdir -p " . $yum_test_chroot . "/var/cache"], "setting up YUM test chroot", 1);
$self->execute_command(["ln -s /var/cache/yum " . $yum_test_chroot . "/var/cache/yum"], "setting YUM test chroot cache", 1);
my $yum_install_test_command = "yum install " . YUM_PLUGIN_OPTS . " -C --installroot=" . $yum_test_chroot;
if (@$groups) { $yum_install_test_command .= " @" . join (" @", sort @$groups); }
if (@$wanted_pkgs_locked) { $yum_install_test_command .= " " . join (" ", sort @$wanted_pkgs_locked); }
if (@$wanted_pkgs) { $yum_install_test_command .= " " . join (" ", sort @$wanted_pkgs); }
($cmd_exit, $cmd_out, $cmd_err) = $self->execute_command([$yum_install_test_command], "performing YUM chroot install test", 1, "/dev/null", "verbose", 1);
Expand Down