[Gambas-devel] Prob: RPM SuSE8.2 not working

Benoit Minisini gambas at ...1...
Wed Oct 27 18:14:01 CEST 2004


On Wednesday 27 October 2004 07:42, ron wrote:
> On SuSE 8.2 there is no rpmbuild executable.
>
> Only rpm program is /bin/rpm only as version rpm-3.0.6-555.i586.rpm
> Making a soft link rpmbuild let me pass the error and say sucess at
> the end.
> In ~/RPM directoy are following
>
> BUILD		:empty
> BUILD/gambas	:project copy
> RPMS		:empty
> RPMS/noarch	:empty
> SOURCES		:gambas-gambas-0.99.tar.bz2
> SPECS		:gambas-gambas.spec
> SRPMS		:empty
> tmp		:empty
>
> Attachments:
> The spec file.
> The result in from text box after finish.
> The known build options for version 3.0.6-555
>
> After finish it is easy to click OK to close the form, however it
> starts again. Cancel sounds a bit stupid, I do not want that. :)
>
> In project.module there is a test for existing rpmbuild.
> This does not work. The process starts without that rpmbuild program ???
>
> PUBLIC SUB MakeInstall()
>
>   IF MakeExecutable(TRUE, TRUE) THEN RETURN
>   IF CheckProgram("rpmbuild") THEN
>     Message.Error(("rpmbuild is not installed on your system."))
>     RETURN
>   ENDIF
>   FMakeInstall.ShowModal
>
> END
>
>
> The whereis returned
>
> without link:
> terminator:/opt/gambas # whereis rpmbuild
> rpmbuild:
>
> with link and dummy .noway
> terminator:/opt/gambas # whereis rpmbuild
> rpmbuild: /bin/rpmbuild.noway /bin/rpmbuild
>
> In Project.module
> PUBLIC FUNCTION CheckProgram(sProg AS String) AS Boolean
>
>   DIM sTemp AS String
>   DIM bError AS Boolean
>
>   sTemp = Temp$
>   SHELL "whereis " & sProg & " > " & sTemp WAIT
>   bError = NOT (Trim(File.Load(sTemp)) LIKE (sProg & ":*"))
>   KILL sTemp
>
>   RETURN bError
>
> END
>
>
> Maybe change:
>  bError = NOT (Trim(File.Load(sTemp)) LIKE (sProg & ":*"))
> to
>  sProg = "/" & sProg & " "
>  sTemp2 = File.Load(sTemp) & " "
> '    in sTemp2 = "rpmbuild: /bin/rpmbuild /bin/rpmbuild.noway "
>  sTemp2 = mid$(sTemp2,instr(sTemp2,":")+1) & " " 'get right side of ':'
>  bError = NOT (instr(sTemp2,sProg) > 0)

Thanks for the bug report.

Now the program is correctly checked, and if rpmbuild is not found, then rpm 
is used if present. 'OK' and 'Cancel' were renamed as 'Make package' and 
'Close'.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list