From 230ac80a953992549d4e4494609f6f06e3e47c46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 10 Jul 2011 22:31:54 -0400 Subject: [PATCH] revert wrong merge --- coblitz-latest-tags.mk | 6 ++-- config.planetlab/bootcd.pkgs | 1 - config.planetlab/vserver.post | 5 ---- module-tools.py | 56 +++++++++++------------------------ 4 files changed, 21 insertions(+), 47 deletions(-) diff --git a/coblitz-latest-tags.mk b/coblitz-latest-tags.mk index 5246b65b..74aa25af 100644 --- a/coblitz-latest-tags.mk +++ b/coblitz-latest-tags.mk @@ -1,6 +1,6 @@ # build-GITPATH is now set by vbuild-nightly.sh to avoid duplication -mkinitrd-GITPATH := git://git.verivue.com/planetlab/mkinitrd.git@mkinitrd-5.1.19.6-4 +mkinitrd-GITPATH := git://git.verivue.com/planetlab/mkinitrd.git@mkinitrd-5.1.19.6-3 linux-2.6-BRANCH := rhel6 linux-2.6-GITPATH := git://git.verivue.com/planetlab/linux-2.6.git@linux-2.6-32-16 util-vserver-GITPATH := git://git.verivue.com/planetlab/util-vserver.git@util-vserver-0.30.216-17 @@ -9,7 +9,7 @@ util-vserver-pl-GITPATH := git://git.verivue.com/planetlab/util-vserver- libnl-GITPATH := git://git.verivue.com/planetlab/libnl.git@libnl-1.1-2 nodeupdate-GITPATH := git://git.verivue.com/planetlab/nodeupdate.git@nodeupdate-0.5-9 nodemanager-GITPATH := git://git.verivue.com/planetlab/nodemanager@nodemanager-1.8-38 -pyplnet-GITPATH := git://git.verivue.com/planetlab/pyplnet@pyplnet-4.3-14 +pyplnet-GITPATH := git://git.verivue.com/planetlab/pyplnet@pyplnet-4.3-12 codemux-GITPATH := git://git.verivue.com/planetlab/codemux.git@CoDemux-0.1-13 iptables-BUILD-FROM-SRPM := yes # tmp iptables-GITPATH := git://git.verivue.com/planetlab/iptables.git@iptables-1.4.10-4 @@ -24,7 +24,7 @@ plewww-GITPATH := git://git.verivue.com/planetlab/plewww@PLEWWW pcucontrol-GITPATH := git://git.verivue.com/planetlab/pcucontrol.git@pcucontrol-1.0-10 nodeconfig-GITPATH := git://git.verivue.com/planetlab/nodeconfig.git@nodeconfig-4.3-10 bootmanager-BRANCH := 4.3 -bootmanager-GITPATH := git://git.verivue.com/planetlab/bootmanager@bootmanager-4.3-30 +bootmanager-GITPATH := git://git.verivue.com/planetlab/bootmanager@bootmanager-4.3-28 pypcilib-GITPATH := git://git.verivue.com/planetlab/pypcilib.git@pypcilib-0.2-10 bootcd-GITPATH := git://git.verivue.com/planetlab/bootcd.git@bootcd-4.2-25 vserver-reference-GITPATH := git://git.verivue.com/planetlab/vserver-reference@vserver-reference-4.2-18 diff --git a/config.planetlab/bootcd.pkgs b/config.planetlab/bootcd.pkgs index 2eb4c8d0..f8206023 100644 --- a/config.planetlab/bootcd.pkgs +++ b/config.planetlab/bootcd.pkgs @@ -48,7 +48,6 @@ package: vconfig package: ntp package: pypcilib package: openvpn -package: syslinux # make this explicit for f14 as we need mkfs.ext2 in bm package: e2fsprogs # used to be installed until f12, make it explicit for f14, might come in handy diff --git a/config.planetlab/vserver.post b/config.planetlab/vserver.post index f80c1424..7d518f44 100644 --- a/config.planetlab/vserver.post +++ b/config.planetlab/vserver.post @@ -16,14 +16,9 @@ sed -i -e "s/root:[\*|x]/root:/" ${vdir}/etc/passwd echo "Removing requiretty from default /etc/sudoers file" sed -i -e 's,^\(Defaults.*requiretty\),#\1,' ${vdir}/etc/sudoers -# Create /var/core -mkdir -p ${vdir}/var/core -chmod 777 ${vdir}/var/core - # Fix up /etc/init.d/halt echo "Fixing /etc/init.d/halt in vserver-reference image" cat > ${vdir}/etc/init.d/halt <[\w\.-\/]+):(?P[\w\.-]+)\Z") + matcher_branch_spec=re.compile("\A(?P[\w\.-]+):(?P[\w\.-]+)\Z") # special form for tagged module - for Build - matcher_tag_spec=re.compile("\A(?P[\w\.-\/]+)@(?P[\w\.-]+)\Z") + matcher_tag_spec=re.compile("\A(?P[\w\.-]+)@(?P[\w\.-]+)\Z") # parsing specfiles matcher_rpm_define=re.compile("%(define|global)\s+(\S+)\s+(\S*)\s*") @@ -486,8 +473,7 @@ class Module: def __init__ (self,module_spec,options): # parse module spec - self.pathname, branch_or_tagname, module_type = self.parse_module_spec(module_spec) - self.name = os.path.basename(self.pathname) + self.name, branch_or_tagname, module_type = self.parse_module_spec(module_spec) if module_type == "branch": self.branch=branch_or_tagname @@ -498,7 +484,7 @@ class Module: self.name = svn_to_git_name(self.name) self.options=options - self.module_dir="%s/%s"%(options.workdir,self.pathname) + self.module_dir="%s/%s"%(options.workdir,self.name) self.repository = None self.build = None @@ -523,11 +509,11 @@ class Module: def friendly_name (self): if hasattr(self,'branch'): - return "%s:%s"%(self.pathname,self.branch) + return "%s:%s"%(self.name,self.branch) elif hasattr(self,'tagname'): - return "%s@%s"%(self.pathname,self.tagname) + return "%s@%s"%(self.name,self.tagname) else: - return self.pathname + return self.name @classmethod def git_remote_dir (cls, name): @@ -592,10 +578,6 @@ that for other purposes than tagging""" % options.workdir Module.config[key]=value f.close() - # owerride config variables using options. - if options.build_module: - Module.config['build'] = options.build_module - if not os.path.isdir (options.workdir): print "Cannot find",options.workdir,"let's create it" Command("mkdir -p %s" % options.workdir, options).run_silent() @@ -639,8 +621,8 @@ that for other purposes than tagging""" % options.workdir print 'Checking for',self.module_dir if not os.path.isdir (self.module_dir): - if Repository.has_moved_to_git(self.pathname, Module.config): - self.repository = GitRepository.checkout(self.git_remote_dir(self.pathname), + if Repository.has_moved_to_git(self.name, Module.config): + self.repository = GitRepository.checkout(self.git_remote_dir(self.name), self.module_dir, self.options) else: @@ -652,7 +634,7 @@ that for other purposes than tagging""" % options.workdir self.repository = Repository(self.module_dir, self.options) if self.repository.type == "svn": # check if module has moved to git - if Repository.has_moved_to_git(self.pathname, Module.config): + if Repository.has_moved_to_git(self.name, Module.config): Command("rm -rf %s" % self.module_dir, self.options).run_silent() self.init_module_dir() # check if we have the required branch/tag @@ -707,7 +689,7 @@ that for other purposes than tagging""" % options.workdir if level2: return level2[0] - raise Exception, 'Cannot guess specfile for module %s -- patterns were %s or %s'%(self.pathname,pattern1,pattern2) + raise Exception, 'Cannot guess specfile for module %s -- patterns were %s or %s'%(self.name,pattern1,pattern2) def all_specnames (self): level1=glob("%s/*.spec" % self.module_dir) @@ -876,7 +858,7 @@ that for other purposes than tagging""" % options.workdir # brute-force : change uncommented lines that define -SVNPATH else: if self.options.verbose: - print 'Searching for -SVNPATH or -GITPATH lines referring to /%s/\n\tin %s .. '%(self.pathname,tagsfile), + print 'Searching for -SVNPATH or -GITPATH lines referring to /%s/\n\tin %s .. '%(self.name,tagsfile), pattern="\A\s*%s-(SVNPATH|GITPATH)\s*(=|:=)\s*(?P[^\s]+)/%s[^\s]+"\ %(self.name,self.name) matcher_module=re.compile(pattern) @@ -885,7 +867,7 @@ that for other purposes than tagging""" % options.workdir if attempt: if line.find("-GITPATH") >= 0: modulepath = "%s-GITPATH"%self.name - replacement = "%-32s:= %s/%s.git@%s\n"%(modulepath,attempt.group('url_main'),self.pathname,newname) + replacement = "%-32s:= %s/%s.git@%s\n"%(modulepath,attempt.group('url_main'),self.name,newname) else: modulepath = "%s-SVNPATH"%self.name replacement = "%-32s:= %s/%s/tags/%s\n"%(modulepath,attempt.group('url_main'),self.name,newname) @@ -962,7 +944,7 @@ that for other purposes than tagging""" % options.workdir # checking for diffs diff_output = self.repository.diff_with_tag(old_tag_name) if len(diff_output) == 0: - if not prompt ("No pending difference in module %s, want to tag anyway"%self.pathname,False): + if not prompt ("No pending difference in module %s, want to tag anyway"%self.name,False): return # side effect in trunk's specfile @@ -1112,7 +1094,7 @@ n: move to next file"""%locals() if self.options.list: if diff_output: - print self.pathname + print self.name else: thename=self.friendly_name() do_print=False @@ -1502,8 +1484,6 @@ Branches: ** THIS MUST NOT ** be your usual working directory""") parser.add_option("-F","--fast-checks",action="store_true",dest="fast_checks",default=False, help="skip safety checks, such as svn updates -- use with care") - parser.add_option("-B","--build-module",action="store",dest="build_module",default=None, - help="specify a build module to owerride the one in the CONFIG") # default verbosity depending on function - temp verbose_modes= ['tag', 'sync', 'branch'] -- 2.47.0