depot.py revision 20
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
import BaseHTTPServer
import os
import re
import sha
import shutil
import time
"""The marshalled form of the catalog is
pkg_name (release (branch (sequence ...) ...) ...)
since we know that the server is only to report packages for which it
can offer a record.
"""
# mkdir repo_root + "/trans/" + trans_id
try:
except OSError:
pass
# XXX opaquify using hash
# record transaction metadata: opening_time, package, user
# lookup package by name
# if not found, create package
# set package state to TRANSACTING
# Pull transaction ID from headers.
#
# set package state to SUBMITTED
# attempt to reconcile dependencies
# if reconciled, set state to PUBLISHED
# call back to check incomplete list
# else set state to INCOMPLETE
try:
except:
else
else:
else: