Ticket #17473: force_upgrade.diff

File force_upgrade.diff, 4.2 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 16 years ago)
  • port1.0/portinstall.tcl

     
    128128}
    129129
    130130proc install_main {args} {
    131         global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir pregrefix UI_PREFIX destroot portrevision maintainers ports_force portvariants targets depends_lib PortInfo epoch
     131        global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir pregrefix UI_PREFIX destroot portrevision maintainers ports_force portvariants targets depends_lib PortInfo epoch poison_version poison_revision
    132132
    133133        # Begin the registry entry
    134134        set regref [registry_new $portname $portversion $portrevision $portvariants $epoch]
     
    154154                registry_prop_store $regref depends_run $depends_run
    155155                registry_register_deps $depends_run $portname
    156156    }
     157        if {[info exists poison_version]} {
     158                registry_prop_store $regref poison_version $poison_version
     159    }
     160        if {[info exists poison_revision]} {
     161                registry_prop_store $regref poison_revision $poison_revision
     162    }
    157163        if {[info exists depends_lib]} {
    158164                registry_prop_store $regref depends_lib $depends_lib
    159165                registry_register_deps $depends_lib $portname
  • port1.0/portmain.tcl

     
    4343# define options
    4444options prefix name version revision epoch categories maintainers
    4545options long_description description homepage
     46options poison_version poison_revision
    4647options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
    4748options universal_variant os.universal_supported
    4849
    4950# Export options via PortInfo
    50 options_export name version revision epoch categories maintainers platforms description long_description homepage
     51options_export name version revision epoch categories maintainers platforms description long_description homepage poison_version poison_revision
    5152
    5253# Assign option procedure to default_variants
    5354option_proc default_variants handle_default_variants
     
    6667default filesdir files
    6768default revision 0
    6869default epoch 0
     70default poison_version 0
     71default poison_revision 0
    6972default distname {${portname}-${portversion}}
    7073default worksrcdir {$distname}
    7174default filespath {[file join $portpath $filesdir]}
  • macports1.0/macports.tcl

     
    22522252        }
    22532253    }
    22542254
     2255    if {![info exists portinfo(poison_version)]} {
     2256        ui_error "Invalid port entry for $portname, missing poison_version"
     2257        return 1
     2258    }
     2259    if {![info exists portinfo(poison_revision)]} {
     2260        ui_error "Invalid port entry for $portname, missing poison_revision"
     2261        return 1
     2262    }
     2263    set poison_version $portinfo(poison_version)
     2264    set poison_revision $portinfo(poison_revision)
     2265    if { [rpm-vercomp $poison_version $version_installed] > 0
     2266                    || ([rpm-vercomp $poison_version $version_installed] == 0
     2267                        && [rpm-vercomp $poison_revision $revision_installed] > 0) } {
     2268        ui_debug "${portname} ${poison_version}_${poison_revision} was a significant change"
     2269        ui_debug "    and ${portname} ${poison_version}_${poison_revision} > ${portname} ${version_installed}_${revision_installed}"
     2270        if {![info exists options(ports_do_dependents)]} {
     2271            ui_debug "    upgrading dependents even without -R option"
     2272        }
     2273        if {![info exists options(ports_force)]} {
     2274            ui_debug "    forcing upgrade even without -f option"
     2275        }
     2276        set options(ports_do_dependents) 1
     2277        set options(ports_force) 1
     2278    }
     2279
    22552280    # Check if we have to do dependents
    22562281    if {[info exists options(ports_do_dependents)]} {
    22572282        # We do dependents ..