I'd like to have the following abilities in the ports infrastructure:

The idea is to support operations like these:

To be able to do this, I propose a new utility, a program, called pkg_trans, that will be used like this:

Begins a transaction. Writes transaction id to stdout.

Records that a package is being installed, as a part of a transaction.

Records that a package is being removed, as a part of a transaction. Optionally, at this point, if pkg_trans_save_deleted_packages="YES" is present in /etc/rc.conf, a binary package backup is created by pkg_create -b to enable undoing the delete. When the transaction is logically over, the following is used:

This ends the transaction, cleans up, whatever is needed. The command

Undos a transaction, while

Shows a list of all recorded transactions, chronologically ordered.

Shows details of a transaction.

I've chosen -z for transaction ID because -t and -x are both used by various pkg_* utilities for other purposes and -z is free in all utilities.

For this to be effective, I think these utilities will have to be modified:


Let's call this "alpha" release :)


IvanVoras/PkgTransProposal (last edited 2009-05-06T20:57:18+0000 by IvanVoras)