An idea for distributing ports
Randall Wood
rhwood at mac.com
Wed Apr 4 03:14:43 PDT 2007
This is one of those while doing something unrelated ideas that
suddenly crystalizes while (classically) in the shower or attending a
meeting...
The idea is this:
Stable and Unstable Ports trees available via both rsync and http
Port currently works by grabbing info out of the port registry and
PortIndex file(s) on the local system and by looking at Portfiles in
the source trees whenever it is going to change the state of the
system by installing/uninstalling/activating/deactivating/whatever a
port.
I see no reason to change that except to allow for http-based syncing
of the source tree, which could work the following way:
1) port sync/selfupdate download the PortIndex
2) when a port operation that changes the system state is done, if
the requested port is in the PortIndex and either the Portfile does
not exist or the version of the Portfile is not equal to the version
in the PortIndex, then the portfile archive (portname.tgz as
generated by portindex -a) is downloaded, extracted, and used.
Http syncing would allow users who are having to maintain the tree in
svn because they can not rsync do to firewall/proxy restrictions to
no longer have to live in our working area, and would allow port to
do the syncing in that case once again.
The Stable/Unstable port branches:
This is conceptually pretty simple, and I hope technically simple as
well.
The current rsync sources would remain in place to support users of
MacPorts versions that do not support the concept of stable/unstable
branches before being turned off sometime after a version of port is
released that understands the ides of stable/unstable branches or how
to use the port.tgz files
Unstable:
This branch would be a new rync tree, generating its own PortIndex.
It would be synced againt the svn source code repository multiple
times daily, grabbing all changes in the repository. It would serve
both rsync and http-based sync operations.
Stable:
This branch would be a new rsync tree, generating its own PortIndex.
When this branch is started it would be a verbatim copy of the
unstable branch, becoming stable as other rules are met. This branch
would sync off the unstable branch only those files that have stayed
in the unstable branch without changing within the past 2 weeks and
would be synced daily. It would serve both rsync and http-based sync
operations.
The idea behind the stable branch is this: When a portfile fails to
parse in the unstable branch and causes port installation/upgrades to
simply fail (like happened during the recent zlib problem) or causes
other ports to break (like happened in the last gettext and
libgtkhtml3 upgrades), it would be noticed by users of the unstable
branch, and repair activities would prevent it from being picked up
by the stable branch, so that once working changes were introduced
and the port is left alone more than 2 weeks, it then becomes an
upgrade in the stable branch.
Obviously, an rsync-based port sync operation would have to ignore
the port.tgz files in the stable/unstable branches. It would also be
nice to be able to have the source line in sources.conf read like
{$sync.protocol}server/path/{$sync.branch} or something similar
instead of having 4 different lines in there with only 1 not
commented out.
Randall Wood
rhwood at mac.com
"The rules are simple: The ball is round. The game lasts 90 minutes.
All the
rest is just philosophy."
More information about the macports-dev
mailing list