1 |
diff -Nur smeserver-yum-2.4.0.old/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL smeserver-yum-2.4.0/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL |
diff -Nur smeserver-yum-2.4.0.old/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL smeserver-yum-2.4.0/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL |
2 |
--- smeserver-yum-2.4.0.old/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL 1969-12-31 19:00:00.000000000 -0500 |
--- smeserver-yum-2.4.0.old/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL 1969-12-31 19:00:00.000000000 -0500 |
3 |
+++ smeserver-yum-2.4.0/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL 2019-12-05 10:15:48.300000000 -0500 |
+++ smeserver-yum-2.4.0/root/etc/e-smith/db/yum_repositories/migrate/45CentOSEOL 2019-12-05 10:15:48.300000000 -0500 |
4 |
@@ -0,0 +1,19 @@ |
@@ -0,0 +1,20 @@ |
5 |
+{ |
+{ |
6 |
+ use POSIX qw(strftime); |
+ use POSIX qw(strftime); |
7 |
+ use File::Slurp; |
+ use File::Slurp; |
12 |
+ my $curdate = strftime '%Y%m%d', localtime; |
+ my $curdate = strftime '%Y%m%d', localtime; |
13 |
+ # return unless EOL is reached |
+ # return unless EOL is reached |
14 |
+ return unless ( "$curdate" >= "20201130"); |
+ return unless ( "$curdate" >= "20201130"); |
15 |
+ for my $name ( qw(base updates centos-sclo-centos centos-sclo-rh centosplus extras fasttrack) ) |
+ for my $name ( qw(base updates centosplus extras fasttrack contrib) ) |
16 |
+ { |
+ { |
17 |
+ my $repo = $DB->get($name) or next; |
+ my $repo = $DB->get($name) or next; |
18 |
+ # setprop BaseURL "http://vault.centos.org/$SUBVER/$name/\$basearch/" |
+ my $rname = ( $name eq 'base' )? 'os' :$name; |
19 |
+ #repo->set_prop('BaseURL', "http://vault.centos.org/$SUBVER/$name/\$basearch/"); |
+ # setprop BaseURL "http://vault.centos.org/$SUBVER/$rname/\$basearch/" |
20 |
|
+ repo->set_prop('BaseURL', "http://vault.centos.org/$SUBVER/$rname/\$basearch/"); |
21 |
+ # delprop MirrorList |
+ # delprop MirrorList |
22 |
+ $repo->delete_prop('MirrorList'); |
+ $repo->delete_prop('MirrorList'); |
23 |
+ } |
+ } |