Print this page
9726 solaris.py needs to use new service for /etc/security/*attr files in build 118

*** 449,467 **** --- 449,469 ---- raise RuntimeError("package %s not found" % pkgname) def start_package(pkgname): + set_macro("PKGNAME", urllib.quote(pkgname, "")) return package(pkgname) def end_package(pkg): pkg_branch = get_branch(pkg.name) if not pkg.version: pkg.version = "%s-%s" % (def_vers, pkg_branch) elif "-" not in pkg.version: pkg.version += "-%s" % pkg_branch + clear_macro("PKGNAME") print "Package '%s'" % pkg.name print " Version:", pkg.version print " Description:", pkg.desc print " Summary:", pkg.summary print " Classification: ", ",".join(pkg.classification)
*** 1008,1017 **** --- 1010,1025 ---- # global_includes = [] # list of macro substitutions macro_definitions = {} + def set_macro(key, value): + macro_definitions.update([("$(%s)" % key, value)]) + + def clear_macro(key): + del macro_definitions["$(%s)" % key] + try: _opts, _args = getopt.getopt(sys.argv[1:], "B:D:I:G:NT:b:dj:m:ns:v:w:p:") except getopt.GetoptError, _e: print "unknown option", _e.opt sys.exit(1)
*** 1025,1035 **** show_debug = True elif opt == "-j": # means we're using the new argument form... just_these_pkgs.append(arg) elif opt == "-m": _a = arg.split("=", 1) ! macro_definitions.update([("$(%s)" % _a[0], _a[1])]) elif opt == "-n": nopublish = True elif opt == "-p": if not os.path.exists(arg): raise RuntimeError("Invalid prototype area specified.") --- 1033,1043 ---- show_debug = True elif opt == "-j": # means we're using the new argument form... just_these_pkgs.append(arg) elif opt == "-m": _a = arg.split("=", 1) ! set_macro(_a[0], _a[1]) elif opt == "-n": nopublish = True elif opt == "-p": if not os.path.exists(arg): raise RuntimeError("Invalid prototype area specified.")