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

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

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


Revision 1.2 - (show annotations) (download)
Tue Oct 7 14:47:50 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

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