Opened 18 years ago

Closed 18 years ago

#7891 closed enhancement (fixed)

Port upgrade should use archive instead of destroot if available

Reported by: danielluke (Daniel J. Luke) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.2
Keywords: Cc:
Port:

Description

Currently, port upgrade destroots the new software to be installed (and then de-activates the old software, archives, installs, and activates the new software).

If archiving is turned on, upgrade should use archive as the target so that the window from deactivate/unintstall of the old software to activate/install of the new software is shorter.

This is probably more important for 'direct' mode, although I think it's useful in all cases where archives are being created.

Patch attached (including small whitespace fix).

Attachments (1)

darwinports.tcl-patch (1.2 KB) - added by danielluke (Daniel J. Luke) 18 years ago.
Make port upgrade use archive target instead of destroot

Download all attachments as: .zip

Change History (8)

Changed 18 years ago by danielluke (Daniel J. Luke)

Attachment: darwinports.tcl-patch added

Make port upgrade use archive target instead of destroot

comment:1 Changed 18 years ago by danielluke (Daniel J. Luke)

I've tested this patch on my system.

comment:2 Changed 18 years ago by jberry@…

Just so that I'm sure I understand what this does, can you show the phases the code codes through, both with the current code, and with your patch?

Currently: ... destroot, de-activatate-old, archive-new, install-new, activate-new Patch: ... destroot, archive, de-activate-old, install-new, activate-new

Do I have that right?

comment:3 Changed 18 years ago by danielluke (Daniel J. Luke)

(In reply to comment #3)

Do I have that right?

exactly. (for image mode).

in direct mode it's

currently: destroot, uninstall-old, archive-new, install-new patch: destroot, archive-new, uninstall-old, install-new

comment:4 Changed 18 years ago by danielluke (Daniel J. Luke)

... and I forgot to mention why I did this in the first place.

If you've got two machines with dp installed and you upgrade the package on one machine, and then copy the archive to the other machine, dp won't use the archive when you go to upgrade on machine2 (since the upgrade procedure runs destroot).

With the patch, if you copy the archive over, dp will use it on machine2 when you go to upgrade. Thus enabling you to have a build machine and a production machine and still use 'port upgrade'

comment:5 Changed 18 years ago by danielluke (Daniel J. Luke)

Can I get some comments on this and/or if it's ok can it be applied?

Thanks.

comment:6 Changed 18 years ago by jberry@…

Status: newassigned

Daniel,

No, I think this one looks good to go. I just forgot about it. I'll try to commit it in the next few days...bug me if I lose track of it again.

comment:7 Changed 18 years ago by jberry@…

Resolution: fixed
Status: assignedclosed

Committed. Thanks Daniel!

Note: See TracTickets for help on using tickets.