/[smeserver]/rpms/smeserver-yum/sme9/smeserver-yum-2.4.0.bz10250.CentOSVault.onEOL.patch
ViewVC logotype

Annotation of /rpms/smeserver-yum/sme9/smeserver-yum-2.4.0.bz10250.CentOSVault.onEOL.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Thu Dec 5 20:50:34 2019 UTC (4 years, 10 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-yum-2_4_0-26_el6_sme, smeserver-yum-2_4_0-27_el6_sme
Changes since 1.2: +5 -4 lines
* Thu Dec 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.4.0-26.sme
- switch to vault for upstream repos after EOL [SME: 10250]

1 jpp 1.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
2     --- 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
4 jpp 1.3 @@ -0,0 +1,20 @@
5 jpp 1.1 +{
6     + use POSIX qw(strftime);
7     + use File::Slurp;
8     + #get CentOS release we are
9     + my $SUBVER = read_file('/etc/centos-release');
10     + $SUBVER =~ s/^CentOS Linux release ([0-9\.]+).*?$/$1/;
11     + return unless $1;
12     + my $curdate = strftime '%Y%m%d', localtime;
13     + # return unless EOL is reached
14     + return unless ( "$curdate" >= "20201130");
15 jpp 1.3 + for my $name ( qw(base updates centosplus extras fasttrack contrib) )
16 jpp 1.1 + {
17     + my $repo = $DB->get($name) or next;
18 jpp 1.3 + my $rname = ( $name eq 'base' )? 'os' :$name;
19     + # setprop BaseURL "http://vault.centos.org/$SUBVER/$rname/\$basearch/"
20     + #repo->set_prop('BaseURL', "http://vault.centos.org/$SUBVER/$rname/\$basearch/");
21 jpp 1.1 + # delprop MirrorList
22     + $repo->delete_prop('MirrorList');
23     + }
24     +}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed