[69379] branches/gsoc10-mpwa/bin/add_ports
jrozner at macports.org
jrozner at macports.org
Fri Jul 2 14:44:10 PDT 2010
Revision: 69379
http://trac.macports.org/changeset/69379
Author: jrozner at macports.org
Date: 2010-07-02 14:44:07 -0700 (Fri, 02 Jul 2010)
Log Message:
-----------
fixed bug where the final port wasn't added
Modified Paths:
--------------
branches/gsoc10-mpwa/bin/add_ports
Modified: branches/gsoc10-mpwa/bin/add_ports
===================================================================
--- branches/gsoc10-mpwa/bin/add_ports 2010-07-02 21:29:04 UTC (rev 69378)
+++ branches/gsoc10-mpwa/bin/add_ports 2010-07-02 21:44:07 UTC (rev 69379)
@@ -9,7 +9,6 @@
require File.expand_path(RAILS_ROOT + '/app/models/category.rb', __FILE__)
require File.expand_path(RAILS_ROOT + '/app/models/port.rb', __FILE__)
require File.expand_path(RAILS_ROOT + '/app/models/port_dependency.rb', __FILE__)
-require File.expand_path(RAILS_ROOT + '/app/models/supplemental_category.rb', __FILE__)
if File.exists?(TIME_FILE)
$mtime = File.stat(TIME_FILE).mtime.to_i
@@ -25,6 +24,7 @@
fp = IO.popen("#{NEW_PORTS} -m #{$mtime} #{PORT_INDEX}")
new_ports = fp.read.split("\n")
+new_ports << ""
new_ports.each do |line|
unless (line == "")
@@ -42,7 +42,8 @@
:category_id => Category.find_by_name($hashed_data[:categories].split(" ")[0]).id,
:variants => $hashed_data[:variants],
:maintainers => $hashed_data[:maintainers],
- :platforms => $hashed_data[:platforms]
+ :platforms => $hashed_data[:platforms],
+ :categories => $hashed_data[:categories]
})
$ports << [$hashed_data, port]
port.save
@@ -51,13 +52,6 @@
end
$ports.each do |port|
- categories = port[0][:categories].split(" ")
- unless (categories.count < 2)
- categories[1..-1].each do |category|
- port[1].supplemental_categories.build({:name => category}).save!
- end
- end
-
dependencies = Array.new
unless port[0][:depends_lib].nil?
dependencies << port[0][:depends_lib].split(" ")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100702/c0822db1/attachment.html>
More information about the macports-changes
mailing list