Opened 19 years ago

Last modified 18 months ago

#2365 new enhancement

Add support for non-volatile default conf files

Reported by: jberry@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts Future
Component: base Version:
Keywords: Cc: vinc17@…, anddam (Andrea D'Amore), cooljeanius (Eric Gallager), jul_bsd@…, ci42, raimue (Rainer Müller), mascguy (Christopher Nielsen)

Description (last modified by jmroot (Joshua Root))

It is useful to be able to install as part of a port certain files that will not be uninstalled or overwritten by subsequent installations or upgrades to the port.

This patch adds support for intallation at activation time of "default" files which will not be tracked as part of the installed port, and do not overwrite existing files of the same name.

The new option activate.copy_defaults accepts [multiple] pairs of src/dst file paths. At the tail of the activation phase, each src file is copied to its paired dst file iff dst doesn't already exist.

Attachments (1)

portactivate.tcl.diff (1.9 KB) - added by jberry@… 19 years ago.
Patch to base/src/port1.0/portactivate.tcl

Download all attachments as: .zip

Change History (15)

Changed 19 years ago by jberry@…

Attachment: portactivate.tcl.diff added

Patch to base/src/port1.0/portactivate.tcl

comment:1 Changed 19 years ago by jberry@…

This patch is waiting further development, perhaps by wbb4, of underlying support in the registry to carry this information, so that we aren't dependent on the activation phase, which doesn't exist outside of images.

comment:2 Changed 18 years ago by markd@…

Type: defectenhancement

comment:3 Changed 17 years ago by nox@…

Milestone: MacPorts base enhancements
Priority: ExpectedNormal
Version: 1.0

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

Duplicate #12797 has some more ideas for how this ought to be implemented.

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

Description: modified (diff)
Reporter: changed from jberry@… to jberry@…

comment:6 Changed 14 years ago by vinc17@…

Cc: vinc17@… added

Cc Me!

comment:7 Changed 14 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:9 Changed 10 years ago by jul_bsd@…

Cc: jul_bsd@… added

Cc Me!

comment:10 Changed 10 years ago by jul_bsd@…

As a reference from #43237

Like destroot.keepdirs, a command to declare a file as a configuration should exist. listed filed would be

  • move to ${prefix}/share/examples/${name}
  • if not existing in current setup, copy to normal location in post-activate
  • on post-deactivate, IF file unchanged (can compare to example files or better stored a hash w package receipt), removed

As an example, I would point on Openbsd @sample setting ​

comment:11 Changed 8 years ago by ci42

Cc: ciserlohn@… added

Cc Me!

comment:12 Changed 8 years ago by raimue (Rainer Müller)

Cc: raimue@… added

An unfinished implementation for this exist in the gsoc10-configfiles branch.

comment:13 Changed 4 years ago by casouri (Yuan Fu)

Cc Me!

comment:14 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Note: See TracTickets for help on using tickets.