Opened 10 years ago

Closed 10 years ago

#43904 closed defect (worksforme)

MacPorts 2.3.0 fails to discard previous work state properly when Portfile checksum changes

Reported by: cooljeanius (Eric Gallager) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: base Version: 2.3.0
Keywords: Cc:
Port:

Description

I was working on a Portfile recently, and often what I do to force a rebuild in the Portfile is to change something in it. This worked fine with MacPorts 2.2.1:

DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install).
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Checksum recorded in statefile 'b8b2c99bd82bb28037065c28a859c4c175121cae743f19fc112050265a707130' differs from Portfile checksum '3c73a0b279333d9101351fde7e0e4cfe41e220788e629f9c2d6b5464fda2218c'
Portfile changed since last build; discarding previous state.
DEBUG: delete: /Users/ericgallager/.macports/opt/local/var/macports/build/_opt_local_var_macports_sources_LocalPorts_lang_open-cobol/open-cobol/work
DEBUG: Starting logging for open-cobol

However, after updating to MacPorts 2.3.0, this no longer works properly:

DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install).
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Checksum recorded in statefile '3c73a0b279333d9101351fde7e0e4cfe41e220788e629f9c2d6b5464fda2218c' differs from Portfile checksum 'ddf9f45ff86213ad6275dc7d6276301fbc8ddb64fe6b69842c3f17c32d6d73a2'
Portfile changed since last build; discarding previous state.
DEBUG: error deleting "/Users/ericgallager/.macports/opt/local/var/macports/build/_opt_local_var_macports_sources_LocalPorts_lang_open-cobol/open-cobol/work/open-cobol-2.0": file already exists
    while executing
"file delete -force -- /Users/ericgallager/.macports/opt/local/var/macports/build/_opt_local_var_macports_sources_LocalPorts_lang_open-cobol/open-cobol..."
    ("eval" body line 1)
    invoked from within
"eval file delete -force -- $args"
    (procedure "delete" line 2)
    invoked from within
"delete $workpath"
    (procedure "open_statefile" line 111)
    invoked from within
"open_statefile"
    (procedure "check_variants" line 29)
    invoked from within
"check_variants test"
    invoked from within
"$workername eval check_variants $target"
    (procedure "mportexec" line 7)
    invoked from within
"mportexec $workername $target"
Error: Unable to execute port: error deleting "/Users/ericgallager/.macports/opt/local/var/macports/build/_opt_local_var_macports_sources_LocalPorts_lang_open-cobol/open-cobol/work/open-cobol-2.0": file already exists

This seems to be a regression.

Change History (6)

comment:1 Changed 10 years ago by neverpanic (Clemens Lang)

Owner: changed from macports-tickets@… to cal@…
Status: newassigned

I agree. Which version of OS X is that?

comment:2 Changed 10 years ago by harciga

Isn't portindex supposed to be used for this.

comment:3 in reply to:  2 Changed 10 years ago by cooljeanius (Eric Gallager)

Replying to cal@…:

I agree. Which version of OS X is that?

Snow Leopard (10.6.8)

Replying to starkhalo@…:

Isn't portindex supposed to be used for this.

It is tedious to have to run portindex for every little change I make, and besides, this way works (or at least used to work) as well...

comment:4 Changed 10 years ago by neverpanic (Clemens Lang)

I cannot reproduce your issue:

DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install).
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Checksum recorded in statefile 'f494255fea611d668eb4a4256e1ebf0d74471a48b7d52d6881f26944790381f6' differs from Portfile checksum '7274b6c7b334711d48f848c5469f7d0ecb3f496d7b2a3452b2217e0dcf86376f'
Portfile changed since last build; discarding previous state.
DEBUG: Starting logging for yubico-pam
DEBUG: Logging disabled, error opening log file: can't create directory "/opt/local/var/macports/logs/_opt_dports_security_yubico-pam": permission denied

comment:5 in reply to:  4 Changed 10 years ago by cooljeanius (Eric Gallager)

Replying to cal@…:

I cannot reproduce your issue

Actually I cannot reproduce it myself any more either, feel free to close as "worksforme"... I still kinda wonder what happened that one time though...

Last edited 10 years ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:6 Changed 10 years ago by neverpanic (Clemens Lang)

Resolution: worksforme
Status: assignedclosed

As you wish. :)

Note: See TracTickets for help on using tickets.