Commits

Anonymous committed 54c2e4e

CWS-TOOLING: integrate CWS sysui37
2009-05-19 12:44:43 +0200 ihi r272072 : #i101914# rpm installer fix
2009-05-18 19:08:13 +0200 ihi r272047 : #i98650# rpm rebuild issue
2009-05-18 16:52:13 +0200 ihi r272036 : #i101916# rpm fix
2009-05-18 16:39:55 +0200 ihi r272035 : #i101914# sysui rpm fix

Comments (0)

Files changed (9)

smoketestoo_native/smoketest.pl

 #                       #
 #########################
 $is_debug = 0;           # run without executing commands
-$is_command_infos = 0;   # print command details before exec
+$is_command_infos = 1;   # print command details before exec
 $is_protocol_test = 0;
 $is_remove_on_error = 0;
 $is_remove_at_end = 1;
 				$rpmdir = "$dest_installdir" . "rpm" . $PathSeparator; 
 				createPath ($optdir, $error_setup);  
 				createPath ($rpmdir, $error_setup);  
-				$Command = "rpm --initdb --dbpath $rpmdir";
+				my $ld_library_backup = $ENV{LD_LIBRARY_PATH};
+				if ( defined $ENV{SYSBASE}) {
+					my $sysbase=$ENV{SYSBASE};
+					if ( "$ld_library_backup" eq "" ) {
+						$ENV{LD_LIBRARY_PATH} = "$sysbase/usr/lib";
+					} else {
+						$ENV{LD_LIBRARY_PATH} = "$ld_library_backup:$sysbase/lib";
+					}
+				}
+				$Command = "rpm --initdb --define \"_dbpath $rpmdir\"";
 				execute_Command ($Command, $error_setup, $show_Message, $command_withoutOutput);
 				$mask = "\\.rpm\$";
 				getSubFiles ("$installsetpath", \@DirArray, $mask);
 					if ( ($file =~ /-menus-/) or ($file =~ /^adabas/) or (/^j2re-/) or ($file =~ /-gnome-/) ) {
 						next;
 					}
-					$Command = "rpm --install --ignoresize --nodeps -vh --relocate /opt=${dest_installdir}opt --dbpath $rpmdir $installsetpath$file";
+					$Command = "rpm --define \"_dbpath $rpmdir\" --install --ignoresize --nodeps -vh --relocate /opt=${dest_installdir}opt $installsetpath$file";
 					execute_Command ($Command, $error_setup, $show_Message, $command_withoutErrorcheck | $command_withoutOutput);
-				} 
+				}
+				$ENV{LD_LIBRARY_PATH}=$ld_library_backup;
 			}
 		}
 		elsif ( (defined($system)) && ($system eq "SunOS") ) {

solenv/bin/modules/installer/epmfile.pm

 
 		# saving globally for later usage
 		$installer::globals::rpmcommand = $rpmcommand;
-		$installer::globals::rpmquerycommand = "rpm"; # For queries "rpm" is used, not "rpmbuild" (for this call the LD_LIBRARY_PATH is not required!)
+		$installer::globals::rpmquerycommand = "rpm";
 
 		my $target = "";
 		if ( $installer::globals::compiler =~ /unxlngi/) { $target = "i586"; }
 			$buildrootstring = "--buildroot=$buildroot";
 		} 
 
-		my $systemcall = "$rpmcommand -bb $specfilename --target $target $buildrootstring 2\>\&1 |";
+		my $systemcall = "$rpmcommand -bb --define \"_unpackaged_files_terminate_build  0\" $specfilename --target $target $buildrootstring 2\>\&1 |";
 
 		installer::logger::print_message( "... $systemcall ...\n" );
 

solenv/bin/modules/installer/xpdinstaller.pm

 	if (( $installer::globals::islinuxrpmbuild ) && ( $isrpmfile ))
 	{	
 		# if ( ! $installer::globals::rpmquerycommand ) { installer::exiter::exit_program("ERROR: rpm not found for querying packages!", "get_size_value"); }
-		if ( ! $installer::globals::rpmquerycommand ) { $installer::globals::rpmquerycommand = "rpm"; } # For queries "rpm" is used, not "rpmbuild"
+		if ( ! $installer::globals::rpmquerycommand ) { $installer::globals::rpmquerycommand = "rpm"; }
 
 		my $systemcall = "$installer::globals::rpmquerycommand -qp --queryformat \"\[\%\{FILESIZES\}\\n\]\" $packagename 2\>\&1 |";
+		my $ld_library_backup = $ENV{LD_LIBRARY_PATH};
+		if ( defined $ENV{SYSBASE}) {
+			my $sysbase = $ENV{SYSBASE};
+            if ( !defined ($ld_library_backup) or ("$ld_library_backup" eq "") ) {
+				$ld_library_backup = "" if ! defined $ld_library_backup;
+				$ENV{LD_LIBRARY_PATH} = "$sysbase/usr/lib";
+			} else {
+				$ENV{LD_LIBRARY_PATH} = "$ld_library_backup:$sysbase/lib";
+			}
+		}
 		my ($rpmout, $error) = make_systemcall_allowing_error($systemcall, 0, 1);
 		# Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH 
 		if ( $error )
 			($rpmout, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
 			if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_size_value"); }
 		}
+		$ENV{LD_LIBRARY_PATH} = $ld_library_backup;
 		$value = do_sum($rpmout);		# adding all filesizes in bytes
 		$value = $value/1000;
 
 		}
 		
 		# if ( ! $installer::globals::rpmquerycommand ) { installer::exiter::exit_program("ERROR: rpm not found for querying packages!", "get_fullpkgname_value"); }
