backend/common/Makefile | 1 -
backend/common/rhnCache.py | 7 +++----
backend/common/rhn_posix.py | 22 ----------------------
backend/spacewalk-backend.spec | 1 -
4 files changed, 3 insertions(+), 28 deletions(-)
New commits:
commit 2a94380fb876c8434d3436d0b1afb71fde796cda
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Nov 6 13:42:22 2012 +0100
The fcntl documentation recommends different pack format.
diff --git a/backend/common/rhnCache.py b/backend/common/rhnCache.py
index 2096614..a59f3d7 100644
--- a/backend/common/rhnCache.py
+++ b/backend/common/rhnCache.py
@@ -34,9 +34,9 @@ from spacewalk.common.fileutils import makedirs, setPermsPath
CACHEDIR = "/var/cache/rhn"
# easy structures for locking stuff
-WRLOCK = pack("hhiiii", fcntl.F_WRLCK, 0, 0, 0, 0, 0)
-RDLOCK = pack("hhiiii", fcntl.F_RDLCK, 0, 0, 0, 0, 0)
-UNLOCK = pack("hhiiii", fcntl.F_UNLCK, 0, 0, 0, 0, 0)
+WRLOCK = pack("hhllhh", fcntl.F_WRLCK, 0, 0, 0, 0, 0)
+RDLOCK = pack("hhllhh", fcntl.F_RDLCK, 0, 0, 0, 0, 0)
+UNLOCK = pack("hhllhh", fcntl.F_UNLCK, 0, 0, 0, 0, 0)
def cleanupPath(path):
"""take ~taw/../some/path/$MOUNT_POINT/blah and make it
sensible."""
commit df2f5eb20dafe03eddeed750a8cecf23f4d49385
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Nov 6 13:40:31 2012 +0100
Only SEEK_SET used, no need to have zero defined in an extra module.
diff --git a/backend/common/Makefile b/backend/common/Makefile
index bf79740..abc3003 100644
--- a/backend/common/Makefile
+++ b/backend/common/Makefile
@@ -10,7 +10,6 @@ SUBDIR = common
SPACEWALK_FILES = __init__ \
apache \
byterange \
- rhn_posix \
rhnApache \
rhnCache \
rhnConfig \
diff --git a/backend/common/rhnCache.py b/backend/common/rhnCache.py
index f637cb3..2096614 100644
--- a/backend/common/rhnCache.py
+++ b/backend/common/rhnCache.py
@@ -26,7 +26,6 @@ from stat import ST_MTIME
from errno import EEXIST
from rhnLib import timestamp
-import rhn_posix
from spacewalk.common.fileutils import makedirs, setPermsPath
@@ -35,9 +34,9 @@ from spacewalk.common.fileutils import makedirs, setPermsPath
CACHEDIR = "/var/cache/rhn"
# easy structures for locking stuff
-WRLOCK = pack("hhiiii", fcntl.F_WRLCK, rhn_posix.SEEK_SET, 0, 0, 0, 0)
-RDLOCK = pack("hhiiii", fcntl.F_RDLCK, rhn_posix.SEEK_SET, 0, 0, 0, 0)
-UNLOCK = pack("hhiiii", fcntl.F_UNLCK, rhn_posix.SEEK_SET, 0, 0, 0, 0)
+WRLOCK = pack("hhiiii", fcntl.F_WRLCK, 0, 0, 0, 0, 0)
+RDLOCK = pack("hhiiii", fcntl.F_RDLCK, 0, 0, 0, 0, 0)
+UNLOCK = pack("hhiiii", fcntl.F_UNLCK, 0, 0, 0, 0, 0)
def cleanupPath(path):
"""take ~taw/../some/path/$MOUNT_POINT/blah and make it
sensible."""
diff --git a/backend/common/rhn_posix.py b/backend/common/rhn_posix.py
deleted file mode 100644
index 8d34862..0000000
--- a/backend/common/rhn_posix.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# This module provides the constants that used to be part of the
-# now-deprecated posixfile module
-#
-#
-# Copyright (c) 2008--2010 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-SEEK_SET = 0
-SEEK_CUR = 1
-SEEK_END = 2
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index ff873af..3561744 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -332,7 +332,6 @@ rm -f %{rhnconf}/rhnSecret.py*
%dir %{pythonrhnroot}/common
%{pythonrhnroot}/common/apache.py*
%{pythonrhnroot}/common/byterange.py*
-%{pythonrhnroot}/common/rhn_posix.py*
%{pythonrhnroot}/common/rhnApache.py*
%{pythonrhnroot}/common/rhnCache.py*
%{pythonrhnroot}/common/rhnConfig.py*