Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128878 - Another bug in catalyst2_rc40
Summary: Another bug in catalyst2_rc40
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
: 128880 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-05 01:50 UTC by Alvin Lee
Modified: 2006-05-25 09:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Lee 2006-04-05 01:50:56 UTC
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)
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-05 01:56:44 UTC
*** Bug 128880 has been marked as a duplicate of this bug. ***
Comment 2 Alvin Lee 2006-04-05 02:56:49 UTC
Sorry, I do not notice that I have clicked the commit button twice!
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-04-14 04:37:20 UTC
I cannot find this code in catalyst.  Could you instead provide a patch?
Comment 4 Alvin Lee 2006-04-14 04:54:48 UTC
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 "lockfile does not exist '%s'.  Skipping Unlock..." % 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)
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2006-04-19 08:32:44 UTC
Sorry, could you please make a patch for this one.  I can't tell if you've changed something or removed something.

Thanks
Comment 6 Alvin Lee 2006-04-19 18:33:36 UTC
--- 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?^^
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2006-04-20 07:23:37 UTC
That definitely makes more sense now, thank you.
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2006-05-25 09:30:40 UTC
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.