[MacPorts] #52898: revision convenience

MacPorts noreply at macports.org
Wed Nov 16 21:53:01 CET 2016


#52898: revision convenience
-------------------------+--------------------------------
 Reporter:  RJVB         |      Owner:  macports-tickets@…
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:
 Keywords:               |       Port:
-------------------------+--------------------------------
 I don't think I'm the only one who has a tendency to forget removing a
 revision number after upgrading the port version. Recently that happened
 once too often (and I also wanted a clean way to revbump or not depending
 on platform) so I wrote a little convenience route:

 {{{
 proc revbump_for_version {r v {p 0}} {
     global version revision subport os.platform
     if {${p} eq 0 || ${os.platform} eq ${p}} {
         if {[vercmp ${version} ${v}] > 0} {
             return -code error "remove revbump (revision ${r}) for
 ${subport}"
         }
         uplevel set revision ${r}
     }
 }
 }}}

 In its most basic form it revbumps if the port version is not newer than
 the reference version; otherwise it raises an error forcing me to remove
 the statement.

 Extremely simple, maybe a version of this can be merged into the base
 revision statement at some point.

--
Ticket URL: <https://trac.macports.org/ticket/52898>
MacPorts <https://www.macports.org/>
Ports system for macOS



More information about the macports-tickets mailing list