• R/O
  • SSH
  • HTTPS

xqt: Commit


Commit MetaInfo

Revision1111 (tree)
Zeit2009-10-28 12:50:41
Autortmurakam

Log Message

1.0.6 candidate

Ändern Zusammenfassung

Diff

--- xqt2/trunk/xpkg/lib/pkgbuild.rb (revision 1110)
+++ xqt2/trunk/xpkg/lib/pkgbuild.rb (revision 1111)
@@ -243,8 +243,8 @@
243243 # Build normal packages (other than ipkg)
244244 class GenPkgBuild < PkgBuild
245245 def initialize
246- @pkgsuffix = ".xpkg"
247- @devpkgsuffix = ".xdevpkg"
246+ @pkgsuffix = ".tar.gz"
247+ @devpkgsuffix = ".tar.gz"
248248 end
249249
250250 # generate package file
--- xqt2/trunk/xpkg/lib/depends.rb (revision 1110)
+++ xqt2/trunk/xpkg/lib/depends.rb (revision 1111)
@@ -81,11 +81,37 @@
8181 @pkgs = Array.new
8282 end
8383
84+ # find deffiles
85+ def finddeffiles(target)
86+ @target = target
87+
88+ @deflist = loaddeflist_from_cache
89+ if (@deflist == nil)
90+ # no cache
91+ puts "Searching pkgdef files..." if ($verbose)
92+
93+ @deflist = `find . -name "pkgdef" -print`.split
94+
95+ `find . -name "pkgdef.list" -print`.split.each do |list|
96+ dir = list.gsub(%r|pkgdef.list$|, "")
97+
98+ IO.readlines(list).each do |line|
99+ line.chop!
100+ line.strip!
101+ next if (line == "" || line =~ /^#/)
102+
103+ @deflist.push(dir + line)
104+ end
105+ end
106+
107+ savedeflist_to_cache(@deflist)
108+ end
109+ end
110+
84111 # resolve dependency
85- def resolve(target)
86- @target = target
87- loaddeffiles
88- resolvedeps
112+ def resolve()
113+ loaddeffiles()
114+ resolvedeps()
89115 end
90116
91117 # get resulted directory list
@@ -102,50 +128,18 @@
102128 return if (list == nil)
103129 newlist = Array.new
104130
105- @pkgs.each do |p|
106- match = list.find{|i| p.deffile.include?(i)}
131+ @deflist.each do |f|
132+ match = list.find{|dir| f.include?("/" + dir + "/")}
107133
108134 if ((!isSkip && match) || (isSkip && !match))
109- newlist.push(p)
135+ newlist.push(f)
110136 end
111137 end
112- @pkgs = newlist
138+ @deflist = newlist
113139 end
114140
115141 # private methods
116142
117- # load definition files
118- def loaddeffiles
119- deflist = loaddeflist_from_cache
120- if (deflist == nil)
121- # no cache
122- puts "Searching pkgdef files..." if ($verbose)
123-
124- deflist = `find . -name "pkgdef" -print`.split
125-
126- `find . -name "pkgdef.list" -print`.split.each do |list|
127- dir = list.gsub(%r|pkgdef.list$|, "")
128-
129- IO.readlines(list).each do |line|
130- line.chop!
131- line.strip!
132- next if (line == "" || line =~ /^#/)
133-
134- deflist.push(dir + line)
135- end
136- end
137-
138- savedeflist_to_cache(deflist)
139- end
140-
141- deflist.each do |f|
142- puts "Loading : #{f}" if ($verbose)
143- pkg = PkgDep.new
144- pkg.load(f, @target)
145- @pkgs.push(pkg)
146- end
147- end
148-
149143 def savedeflist_to_cache(deflist)
150144 open(DeffilesCache, "w") do |fh|
151145 deflist.each do |line|
@@ -174,6 +168,16 @@
174168 end
175169 end
176170
171+ # load definition files
172+ def loaddeffiles
173+ @deflist.each do |f|
174+ puts "Loading : #{f}" if ($verbose)
175+ pkg = PkgDep.new
176+ pkg.load(f, @target)
177+ @pkgs.push(pkg)
178+ end
179+ end
180+
177181 # resolve dependency
178182 def resolvedeps
179183 # first, purge unknown package names
--- xqt2/trunk/xpkg/lib/getsrc.rb (revision 1110)
+++ xqt2/trunk/xpkg/lib/getsrc.rb (revision 1111)
@@ -47,7 +47,7 @@
4747
4848 if (file =~ /^local:(.*)/)
4949 file = $1
50- fullpath = "../" + file # ad hoc...
50+ fullpath = Dir.pwd + "/" + file # ad hoc...
5151
5252 if (!FileTest.exist?(file))
5353 STDERR.puts "no file: #{file}"
@@ -121,7 +121,7 @@
121121 system("mkdir -p #{@builddir}") if (!FileTest.exist?(@builddir))
122122 cmd = "cd #{@builddir} && #{cat} #{file} | patch -p#{patchlevel}"
123123 elsif (file =~ /\.tar\.[bg]z2?$/ || file =~ /\.tgz$/ || file =~ /\.tar$/)
124- # extract
124+ # extract (do not chdir)
125125 cmd = "#{cat} #{file} | tar xvf -"
126126 else
127127 # copy file to builddir
--- xqt2/trunk/xpkg/ChangeLog (revision 1110)
+++ xqt2/trunk/xpkg/ChangeLog (revision 1111)
@@ -1,3 +1,9 @@
1+* 2009/10/28 : Takuya Murakami <tmurakam@mtd.biglobe.ne.jp>
2+ - xpkg-batch: add -c option instead of -f option.
3+ - fix resolve dependency handling
4+ - modify local:... handling.
5+ - change file prefix to ".tar.gz"
6+
17 * 2005/10/5 ver 1.0.5 : Takuya Murakami <tmurakam@mtd.biglobe.ne.jp>
28 - xpkg-batch: use cache file
39
Show on old repository browser