Changes between Initial Version and Version 1 of Ticket #37334, comment 6


Ignore:
Timestamp:
Jan 8, 2013, 9:38:21 AM (11 years ago)
Author:
petrrr
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37334, comment 6

    initial v1  
    11
    2 Here the hook I would add to handle deactivation. However, I have some doubt on how to handle the super-/subport deactivation. In case the port was installed via its superport (py-obspy-core) it should be deactivated as well, so I added the respective line. But this may cause an error if this py-obspy-core is not installed.
     2I added the requested "deactivate hack". Tested on my system for different cases. I included some minor modifications.
    33
    4 How to handle this cleanly? Any suggestion? Thanks!
     4NOTE: Python 2.5 is not supported by this version of Obspy.
    55
    6 
    7 {{{
    8 # hook to deactivate old installations of py-obspy-core ("deactivate hack")
    9 pre-activate {
    10     if {[file exists ${prefix}/bin/obspy-runtests-2.5
    11         && ![catch {set vers [lindex [registry_active py26-obspy-core] 0]}]
    12         && [rpm-vercomp [lindex $vers 1] 0.8.0] < 0} {
    13         registry_deactivate py-obspy-core "" [list ports_nodepcheck 1]
    14         registry_deactivate py25-obspy-core "" [list ports_nodepcheck 1]
    15     }
    16     if {[file exists ${prefix}/bin/obspy-runtests-2.6
    17         && ![catch {set vers [lindex [registry_active py26-obspy-core] 0]}]
    18         && [rpm-vercomp [lindex $vers 1] 0.8.0] < 0} {
    19         registry_deactivate py-obspy-core "" [list ports_nodepcheck 1]
    20         registry_deactivate py26-obspy-core "" [list ports_nodepcheck 1]
    21     }
    22     if {[file exists ${prefix}/bin/obspy-runtests-2.7
    23         && ![catch {set vers [lindex [registry_active py26-obspy-core] 0]}]
    24         && [rpm-vercomp [lindex $vers 1] 0.8.0] < 0} {
    25         registry_deactivate py-obspy-core "" [list ports_nodepcheck 1]
    26         registry_deactivate py27-obspy-core "" [list ports_nodepcheck 1]
    27     }
    28 }
    29 }}}
     6