[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Momonga-devel.en:00023] OmoiKondara,v 1.126
- To: devel.en@xxxxxxxxxxxxxxxxx
- From: zunda <zunda616e@xxxxxxxxxxx>
- Date: Wed, 10 Sep 2003 18:07:37 +0900 (JST)
Hi,
I edited OmoiKondara as follows and have committed it as revision 1.126.
Please let the list know if there is something wrong.
Goals of the modification are to:
* Save the downloaded sources even if the package fails to build,
* Avoid unwanted run of grep, and
* Install the main package when a -devel package is installed.
There might be something more needs to be corrected to install the main
package when a -devel package is installed. Moreover, the modification
only applies for -devel packages. To install main packages for sub
packages, we have to go deeper.
Cheers,
zunda
Index: OmoiKondara
===================================================================
RCS file: /home/cvs/tools/OmoiKondara,v
retrieving revision 1.125
diff -u -r1.125 OmoiKondara
--- OmoiKondara 23 Aug 2003 17:27:14 -0000 1.125
+++ OmoiKondara 10 Sep 2003 08:41:01 -0000
@@ -350,11 +350,12 @@
end
end
file.sub!(re, $URL_ALIAS[re]) if re
- if exec_command("#{$FTP_CMD} #{file}").nonzero? and !$MIRROR_FIRST
+ status = exec_command("#{$FTP_CMD} #{file}")
+ if status.nonzero? and !$MIRROR_FIRST
# file retrieve error
status = get_from_mirror(n)
end
- end
+ end
Dir.chdir "../.."
end
else
@@ -729,7 +730,6 @@
def clean_up(pkg, install)
prepare_outputdirs
- backup_nosources
backup_rpms(install, pkg)
exec_command "rpmbuild --rmsource --rcfile rpmrc #{pkg}.spec"
File.delete "rpmrc"
@@ -894,7 +894,7 @@
return if flag
end
else # specname.nil?
- pkg = `rpm -q --whatprovides --queryformat "%{name}\\n" #{pkg}`.chomp
+ `rpm -q --whatprovides --queryformat "%{name}\\n" #{pkg}`
return if $?.to_i == 0
end # specname.nil?
if !File.directory?(specname||pkg) then
@@ -930,18 +930,26 @@
if specname and $DEPGRAPH then
spec = $DEPGRAPH.db.specs[specname]
pkg2 = spec.packages.select{|a| a.name == pkg}[0]
- pkg2.requires.each do |req|
- if not $SYSTEM_PROVIDES.has_name?(req.name) then
- $DEPGRAPH.db.packages[req.name].each do |a|
- build_and_install(a.spec, rpmflg)
+ if pkg2 then
+ pkg2.requires.each do |req|
+ if not $SYSTEM_PROVIDES.has_name?(req.name) then
+ if $DEPGRAPH.db.packages[req.name] then
+ $DEPGRAPH.db.packages[req.name].each do |a|
+ build_and_install(a.spec, rpmflg)
+ end
+ end
end
end
+ pkg = pkg2.name
end
- pkgs = Dir.glob("#{topdir}/#{$ARCH}/#{pkg2.name}-*.rpm")
- pkgs += Dir.glob("#{topdir}/noarch/#{pkg2.name}-*.rpm")
- else
- pkgs = Dir.glob("#{topdir}/#{$ARCH}/#{pkg}-*.rpm")
- pkgs += Dir.glob("#{topdir}/noarch/#{pkg}-*.rpm")
+ end
+ pkgs = Dir.glob("#{topdir}/#{$ARCH}/#{pkg}-*.rpm")
+ pkgs += Dir.glob("#{topdir}/noarch/#{pkg}-*.rpm")
+
+ if /-devel/ =~ pkg then
+ mainpkg = pkg.sub( /-devel/, '' )
+ pkgs += Dir.glob("#{topdir}/#{$ARCH}/#{mainpkg}-*.rpm")
+ pkgs += Dir.glob("#{topdir}/noarch/#{mainpkg}-*.rpm")
end
if not pkgs.empty? then
@@ -1264,6 +1272,10 @@
throw :exit_buildme, 2
end
cp_to_tree
+ Dir.chdir "#{$hTAG['NAME']}"
+ prepare_outputdirs
+ backup_nosources
+ Dir.chdir '..'
throw :exit_buildme, do_rpm(pkg)
else
throw :exit_buildme, 1
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/