[93529] trunk/dports/databases/oracle-instantclient/Portfile
ryandesign at macports.org
ryandesign at macports.org
Fri May 25 14:53:07 PDT 2012
Revision: 93529
https://trac.macports.org/changeset/93529
Author: ryandesign at macports.org
Date: 2012-05-25 14:53:07 -0700 (Fri, 25 May 2012)
Log Message:
-----------
oracle-instantclient: don't print an unconditional warning that fetch might fail; print a conditional warning if and when it actually fails. Also, ensure the universal variant exists before allowing it to be used.
Modified Paths:
--------------
trunk/dports/databases/oracle-instantclient/Portfile
Modified: trunk/dports/databases/oracle-instantclient/Portfile
===================================================================
--- trunk/dports/databases/oracle-instantclient/Portfile 2012-05-25 21:35:46 UTC (rev 93528)
+++ trunk/dports/databases/oracle-instantclient/Portfile 2012-05-25 21:53:07 UTC (rev 93529)
@@ -64,7 +64,7 @@
# merge() requires universal_archs to be set correctly. Since we use merge()
# even when not building universal we must always set universal_archs correctly.
-if {[variant_isset universal]} {
+if {[variant_exists universal] && [variant_isset universal]} {
# The only supported universal build is x86_64 i386.
configure.universal_archs x86_64 i386
} else {
@@ -103,20 +103,34 @@
ui_msg "is available."
ui_msg ""
}
- ui_warn "MacPorts may not be able to download the necessary distfiles for"
- ui_warn "${name}. If you get a checksum error, please visit this URL:"
- ui_warn ""
- ui_warn " ${homepage}"
- ui_warn ""
- ui_warn "and download these files manually:"
- ui_warn ""
+}
+
+post-fetch {
+ set bad_distfiles {}
foreach distfile ${distfiles} {
- ui_warn " [strsed ${distfile} {/:.*$//}]"
+ set distfile [strsed ${distfile} {/:.*$//}]
+ if {![catch {strsed [exec [findBinary file $portutil::autoconf::file_path] ${distpath}/${distfile} --brief --mime] {s/;.*$//}} mimetype] && "text/html" == ${mimetype}} {
+ lappend bad_distfiles ${distfile}
+ file delete ${distpath}/${distfile}
+ }
}
- ui_warn ""
- ui_warn "and place them in this directory:"
- ui_warn ""
- ui_warn " ${distpath}"
+ if {[llength ${bad_distfiles}] > 0} {
+ ui_error "MacPorts was not able to download the necessary distfiles for ${name}."
+ ui_error "Please visit this URL:"
+ ui_error ""
+ ui_error " ${homepage}"
+ ui_error ""
+ ui_error "and download these files manually:"
+ ui_error ""
+ foreach distfile ${bad_distfiles} {
+ ui_error " ${distfile}"
+ }
+ ui_error ""
+ ui_error "and place them in this directory:"
+ ui_error ""
+ ui_error " ${distpath}"
+ return -code error "missing distfiles"
+ }
}
extract {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120525/79ef6c92/attachment.html>
More information about the macports-changes
mailing list