Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#44077 closed enhancement (worksforme)

How can I activate old version of dependency in Portfile?

Reported by: harshil.makwana@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.3.0
Keywords: Cc:
Port:

Description (last modified by neverpanic (Clemens Lang))

Hi,

We know that we can not specify version in dependency library but If it is possible to activate old version in portfile using TCL script then It is good for me.Please reply me If you know something about this. Thanks in advance.

Change History (10)

comment:1 Changed 10 years ago by harshil.makwana@…

Cc: harshil.makwana@… added
Last edited 10 years ago by harshil.makwana@… (previous) (diff)

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

Old versions of dependencies are not supported. MacPorts specifically ensures it does not build against an outdated version of a dependency.

Please state your use case for this, and I'll try to see if there's a different way or whether we should keep an older version of a specific port in a separate non-conflicting location.

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

Cc: harshil.makwana@… removed
Component: portsbase
Type: defectenhancement

Also, you don't need to Cc yourself, this is not a defect, and for the next time, the macports-users lists is the proper place for discussions like these.

comment:4 Changed 10 years ago by harshil.makwana@…

Thanks for your reply.I have solved my issue.I can able to activate any version using function "register_activate ${portname} ${version}".

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

Resolution: worksforme
Status: newclosed

OK, so there's nothing more to be done here. I'm going to close this ticket as worksforme, because I don't know a use-case where this would be appropriate, and you aren't sharing your motivation for what you've done.

I am aware of registry_activate and that it can be used in Portfiles, I however seriously doubt doing so is a good idea, and it will fail if the outdated version of port you're trying to activate isn't installed on a user's system. The correct way to solve an incompatibility with an upgraded dependency is

  1. asking upstream to fix it
  2. trying to patch for compatibility with the new version yourself
  3. providing a separate port for the older version, ensure that it can be installed alongside the new port and modifying the dependency.

If there is a port that no longer works with one of our upgraded dependencies you should file a bug against that port and we can figure out which of the mentioned steps we should take. Activating an older version is not a general solution to the problem.

comment:6 Changed 10 years ago by harshil.makwana@…

I am regretful to give you late use case.My Use case is "to give the error if particular version is not installed during activation and If version is installed then activate it".So It's seems like debian package installation.

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

That still doesn't explain why building your port against the current version of the dependency is not an option.

comment:8 Changed 10 years ago by harshil.makwana@…

We need specific version dependent libs.

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

Description: modified (diff)

OK, so you're trying to do something MacPorts wasn't built for. I'm not stopping you, I'm just telling you. Glad you were able to figure it out, but that's not something we're going to support in the near future.

comment:10 Changed 10 years ago by harshil.makwana@…

Ok,Nice to talk with you.If you have any project on MacPort then Please contact me because I would like to work on this.

Note: See TracTickets for help on using tickets.