"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Ocsinventory/Agent/Backend/OS/Generic/Repository/Rhel.pm" between
Ocsinventory-Unix-Agent-2.6.1.tar.gz and Ocsinventory-Unix-Agent-2.8.0.tar.gz

About: Ocsinventory-Agent is a Linux agent for OCS Inventory NG.

Rhel.pm  (Ocsinventory-Unix-Agent-2.6.1):Rhel.pm  (Ocsinventory-Unix-Agent-2.8.0)
skipping to change at line 18 skipping to change at line 18
my $common = $params->{common}; my $common = $params->{common};
return unless $common->can_run("dnf"); return unless $common->can_run("dnf");
} }
my $repo_name; my $repo_name;
my $repo_baseurl; my $repo_baseurl;
my $repo_filename; my $repo_filename;
my $repo_pkgs; my $repo_pkgs;
my $repo_rev; my $repo_rev;
my $repo_size; my $repo_size;
my $repo_tag; my $repo_expire;
my $repo_updated; my $repo_updated;
my $repo_lastupdated;
my $repo_mirrors;
sub run { sub run {
my $params = shift; my $params = shift;
my $common = $params->{common}; my $common = $params->{common};
my @repository=`LANG=C dnf -v repolist 2>/dev/null`; my @repository=`LANG=C dnf -v repolist 2>/dev/null`;
push @repository, "\n";
for (my $i=0;$i<$#repository;$i++){ for (my $i=0;$i<$#repository;$i++){
my $line=$repository[$i]; my $line=$repository[$i];
if ($line =~ /^$/ && $repo_name && $repo_filename) { if ($line =~ /^$/ && $repo_name && $repo_filename) {
$common->addRepo({ $common->addRepo({
BASEURL => $repo_baseurl, BASEURL => $repo_baseurl,
FILENAME => $repo_filename, FILENAME => $repo_filename,
NAME => $repo_name, NAME => $repo_name,
PACKAGES => $repo_pkgs, PKGS => $repo_pkgs,
REVISION => $repo_rev, REVISION => $repo_rev,
SIZE => $repo_size, SIZE => $repo_size,
TAG => $repo_tag,
UPDATED => $repo_updated, UPDATED => $repo_updated,
LASTUPDATED => $repo_lastupdated,
EXPIRE => $repo_expire,
MIRRORS => $repo_mirrors,
}); });
$repo_name = $repo_baseurl = $repo_filename = $repo_pkgs = $repo_rev = $repo_size = $repo_tag = $repo_updated = undef; $repo_name = $repo_expire = $repo_baseurl = $repo_filename = $repo_p kgs = $repo_rev = $repo_size = $repo_mirrors = $repo_updated = $repo_lastupdated = undef;
} }
$repo_name=$1 if ($line =~ /^Repo-name\s+:\s(.*)/i); $repo_name=$1 if ($line =~ /^Repo-name\s+:\s(.*)/i);
$repo_baseurl=$1 if ($line =~ /^Repo-baseurl\s+:\s(.*)/i); $repo_baseurl=$1 if ($line =~ /^Repo-baseurl\s+:\s(.*)/i);
$repo_filename=$1 if ($line =~ /^Repo-filename:\s(.*)/i); $repo_filename=$1 if ($line =~ /^Repo-filename:\s(.*)/i);
$repo_pkgs=$1 if ($line =~ /^Repo-pkgs\s+:\s(.*)/i); $repo_pkgs=$1 if ($line =~ /^Repo-pkgs\s+:\s(.*)/i);
$repo_rev=$1 if ($line =~ /^Repo-revision:\s(.*)/i); $repo_rev=$1 if ($line =~ /^Repo-revision\s+:\s(.*)/i);
$repo_size=$1 if ($line =~ /^Repo-size\s+:\s(.*)/i); $repo_size=$1 if ($line =~ /^Repo-size\s+:\s(.*)/i);
$repo_tag=$1 if ($line =~ /^Repo-tags\s+:\s(.*)/i); $repo_expire=$1 if ($line =~ /^Repo-expire\s+:\s(.*)/i);
$repo_updated=$1 if ($line =~ /^Repo-updated\s+:\s(.*)/i); $repo_updated=$1 if ($line =~ /^Repo-updated\s+:\s(.*)/i);
$repo_lastupdated=$1 if ($line =~ /Updated\s+:\s(.*)/i);
$repo_mirrors=$1 if ($line =~ /^Repo-metalink\s+:\s(.*)/i);
} }
} }
1; 1;
 End of changes. 10 change blocks. 
7 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)