fix for bug 3136752: add internal flag --nocache to *def commands

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8401 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-12-15 01:47:06 +00:00
parent 9d8a543c65
commit 87fb0fdddc
3 changed files with 10 additions and 3 deletions

View File

@ -15,6 +15,9 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
BuildArch: noarch
Requires: perl-SOAP-Lite
%endif
%ifarch ppc64
Requires: perl-IO-Stty
%endif
Provides: perl-xCAT = %{epoch}:%{version}

View File

@ -54,7 +54,9 @@ sub getObjectsOfType
return @objlist;
}
if ($::saveObjList{$type})
# The database may be changed between getObjectsOfType calls
# do not use cache %::saveObjList if --nocache is specified
if ($::saveObjList{$type} && !$::opt_c)
{
@objlist = @{$::saveObjList{$type}};
}
@ -564,7 +566,8 @@ sub getDBtable
my @rows = [];
# save this table info - in case this subr gets called multiple times
if (grep(/^$table$/, @::foundTableList))
# --nocache flag specifies not to use cahe
if (grep(/^$table$/, @::foundTableList) && !$::opt_c)
{
# already have this

View File

@ -239,7 +239,8 @@ sub processArgs
'version|v' => \$::opt_v,
'w=s@' => \$::opt_w,
'x|xml' => \$::opt_x,
'z|stanza' => \$::opt_z
'z|stanza' => \$::opt_z,
'nocache' => \$::opt_c
)
)
{