<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>128878</bug_id>
          
          <creation_ts>2006-04-05 01:50 0000</creation_ts>
          <short_desc>Another bug in catalyst2_rc40</short_desc>
          <delta_ts>2006-05-25 09:30:40 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Hosted Projects</product>
          <component>Catalyst</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>liyiming@ict.ac.cn</reporter>
          <assigned_to>catalyst@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>liyiming@ict.ac.cn</who>
            <bug_when>2006-04-05 01:50:56 0000</bug_when>
            <thetext>These are some codes in fcntl_unlock() function of catalyst_lock.py script. Look carefully you will find that after excuting the first line and the second line codes the rest codes will never be excuted.

 
1   if self.myfd == None:
2	    return False
3   try:
4           if self.myfd == None:
5           self.myfd = os.open(self.lockfile, os.O_WRONLY,0660)
6           unlinkfile = 1
7           self.locking_method(self.myfd,fcntl.LOCK_UN)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-04-05 01:56:44 0000</bug_when>
            <thetext>*** Bug 128880 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>liyiming@ict.ac.cn</who>
            <bug_when>2006-04-05 02:56:49 0000</bug_when>
            <thetext>Sorry, I do not notice that I have clicked the commit button twice!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2006-04-14 04:37:20 0000</bug_when>
            <thetext>I cannot find this code in catalyst.  Could you instead provide a patch?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>liyiming@ict.ac.cn</who>
            <bug_when>2006-04-14 04:54:48 0000</bug_when>
            <thetext>Sorry,I did not give the exact line number in catalyst_lock.py
These codes are lied in 187 line.I think these codes should be constructed as below:

if not os.path.exists(self.lockfile):
  print &quot;lockfile does not exist &apos;%s&apos;.  Skipping Unlock...&quot; % self.lo                
  if (self.myfd != None):
      try:
          os.close(myfd)
          self.myfd=None
      except:
          pass
      return False
  else:
      return False
try:
  if self.myfd == None:
      self.myfd = os.open(self.lockfile, os.O_WRONLY,0660)
      unlinkfile = 1
      self.locking_method(self.myfd,fcntl.LOCK_UN)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2006-04-19 08:32:44 0000</bug_when>
            <thetext>Sorry, could you please make a patch for this one.  I can&apos;t tell if you&apos;ve changed something or removed something.

Thanks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>liyiming@ict.ac.cn</who>
            <bug_when>2006-04-19 18:33:36 0000</bug_when>
            <thetext>--- catalyst_lock.py.original   2006-04-19 21:44:14.000000000 +0800
+++ catalyst_lock.py.changed    2006-04-20 09:33:47.000000000 +0800
@@ -183,10 +183,7 @@
                        self.myfd=None
                     except:
                         pass
-                    return False
-        if self.myfd == None:
-           return False
-
+                return False
         try:
                 if self.myfd == None:
                     self.myfd = os.open(self.lockfile, os.O_WRONLY,0660)

this time ok?^^</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2006-04-20 07:23:37 0000</bug_when>
            <thetext>That definitely makes more sense now, thank you.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2006-05-25 09:30:40 0000</bug_when>
            <thetext>This was apparently fixed in CVS without someone closing this bug.  Without taking the time to verify when it was fixed, I can guarantee you that it is fixed in 2.0_rc46, which I am about to roll.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>