[Pkg-ocaml-maint-commits] r5957 - in /trunk/packages/edos-debcheck/trunk/debian: changelog contrib/add-sources.py
zack at users.alioth.debian.org
zack at users.alioth.debian.org
Sat Aug 16 18:32:17 UTC 2008
Author: zack
Date: Sat Aug 16 18:32:17 2008
New Revision: 5957
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/?sc=1&rev=5957
Log:
add-sources.py: add support for specifying an alternative prefix for
dummy source packages
Modified:
trunk/packages/edos-debcheck/trunk/debian/changelog
trunk/packages/edos-debcheck/trunk/debian/contrib/add-sources.py
Modified: trunk/packages/edos-debcheck/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/edos-debcheck/trunk/debian/changelog?rev=5957&op=diff
==============================================================================
--- trunk/packages/edos-debcheck/trunk/debian/changelog (original)
+++ trunk/packages/edos-debcheck/trunk/debian/changelog Sat Aug 16 18:32:17 2008
@@ -1,3 +1,10 @@
+edos-debcheck (1.0-8) UNRELEASED; urgency=low
+
+ * add-sources.py: add support for specifying an alternative prefix for
+ dummy source packages
+
+ -- Stefano Zacchiroli <zack at debian.org> Sat, 16 Aug 2008 15:31:35 -0300
+
edos-debcheck (1.0-7) unstable; urgency=low
[ Ralf Treinen ]
Modified: trunk/packages/edos-debcheck/trunk/debian/contrib/add-sources.py
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/edos-debcheck/trunk/debian/contrib/add-sources.py?rev=5957&op=diff
==============================================================================
--- trunk/packages/edos-debcheck/trunk/debian/contrib/add-sources.py (original)
+++ trunk/packages/edos-debcheck/trunk/debian/contrib/add-sources.py Sat Aug 16 18:32:17 2008
@@ -1,9 +1,8 @@
#!/usr/bin/python
# Given as input a Packages and a Sources file, produces as output a new
-# Packages containing fake "source---FOO" packages which are installable if and
-# only if the corresponding source package (FOO) has satisfiable build
-# dependencies.
+# Packages containing fake packages which are installable if and only if the
+# corresponding source package has satisfiable build dependencies.
# Copyright (C) 2008 Stefano Zacchiroli <zack at debian.org>
# This program is free software: you can redistribute it and/or modify it under
@@ -16,19 +15,25 @@
import string
import sys
+from optparse import OptionParser
from debian_bundle import deb822
-if len(sys.argv) != 3:
- print 'Usage: cat Packages | add-sources Sources ARCH > Packages.new'
+usage = 'Usage: cat Packages | add-sources [OPTION...] Sources ARCH > Packages.new'
+cli = OptionParser(usage=usage)
+cli.add_option('-p', '--prefix', dest='prefix', default='source---',
+ help='set the prefix for fake source packages to PREFIX (default: source---)',
+ metavar='PREFIX')
+(options, args) = cli.parse_args()
+if len(args) != 2:
+ cli.print_help()
sys.exit(2)
-
-sources_file = sys.argv[1]
-architecture = sys.argv[2]
+sources_file = args[0]
+architecture = args[1]
def pkg_of_src(src):
- global architecture
+ global architecture, options
pkg = deb822.Packages()
- pkg['Package'] = 'source---' + src['Package']
+ pkg['Package'] = options.prefix + src['Package']
def dep_for_me(dep):
for_me = None
More information about the Pkg-ocaml-maint-commits
mailing list