[101071] trunk/base/src/package1.0

blair at macports.org blair at macports.org
Thu Jan 3 15:48:34 PST 2013


Revision: 101071
          https://trac.macports.org/changeset/101071
Author:   blair at macports.org
Date:     2013-01-03 15:48:34 -0800 (Thu, 03 Jan 2013)
Log Message:
-----------
portpkg/portmpkg: include port revision number in .pkg filenames.

Modified Paths:
--------------
    trunk/base/src/package1.0/portmpkg.tcl
    trunk/base/src/package1.0/portpkg.tcl

Modified: trunk/base/src/package1.0/portmpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portmpkg.tcl	2013-01-03 23:48:31 UTC (rev 101070)
+++ trunk/base/src/package1.0/portmpkg.tcl	2013-01-03 23:48:34 UTC (rev 101071)
@@ -96,7 +96,7 @@
         }
     }
 
-    lappend result [list $portinfo(name) $portinfo(version) $mport]
+    lappend result [list $portinfo(name) $portinfo(version) $portinfo(revision) $mport]
     return $result
 }
 
@@ -126,11 +126,11 @@
     set mpkgpath ${package.destpath}/${portname}-${portversion}.mpkg
 
     if {${package.flat} && ${os.major} >= 10} {
-        set pkgpath ${package.destpath}/${portname}-${portversion}-component.pkg
+        set pkgpath ${package.destpath}/${portname}-${portversion}_${portrevision}-component.pkg
         set packages_path ${workpath}/mpkg_packages
         set resources_path ${workpath}/mpkg_resources
     } else {
-        set pkgpath ${package.destpath}/${portname}-${portversion}.pkg
+        set pkgpath ${package.destpath}/${portname}-${portversion}_${portrevision}.pkg
         set packages_path ${mpkgpath}/Contents/Packages
         set resources_path ${mpkgpath}/Contents/Resources
     }
@@ -144,21 +144,22 @@
     foreach dep $deps {
         set name [lindex $dep 0]
         set vers [lindex $dep 1]
-        set mport [lindex $dep 2]
+        set rev [lindex $dep 2]
+        set mport [lindex $dep 3]
         # don't re-package ourself
         if {$name != $portname} {
             make_one_package $name $vers $mport
             if {${package.flat} && ${os.major} >= 10} {
-                lappend dependencies org.macports.${name} ${name}-${vers}-component.pkg
+                lappend dependencies org.macports.${name} ${name}-${vers}_${rev}-component.pkg
             } else {
-                lappend dependencies ${name}-${vers}.pkg
+                lappend dependencies ${name}-${vers}_${rev}.pkg
             }
         }
     }
     if {${package.flat} && ${os.major} >= 10} {
-        lappend dependencies org.macports.${portname} ${portname}-${portversion}-component.pkg
+        lappend dependencies org.macports.${portname} ${portname}-${portversion}_${portrevision}-component.pkg
     } else {
-        lappend dependencies ${portname}-${portversion}.pkg
+        lappend dependencies ${portname}-${portversion}_${portrevision}.pkg
     }
 
     # copy our own pkg into the mpkg

Modified: trunk/base/src/package1.0/portpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portpkg.tcl	2013-01-03 23:48:31 UTC (rev 101070)
+++ trunk/base/src/package1.0/portpkg.tcl	2013-01-03 23:48:34 UTC (rev 101071)
@@ -92,7 +92,7 @@
     file copy -force -- [getportresourcepath $porturl "port1.0/package/background.tiff"] ${package.resources}/${language}.lproj/background.tiff
 
     if {${package.flat} && ${os.major} >= 9} {
-        write_distribution "${workpath}/Distribution" $subport $version
+        write_distribution "${workpath}/Distribution" $subport $version $revision
     }
 }
 
@@ -113,7 +113,7 @@
     package.flat package.destpath portpath os.version os.major \
     package.resources package.scripts portpkg::packagemaker portpkg::language
 
-    set pkgpath "${package.destpath}/${portname}-${portversion}.pkg"
+    set pkgpath "${package.destpath}/${portname}-${portversion}_${portrevision}.pkg"
     if {[file readable $pkgpath] && ([file mtime ${pkgpath}] >= [file mtime ${portpath}/Portfile])} {
         ui_msg "$UI_PREFIX [format [msgcat::mc "Package for %s-%s_%s is up-to-date"] ${portname} ${portversion} ${portrevision}]"
         return 0
@@ -361,7 +361,7 @@
     close $infofd
 }
 
-proc portpkg::write_distribution {dfile portname portversion} {
+proc portpkg::write_distribution {dfile portname portversion portrevision} {
     global macosx_deployment_target
     set portname [xml_escape $portname]
     set portversion [xml_escape $portversion]
@@ -382,7 +382,7 @@
     <choice id=\"org.macports.${portname}\" visible=\"false\">
         <pkg-ref id=\"org.macports.${portname}\"/>
     </choice>
-    <pkg-ref id=\"org.macports.${portname}\">${portname}-${portversion}-component.pkg</pkg-ref>
+    <pkg-ref id=\"org.macports.${portname}\">${portname}-${portversion}_${portrevision}-component.pkg</pkg-ref>
 </installer-gui-script>
 "
     close $dfd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130103/7e9f30f6/attachment-0001.html>


More information about the macports-changes mailing list