[137800] branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv. tcl

ijackson at macports.org ijackson at macports.org
Sat Jun 20 01:34:55 PDT 2015


Revision: 137800
          https://trac.macports.org/changeset/137800
Author:   ijackson at macports.org
Date:     2015-06-20 01:34:55 -0700 (Sat, 20 Jun 2015)
Log Message:
-----------
Assign [$solvable cget -id] to $solvid
Assign [$solvable cget -d] to a variable $solvid as it is
used multiple times to set repodata. So instead of calling 
the cget -id on $solvable everytime, call it once and 
save it to a local variable.

Modified Paths:
--------------
    branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl

Modified: branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl	2015-06-20 06:29:54 UTC (rev 137799)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl	2015-06-20 08:34:55 UTC (rev 137800)
@@ -100,27 +100,24 @@
                             -evr "$portinfo(epoch)@$portinfo(version)-$portinfo(revision)" \
                             -arch "i386"
 
+                            set solvid [$solvable cget -id]
+
                             ## Add extra info to repodata i.e. Summary, Description, etc to the solvables
                             #  Valid constant fields can be found at src/knownid.h of libsolv.
                             if {[info exists portinfo(description)]} {
-                                $repodata set_str [$solvable cget -id] $solv::SOLVABLE_SUMMARY \
-                                $portinfo(description)
+                                $repodata set_str $solvid $solv::SOLVABLE_SUMMARY $portinfo(description)
                             }
                             if {[info exists portinfo(long_description)]} {
-                                $repodata set_str [$solvable cget -id] $solv::SOLVABLE_DESCRIPTION \
-                                $portinfo(long_description)
+                                $repodata set_str $solvid $solv::SOLVABLE_DESCRIPTION $portinfo(long_description)
                             }
                             if {[info exists portinfo(license)]} {
-                                $repodata set_str [$solvable cget -id] $solv::SOLVABLE_LICENSE \
-                                $portinfo(license)
+                                $repodata set_str $solvid $solv::SOLVABLE_LICENSE $portinfo(license)
                             }
                             if {[info exists portinfo(homepage)]} {
-                                $repodata set_str [$solvable cget -id] $solv::SOLVABLE_URL \
-                                $portinfo(homepage)
+                                $repodata set_str $solvid $solv::SOLVABLE_URL $portinfo(homepage)
                             }
                             if {[info exists portinfo(categories)]} {
-                                $repodata set_str [$solvable cget -id] $solv::SOLVABLE_CATEGORY \
-                                $portinfo(categories)
+                                $repodata set_str $solvid $solv::SOLVABLE_CATEGORY $portinfo(categories)
                             }
 
                             ## Set portinfo of each solv object. Map it to correct solvid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150620/a2d2bc3e/attachment.html>


More information about the macports-changes mailing list