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

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

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 (15 years, 8 months 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 2007-06-10 18:02:18.000000000 -0600
3 +++ mezzanine_patched_smeserver-yum-1.2.0/root/sbin/e-smith/yum_update_dbs 2007-06-10 18:01:41.000000000 -0600
4 @@ -22,10 +22,6 @@
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 @@ -72,26 +68,18 @@
16
17 if ($list_option eq 'available')
18 {
19 - if (($RestrictRpm eq 'no') && ($RestrictRepo eq 'no'))
20 + my $RestrictRpm = $db->get_prop('yum', 'RestrictRpm') || '';
21 + my $RestrictRepo = $db->get_prop('yum', 'RestrictRepo') || '';
22 + my @rpms = split(/,/, $RestrictRpm);
23 + my @repos = split(/,/, $RestrictRepo);
24 +
25 + if ( ($#rpms < 0 && $#repos < 0)
26 + || (grep { $package =~ /$_/ } @rpms)
27 + || (grep { $repo =~ /$_/ } @repos)
28 + )
29 {
30 print DB "$package=package|Repo|$repo|Version|$version\n";
31 }
32 - else
33 - {
34 - my $match = ''; # test on a match so we don't get duplicate entries
35 - foreach (@rpms)
36 - {
37 - next if ($match eq 'yes');
38 - if ($package =~ /$_/)
39 - { print DB "$package=package|Repo|$repo|Version|$version\n"; $match='yes';}
40 - }
41 - foreach (@repos)
42 - {
43 - next if ($match eq 'yes');
44 - if ($repo =~ /$_/)
45 - { print DB "$package=package|Repo|$repo|Version|$version\n"; $match='yes';}
46 - }
47 - }
48 }
49 else
50 {

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