[105005] trunk/base/src
afb at macports.org
afb at macports.org
Sun Apr 7 08:00:52 PDT 2013
Revision: 105005
https://trac.macports.org/changeset/105005
Author: afb at macports.org
Date: 2013-04-07 08:00:52 -0700 (Sun, 07 Apr 2013)
Log Message:
-----------
Fix rpm and srpm, need src and tmp (and fetch_urls)
Modified Paths:
--------------
trunk/base/src/package1.0/portrpm.tcl
trunk/base/src/package1.0/portsrpm.tcl
trunk/base/src/port1.0/portsandbox.tcl
Modified: trunk/base/src/package1.0/portrpm.tcl
===================================================================
--- trunk/base/src/package1.0/portrpm.tcl 2013-04-07 12:40:37 UTC (rev 105004)
+++ trunk/base/src/package1.0/portrpm.tcl 2013-04-07 15:00:52 UTC (rev 105005)
@@ -49,6 +49,9 @@
# Set up defaults
default rpm.asroot yes
+default rpm.srcdir {${prefix}/src/macports}
+default rpm.tmpdir {${prefix}/var/tmp}
+
set_ui_prefix
proc portrpm::rpm_main {args} {
Modified: trunk/base/src/package1.0/portsrpm.tcl
===================================================================
--- trunk/base/src/package1.0/portsrpm.tcl 2013-04-07 12:40:37 UTC (rev 105004)
+++ trunk/base/src/package1.0/portsrpm.tcl 2013-04-07 15:00:52 UTC (rev 105005)
@@ -45,6 +45,9 @@
options package.destpath
+# Set up defaults
+default srpm.asroot yes
+
set_ui_prefix
proc portsrpm::srpm_main {args} {
@@ -56,9 +59,12 @@
}
proc portsrpm::srpm_pkg {portname portversion portrevision} {
- global UI_PREFIX package.destpath portdbpath destpath workpath distpath prefix categories maintainers description long_description homepage epoch portpath distfiles fetch_urls
+ global UI_PREFIX package.destpath portdbpath destpath workpath distpath prefix categories maintainers description long_description homepage epoch portpath distfiles
global os.platform os.arch os.version os.major
+ set fetch_urls {}
+ portfetch::checkfiles fetch_urls
+
set rpmdestpath ""
if {![string equal ${package.destpath} ${workpath}] && ![string equal ${package.destpath} ""]} {
set pkgpath ${package.destpath}
@@ -224,7 +230,7 @@
if {![info exists $fetch_urls]} {
foreach {url_var distfile} ${fetch_urls} {
if {[string equal $distfile $file]} {
- global portfetch::$url_var
+ global portfetch::$url_var master_sites
set site [lindex [set $url_var] 0]
set file [portfetch::assemble_url $site $distfile]
break
Modified: trunk/base/src/port1.0/portsandbox.tcl
===================================================================
--- trunk/base/src/port1.0/portsandbox.tcl 2013-04-07 12:40:37 UTC (rev 105004)
+++ trunk/base/src/port1.0/portsandbox.tcl 2013-04-07 15:00:52 UTC (rev 105005)
@@ -42,7 +42,7 @@
# sandbox-exec -p '(version 1) (allow default) (deny file-write*) (allow file-write* <filter>)' some-command
proc portsandbox::set_profile {target} {
global os.major portsandbox_profile workpath distpath altprefix \
- package.destpath configure.ccache ccache_dir
+ package.destpath configure.ccache ccache_dir rpm.srcdir rpm.tmpdir
switch $target {
activate -
@@ -66,6 +66,10 @@
pkg {
set allow_dirs [list ${package.destpath}]
}
+ rpm -
+ srpm {
+ set allow_dirs [list ${rpm.srcdir} ${rpm.tmpdir}]
+ }
}
# TODO: remove altprefix support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130407/93f40c56/attachment.html>
More information about the macports-changes
mailing list