On Thu, 2008-09-11 at 14:03 -0700, Jesse Keating wrote: > On Thu, 2008-09-11 at 15:51 -0500, Jeffrey Ollie wrote: > > > > Basically because the only argument for keeping "make force-tag" > > wasn't a technical one. There's a need to ensure that a tag points to > > the exact source that was used to build a package. Disallowing > > force-tag is the easiest way to do that. Creating some hack that > > checks with koji to see if there's a successful build associated with > > a tag before allowing a force-tag operation to success sounds like a > > recipe for really slow and expensive CVS operations. > > That's pretty incorrect. There is lots of evidence where being able to > move forward contents of the build target without fiddling with the > target itself has value. Both in time saved and interaction with > upstreams. > > Really it comes down to a premature desire to clean up the way that Koji > builds things. For lack of something easier, koji builds from a CVS tag > based on the N-V-R of a package build. For lack of knowledge of > something easier, the thought is that tag is the only thing we can use > to get back to the actual source used for a build. It's not. I've been > told of at least one way to use something different, the CVS/Entries > file. Yeah, it might take a little work to cook up an app to go from > that to the source, but that's fine, that's work the person who wants > this has to do. Attached patch implements this, or at least attempts to. I wrote it blind, I'm reasonably sure it'd work but I don't have a local kojid instance to test with. If I really have to set one up, I will. Seriously, removing force-tag is a bad solution to that problem. This took all of 35 minutes to write, counting checking out koji and figuring out enough kojid context to have some idea of what to write. I don't even really know python that well. - ajax
diff -up koji-1.2.6/builder/kojid.jx koji-1.2.6/builder/kojid --- koji-1.2.6/builder/kojid.jx 2008-08-25 15:49:15.000000000 -0400 +++ koji-1.2.6/builder/kojid 2008-09-11 17:11:38.000000000 -0400 @@ -1884,10 +1884,17 @@ class BuildSRPMFromSCMTask(BaseTaskHandl #upload srpm and return self.uploadFile(srpm) - return { - 'srpm' : "%s/%s" % (uploadpath, srpm_name), - 'log' : "%s/srpm.log" % uploadpath, - } + + if scm.scmtype.find('CVS') != -1: + self.uploadFile('%s/CVS/Entries' % scmdir) + + ret = {} + ret['srpm'] = "%s/%s" % (uploadpath, srpm_name) + ret['log'] = "%s/srpm.log" % uploadpath + if scm.scmtype.find('CVS') != -1: + ret['entries'] = "%s/Entries" % uploadpath + + return ret class TagNotificationTask(BaseTaskHandler): Methods = ['tagNotification']
Attachment:
signature.asc
Description: This is a digitally signed message part
-- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list