/[smeserver]/rpms/smeserver-yum/sme8/smeserver-yum-1.2.0-restrictAvailable.patch
ViewVC logotype

Contents of /rpms/smeserver-yum/sme8/smeserver-yum-1.2.0-restrictAvailable.patch

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


Revision 1.1 - (show annotations) (download)
Tue Jun 12 21:14:56 2007 UTC (17 years, 4 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-yum-1_2_0-37_el5_sme, smeserver-yum-1_2_0-39_el5_sme, smeserver-yum-1_2_0-49_el5_sme, smeserver-yum-1_2_0-46_el5_sme, smeserver-yum-1_2_0-55_el5_sme, smeserver-yum-1_2_0-47_el5_sme, smeserver-yum-1_2_0-44_el5_sme, smeserver-yum-1_2_0-41_el5_sme, smeserver-yum-1_2_0-51_el5_sme, smeserver-yum-1_2_0-48_el5_sme, smeserver-yum-1_2_0-45_el5_sme, smeserver-yum-1_2_0-50_el5_sme, smeserver-yum-1_2_0-53_el5_sme, smeserver-yum-1_2_0-56_el5_sme, smeserver-yum-1_2_0-36_el5_sme, smeserver-yum-1_2_0-40_el5_sme, smeserver-yum-1_2_0-58_el5_sme, smeserver-yum-1_2_0-54_el5_sme, smeserver-yum-1_2_0-57_el5_sme
Import on branch sme8 of package smeserver-yum-1.2.0-36.el5.sme.src.rpm

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-yum-1.2.0/root/sbin/e-smith/yum_update_dbs mezzanine_patched_smeserver-yum-1.2.0/root/sbin/e-smith/yum_update_dbs
2 --- smeserver-yum-1.2.0/root/sbin/e-smith/yum_update_dbs 2005-09-25 20:30:54.000000000 -0600
3 +++ mezzanine_patched_smeserver-yum-1.2.0/root/sbin/e-smith/yum_update_dbs 2007-06-10 04:04:47.000000000 -0600
4 @@ -22,6 +22,10 @@
5 use esmith::ConfigDB;
6
7 my $db = esmith::ConfigDB->open_ro or die "Couldn't open ConfigDB\n";
8 +my $RestrictRpm = $db->get_prop('yum', 'RestrictRpm') || 'no';
9 +my $RestrictRepo = $db->get_prop('yum', 'RestrictRepo') || 'no';
10 +my @rpms = split(/,/, $RestrictRpm);
11 +my @repos = split(/,/, $RestrictRepo);
12
13 use constant YUM_CRON_FLAG => '/var/lock/subsys/yum';
14
15 @@ -66,7 +70,33 @@
16
17 next unless $package and $version and $repo;
18
19 - print DB "$package=package|Repo|$repo|Version|$version\n";
20 + if ($list_option eq 'available')
21 + {
22 + if (($RestrictRpm eq 'no') && ($RestrictRepo eq 'no'))
23 + {
24 + print DB "$package=package|Repo|$repo|Version|$version\n";
25 + }
26 + else
27 + {
28 + my $match = ''; # test on a match so we don't get duplicate entries
29 + foreach (@rpms)
30 + {
31 + next if ($match eq 'yes');
32 + if ($package =~ /$_/)
33 + { print DB "$package=package|Repo|$repo|Version|$version\n"; $match='yes';}
34 + }
35 + foreach (@repos)
36 + {
37 + next if ($match eq 'yes');
38 + if ($repo =~ /$_/)
39 + { print DB "$package=package|Repo|$repo|Version|$version\n"; $match='yes';}
40 + }
41 + }
42 + }
43 + else
44 + {
45 + print DB "$package=package|Repo|$repo|Version|$version\n";
46 + }
47 }
48
49 close YUM or warn "yum list $list_option status $?\n";

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