-		if ( ! $installer::globals::rpmquerycommand ) { $installer::globals::rpmquerycommand = "rpm"; } # For queries "rpm" is used, not "rpmbuild"
+		if ( ! $installer::globals::rpmquerycommand ) { $installer::globals::rpmquerycommand = "rpm"; }
 		my $systemcall = "$installer::globals::rpmquerycommand -qp $packagename |";
-		# my $returnarray = make_systemcall($systemcall, 0);
-
+		my $ld_library_backup = $ENV{LD_LIBRARY_PATH};
+		if ( defined $ENV{SYSBASE}) {
+			my $sysbase = $ENV{SYSBASE};
+    		if ( !defined ($ld_library_backup) or ("$ld_library_backup" eq "") ) {
+				$ld_library_backup = "" if ! defined $ld_library_backup;
+				$ENV{LD_LIBRARY_PATH} = "$sysbase/usr/lib";
+			} else {
+				$ENV{LD_LIBRARY_PATH} = "$ld_library_backup:$sysbase/lib";
+			}
+		}
 		my ($returnarray, $error) = make_systemcall_allowing_error($systemcall, 0, 1);
 		# Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH 
 		if ( $error )
 			($returnarray, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
 			if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_fullpkgname_value"); }
 		}
-
 		$value = ${$returnarray}[0];
+		$ENV{LD_LIBRARY_PATH} = $ld_library_backup;
 		installer::remover::remove_leading_and_ending_whitespaces(\$value);
 
 		my $rpmname = $packagename;

sysui/desktop/freedesktop/makefile.mk

 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
 SPECFILE=$(TARGET)-menus.spec
-RPMFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.rpm)
+RPMFLAGFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.flag)
 
 .ENDIF
 
 
 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
-$(RPMFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
+$(RPMFLAGFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
 
 .ENDIF

sysui/desktop/mandriva/makefile.mk

 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
 SPECFILE=$(TARGET)-menus.spec
-RPMFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.rpm)
+RPMFLAGFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.flag)
 
 .ENDIF
 
 
 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
-$(RPMFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
+$(RPMFLAGFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
 
 .ENDIF

sysui/desktop/redhat/makefile.mk

 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
 SPECFILE=$(TARGET)-menus.spec
-RPMFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.rpm)
+RPMFLAGFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.flag)
 
 .ENDIF
 
 
 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
-$(RPMFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
+$(RPMFLAGFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
 
 .ENDIF

sysui/desktop/suse/makefile.mk

 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
 SPECFILE=$(TARGET)-menus.spec
-RPMFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.rpm)
+RPMFLAGFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i-$(SPECFILE:b)-$(PKGVERSION.$i)-$(PKGREV).noarch.flag)
 
 .ENDIF
 
 
 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
-$(RPMFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
+$(RPMFLAGFILES) : $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag
 
 .ENDIF

sysui/desktop/tg_rpm.mk

 
 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"
 
-ALLTAR : $(RPMFILES)
+ALLTAR : $(RPMFLAGFILES)
 
-$(RPMFILES) : $(SPECFILE)
+$(RPMFLAGFILES) : $(SPECFILE)
 	@-$(MKDIRHIER) $(@:d)
 	-$(RM) $(@:d)$(@:b:s/-/ /:1)-$(SPECFILE:b)-*
 	$(RPM) -bb $< $(RPMMACROS) \
 		--define "unixfilename $(UNIXFILENAME.$(@:b:s/-/ /:1))" \
 		--define "iconprefix $(ICONPREFIX.$(@:b:s/-/ /:1))" \
 		--define "version $(PKGVERSION.$(@:b:s/-/ /:1))" \
-		--define "release $(PKGREV)"
+		--define "release $(PKGREV)" \
+		--define "_unpackaged_files_terminate_build  0" && $(TOUCH) $@
 .ENDIF

sysui/desktop/util/makefile.mk

 
 $(RPMTARFILES) : $(PKGDIR)
 	$(MKDIRHIER) $(@:d)
-	tar -C $(PKGDIR:d:d) -cf - $(PKGDIR:f)$/{$(shell @cd $(PKGDIR); ls $(@:b:b:s/-/ /:1)*)} | gzip > $@
+	tar -C $(PKGDIR:d:d) -cf - $(PKGDIR:f)$/{$(shell cd $(PKGDIR); ls $(@:b:b:s/-/ /:1)*.rpm)} | gzip > $@
 
 .ENDIF # "$(TARFILE)" != ""