Opened 12 years ago

Closed 10 years ago

#19908 closed defect (fixed)

dry-run option (-y) not honored everywhere

Reported by: blb@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.8.0
Keywords: Cc:
Port:

Description

At least uninstall appears to not honor the dry-run option (-y):

$ port -dy uninstall gimp2
--->  Deactivating gimp2 @2.6.6_1+darwin_9+x11
DEBUG: deactivating link: /mp/share/man/man5/gimprc.5.gz
DEBUG: error deleting "/mp/share/man/man5/gimprc.5.gz": permission denied
    while executing
"_deactivate_contents $name $imagefiles"
    (procedure "portimage::deactivate" line 52)
    invoked from within
"portimage::deactivate $portname ${version}_${revision}${variants} $optionslist"
    (procedure "portuninstall::uninstall" line 88)
    invoked from within
"portuninstall::uninstall $portname [composite_version $portversion [array get variations]] [array get options]"
Error: port uninstall failed: error deleting "/mp/share/man/man5/gimprc.5.gz": permission denied

(It failed since I didn't use sudo, as I didn't want it actually uninstalling).

Initially ran into this trying it with --follow-dependents to see if that would show a recursive dependent list.

Change History (6)

comment:1 Changed 12 years ago by jmroot (Joshua Root)

Fixed activate/deactivate in r52113.

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Fixed uninstall in r52154. Are there any more?

comment:3 Changed 12 years ago by blb@…

My original test appears to work (on python26, it shows quite a few ports being dry-runned for deactivate and uninstall). However, a new issue has cropped up but I don't think it's dry-run related:

--->  The following versions of xorg-xcb-proto are currently installed:
--->  	xorg-xcb-proto @1.5_0+python26
--->  	xorg-xcb-proto @1.5_1+python26 (active)
DEBUG: Registry error: Please specify the full version as recorded in the port registry.
    while executing
"portuninstall::uninstall $depport "" [array get options]"
    (procedure "portuninstall::uninstall" line 65)
    invoked from within
"portuninstall::uninstall $portname [composite_version $portversion [array get variations]] [array get options]"
Error: port uninstall failed: Registry error: Please specify the full version as recorded in the port registry.

I'm guessing we need a new ticket for that one?

comment:4 Changed 12 years ago by jmroot (Joshua Root)

Apparently the work directory will still be deleted in dry-run mode if the Portfile is newer than the statefile.

comment:5 Changed 12 years ago by jmroot (Joshua Root)

Fixed the deleting of the work dir in r53707.

comment:6 Changed 10 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future
Resolution: fixed
Status: newclosed

No further issues reported; closing.

Note: See TracTickets for help on using tickets.