Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove reverseDependencyUpdate checking

  • Loading branch information...
commit 7389bd44e6e9884a48468e591ff05cfb68f16aaf 1 parent 341137a
Ozan Çağlayan authored
Showing with 6 additions and 83 deletions.
  1. +5 −0 ChangeLog
  2. +1 −83 buildfarm/repomanager.py
View
5 ChangeLog
@@ -1,3 +1,8 @@
+2010-04-01 Ozan Çağlayan <ozan_at_pardus.org.tr>
+ * (buildfarm/repomanager.py): Remove reverseDependencyUpdate checking as
+ maintainers *should* always write strict dependencies to the new library
+ for forcing a re-compile.
+
2009-11-17 Ozan Çağlayan <ozan_at_pardus.org.tr>
* (data/buildfarm.conf): Add sandboxBlacklist option,
* (buildfarm/pisiinterface.py): Set ignore_sandbox for blacklisted
View
84 buildfarm/repomanager.py
@@ -69,70 +69,6 @@ def getChanges(self, type="ALL", filter='', exclude=Exclude):
rval = [t for t in [x for x in rval if x.find(filter) > -1] if t.find(exclude[i]) == -1]
return rval
- def getReverseDependencies(self, pspecList):
- # Needs a source repository
-
- def check():
- rdb = pisi.db.repodb.RepoDB()
- try:
- dbname = rdb.get_source_repos()[0]
- pisi.api.update_repo(dbname)
- except IndexError:
- # No source repo
- return False
- else:
- return True
-
- def getPackageName(pspec):
- # Extracts package name from full path to pspec.xml
- return os.path.basename(pspec.rsplit("/pspec.xml")[0])
-
-
- breaksABI = []
- revBuildDeps = set()
-
- if not check():
- # No source repository
- print "You should add a source repository for reverse dependency checking. Skipping.."
- return (breaksABI, list(revBuildDeps))
-
- # Create a source db instance
- sdb = pisi.db.sourcedb.SourceDB()
-
- # Create a diff output of all the repository
- # This is much more efficient that doing 'svn di' for every changed file.
- # difflist is list of tuples: ('kernel/kernel/pspec.xml', commit_diff)
- print "\nCalling svn diff. This may take a little while depending on the repository state.."
- diffoutput = os.popen("/usr/bin/svn di -r %d:%d %s" % (self.oldRevision, self.getRevision(), " ".join(pspecList))).read().strip()
- print "Parsing svn diff output..",
- difflist = [(pspec.split("\n")[0], "".join([l for l in pspec.split("\n")[4:] if l.startswith("+")])) \
- for pspec in diffoutput.split("Index: ")[1:]]
- print "Done"
-
- for pspec, diff in difflist:
- if "<Action>reverseDependencyUpdate</Action>" in diff:
- breaksABI.append(getPackageName(pspec))
-
- # Now we have the list of packages which break ABI.
- # We need to find out the reverse build dependencies of these packages.
- # e.g. live555 breaks ABI, vlc and mplayer needs live555 during build
-
- for p in breaksABI:
- # FIXME: We also add the subpackages as we can't know which one needs revdepupdate.
- # This may cause a lot of unneeded updates..
- revdeps = []
- for package in [_p.name for _p in sdb.get_spec(p).packages]:
- srevdeps = sdb.get_rev_deps(package)
- if srevdeps:
- revdeps.extend([d[0] for d in srevdeps])
-
- for revdep in set(revdeps):
- # e.g. (revdep, revdepObject) = ('vlc', <pisi.dependency.Dependency object at 0xa3284cc>)
- revBuildDeps.add(os.path.join(conf.localpspecrepo, sdb.get_spec(sdb.pkgtosrc(revdep)).source.partOf.replace(".", "/") + "/%s/pspec.xml" % revdep))
-
- return (breaksABI, list(revBuildDeps))
-
-
def getRevision(self):
return int(self.output[-1][self.output[-1].index("revision")+1].strip("."))
@@ -177,28 +113,10 @@ def getAll(self):
for p in updatedPspecFiles + newPspecFiles:
print " * %s" % p
- # Get 'reverseDependencyUpdate' containing package list
- # A brand new package can't have this property
- (breaksABI, revDepsToBeRecompiled) = r.getReverseDependencies(updatedPspecFiles)
-
- # Print the revdeps to be recompiled
- if breaksABI:
- print "\nThese updates broke ABI:\n%s" % ('-'*24)
- for p in breaksABI:
- print " * %s" % p
-
- if revDepsToBeRecompiled:
- print "\nThese reverse dependencies will be recompiled because of ABI breakage:\n%s" % ('-'*70)
- for p in revDepsToBeRecompiled:
- print " * %s" % p
- else:
- # p broke API but no reverse build dependency exists
- print "\nCouldn't find any reverse build dependency in source repository.."
-
if len(updatedPspecFiles + newPspecFiles):
queue = []
if os.path.exists(os.path.join(conf.workdir, "workQueue")):
queue = open(os.path.join(conf.workdir, "workQueue"), "rb").read().strip().split("\n")
- queue.extend(updatedPspecFiles + newPspecFiles + revDepsToBeRecompiled)
+ queue.extend(updatedPspecFiles + newPspecFiles)
open(os.path.join(conf.workdir, "workQueue"), "wb").write("\n".join([l for l in list(set(queue)) if l])+"\n")
Please sign in to comment.
Something went wrong with that request. Please try again.