add update seeds script common to all {k,x,ed,}ubuntu-meta packages

Bug #26559 reported by Jani Monoses
6
Affects Status Importance Assigned to Milestone
germinate (Ubuntu)
New
Wishlist
Colin Watson

Bug Description

to ease handling of various ubuntu-meta packages and not having to keep their
update scripts in sync, that script could move to germinate.

The derivative meta packages would just have a simple config file (python
statements) which define how that package is to ve handled differently
for instance for xubuntu, having the file called derivative containing

seed_base = 'http://localhost/seeds/xubuntu-%s/' % dist
components = ['main', 'restricted', 'universe']
derivative = 'xubuntu'

edubuntu in turn could drop the components part as it is built from main
entirely but override the seed variable to add 'server'

this way creating new metas and maintaining the current ones would be a bit easier.
This patch to ./update makes it read a file called derivative in the current
dir, and the resulting script could be
installed as germinate-update-seeds. The variable derivative could have been
defaulted to 'ubuntu' so the ubuntu-meta
package does not even need to have an overrideing config file but that would
have allowed running the script in any random dir
this way it bails out.

--- /home/jani/hack/ubuntu/xubuntu/meta/ubuntu/ubuntu-meta-0.83/update
2005-11-16 18:00:14.000000000 +0200
+++ germinate-0.8/update-seeds.py 2005-12-04 18:12:01.000000000 +0200
@@ -32,8 +32,24 @@
 seed_base = 'http://people.ubuntu.com/~cjwatson/seeds/%s/' % dist
 seed_entry = re.compile(' *\* *(?P<package>\S+) *(\[(?P<arches>[^]]*)\])? *(#.*)?')
 components = ['main', 'restricted']
+
+#Execute the file named derivative in the meta-package directory
+#This file must at least define the derivative name and may also
+#override any of the above settings
+
+config = 'derivative'
+
+try:
+ exec open(config)
+except IOError:
+ print "You must have a file named %s in your meta package" % config
+ sys.exit()
+except SyntaxError:
+ print "Your % file is not correct python code" % config
+ sys.exit()
+
 debootstrap_version_file = 'debootstrap-version'
-metapackages = map(lambda seed: 'ubuntu-' + seed, seeds)
+metapackages = map(lambda seed: derivative + seed, seeds)
 seed_package_blacklist = sets.Set(metapackages)

 def get_debootstrap_version():

Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks for the patch. I think I prefer Gustavo's approach of a proper configuration file in bug 37917, so I'll mark this a duplicate of that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.