New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #23598 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Python error activatin duplicity

Reported by: isaac@… Owned by: singingwolfboy@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: andreas.wilm@…, owenc@…, filippos@…, barthelemy@…, snc@…, michaelld@…
Port: duplicity

Description (last modified by macsforever2000@…) (diff)

I get an error while installing "duplicity" during the activation stage.

sudo port install duplicity
...
Error: Target org.macports.destroot returned: can't read "python.prefix": no such variable

Attaching full output with -d.

Attachments

port_install.log Download (67.8 KB) - added by isaac@… 2 years ago.
log.txt Download (66.2 KB) - added by owenc@… 2 years ago.
duplicity.diff Download (3.3 KB) - added by snc@… 2 years ago.
working copy having axed py25 portions

Change History

Changed 2 years ago by isaac@…

  Changed 2 years ago by jmr@…

  • owner changed from macports-tickets@… to singingwolfboy@…
  • port set to duplicity

Please remember to fill in the Port field and cc the maintainer.

  Changed 2 years ago by singingwolfboy@…

  • status changed from new to assigned

Confirmed: I'm seeing exactly the same issue on 10.6. I'm not sure how to solve it, though: even with the debug output, I'm not sure exactly where python.prefix is being called without being defined. (It doesn't help that I'm not very familiar with the internals of Macports.) I tried manually setting that variable, both in the main body of the port and in the post-destroot section (which seems to be where it's failing), but nothing changed. Anyone else want to take a look at this issue?

  Changed 2 years ago by jmr@…

PortGroup was never designed to be used anywhere but right after PortSystem, for one thing.

  Changed 2 years ago by andreas.wilm@…

Same here.

See also ticket #21126

  Changed 2 years ago by andreas.wilm@…

  • cc andreas.wilm@… added

Cc Me!

Changed 2 years ago by owenc@…

  Changed 2 years ago by owenc@…

I'm seeing the exact same error.

I'm afraid I have no clue how this all works though. I've tried editing the Portfile but it seems to ignore those changes.

Log attached.

  Changed 2 years ago by owenc@…

  • cc owenc@… added

Cc Me!

  Changed 2 years ago by filippos@…

  • cc filippos@… added

Cc Me!

  Changed 2 years ago by barthelemy@…

Same problem here. Note that it only appears when using python2.6. A workaround is then to use the python25 variant.

  Changed 2 years ago by barthelemy@…

  • cc barthelemy@… added

Cc Me!

  Changed 2 years ago by macsforever2000@…

  • description modified (diff)

  Changed 2 years ago by snc@…

  • cc snc@… added

Cc Me!

follow-up: ↓ 14   Changed 2 years ago by snc@…

I'm not convinced the port needs to manually link the binaries. PortGroup python26 does this for you have linkbinaries set to yes.

Is simply removing your post-destroot acceptable?

Changed 2 years ago by snc@…

working copy having axed py25 portions

in reply to: ↑ 13 ; follow-up: ↓ 15   Changed 2 years ago by singingwolfboy@…

Replying to snc@…:

I'm not convinced the port needs to manually link the binaries. PortGroup python26 does this for you have linkbinaries set to yes. Is simply removing your post-destroot acceptable?

I didn't know about python.linkbinaries. Nifty! I looked over your diff, and I see two main problems:

  • The port should be named "duplicity", not "py26-duplicity"
  • The port does not create "/opt/local/bin/duplicity", it creates "/opt/local/bin/duplicity-2.6"

Duplicity is not a Python module, it's a separate program that happens to use Python as a dependency. It so happens that duplicity is written in Python, but I don't think that makes a difference. People who want to use duplicity for backup shouldn't have to care about which Python branch they use, although if they do care, they should be able to set it. (However, at this point, I think it's an acceptable price to drop multi-branch support in this port in order to just get duplicity working. Latest 2.X branch is a reasonable default.)

snc, would you be OK with me using your diff, but changing the name to "duplicity" and creating a post-destroot section to create a symbolic link from ${prefix}/bin/duplicity to ${prefix}/bin/duplicity-2.6 ?

in reply to: ↑ 14   Changed 2 years ago by snc@…

Replying to singingwolfboy@…:

snc, would you be OK with me using your diff, but changing the name to "duplicity" and creating a post-destroot section to create a symbolic link from ${prefix}/bin/duplicity to ${prefix}/bin/duplicity-2.6 ?

Feel free. I changed it to py26-duplicity because it became a python 26-only port through my diff. Granted you don't want a module but I feel that is what the PortGroup accomplishes.

  Changed 2 years ago by singingwolfboy@…

  • status changed from assigned to closed
  • resolution set to fixed

committed in r64433

  Changed 2 years ago by michaelld@…

  • cc michaelld@… added

Cc Me!

Note: See TracTickets for help on using tickets.