#64 Infinite Loop whilst creating from RedHat AW2.1

v1.01
open
nobody
5
2003-04-28
2003-04-28
No

In Image.pm there can be an infinite loop when the
release version cannot be determined. The release will
not be determined correctly when using RedHat
Advanced Workstation 2.1.

Diffs are to enable it to work correctly.

*** /usr/lib/systeminstaller/SystemInstaller/Image.pm.ori
g Fri Apr 25 16:21:41 2003
--- /usr/lib/systeminstaller/SystemInstaller/Image.pm
Fri Apr 25 16:23:49 2003
***************
*** 143,148 ****
--- 143,150 ----
# Now find the version
$relfiles[0]=~s/.*\///;
my ($j1,$j2,$version,$j3)=split(/-/,$relfiles
[0]);
+ # if Advanced Workstation the above does not work,
so do this
+ my ($j1,$j2,$j3,$version,$j4)=split(/-/,$relfiles[0]) if (
$version == /aw/ );
return($distro,$version);
}
undef @relfiles;

This is a little bash function that I have found can
reliably return the package name, version and also type
of package from a full filename (e.g. .ia64.rpm, .tar.gz,
etc.). It may be of help?

get_component_vars()
{
getComp="${1}"
dollar='$'
name=${getComp%%-[0-9]*}
varname=`echo ${name} | tr '-' '_'`
version=${getComp##$${name}-}
version=${version%%.[a-zA-Z]*}
type=${getComp##${name}-${version}}
type=${type:=Unknown}
}

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks