1 |
jpp |
1.1 |
diff -Nur --no-dereference smeserver-yum-2.6.0.old/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL smeserver-yum-2.6.0/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL |
2 |
|
|
--- smeserver-yum-2.6.0.old/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL 2021-03-21 02:05:05.155000000 -0400 |
3 |
|
|
+++ smeserver-yum-2.6.0/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL 2021-03-21 02:05:36.595000000 -0400 |
4 |
|
|
@@ -1,6 +1,20 @@ |
5 |
|
|
{ |
6 |
|
|
use POSIX qw(strftime); |
7 |
|
|
use File::Slurp; |
8 |
|
|
+ |
9 |
|
|
+ # we need to remove that from migrated server |
10 |
|
|
+ for my $name ( qw(base updates centosplus extras fasttrack centos-sclo-rh centos-sclo-centos) ) |
11 |
|
|
+ { |
12 |
|
|
+ my $repo = $DB->get($name) or next; |
13 |
|
|
+ my $baseurl = $repo->prop('BaseURL') or next; |
14 |
|
|
+ my $mirrorlist = $repo->prop('MirrorList') or next; |
15 |
|
|
+ if ( $baseurl =~ /^http:\/\/vault\.centos\.org\/[5-6]/ ) |
16 |
|
|
+ { |
17 |
|
|
+ $repo->delete_prop('MirrorList'); |
18 |
|
|
+ $repo->delete_prop('BaseURL'); |
19 |
|
|
+ unlink "/var/cache/yum/$name/$_" foreach qw(repomd.xml mirrorlist.txt); |
20 |
|
|
+ } |
21 |
|
|
+ } |
22 |
|
|
#get CentOS release we are |
23 |
|
|
my $SUBVER = read_file('/etc/centos-release'); |
24 |
|
|
$SUBVER =~ s/^CentOS Linux release ([0-9\.]+).*?$/$1/; |