rpms/openoffice.org/devel openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch, NONE, 1.1 openoffice.org.spec, 1.2293, 1.2294

Caolan McNamara caolanm at fedoraproject.org
Tue Jul 20 08:49:26 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv7305

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch 
Log Message:
add openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch

openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch:
 dp_misc.cxx |   39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

--- NEW FILE openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch ---
diff -ru desktop.orig/source/deployment/misc/dp_misc.cxx desktop/source/deployment/misc/dp_misc.cxx
--- desktop.orig/source/deployment/misc/dp_misc.cxx	2010-07-20 08:31:24.000000000 +0100
+++ desktop/source/deployment/misc/dp_misc.cxx	2010-07-20 09:12:23.000000000 +0100
@@ -145,6 +145,23 @@
     return pipe.is();
 }
 
+//get modification time
+static bool getModifyTimeTargetFile(const OUString &rFileURL, TimeValue &rTime)
+{
+    ::osl::DirectoryItem item;
+    if (::osl::DirectoryItem::get(rFileURL, item) != ::osl::File::E_None)
+        return false;
+
+    ::osl::FileStatus stat(FileStatusMask_ModifyTime|FileStatusMask_Type|FileStatusMask_LinkTargetURL);
+    if (item.getFileStatus(stat) != ::osl::File::E_None)
+        return false;
+
+    if( stat.getFileType() == ::osl::FileStatus::Link )
+        return getModifyTimeTargetFile(stat.getLinkTargetURL(), rTime);
+
+    rTime = stat.getModifyTime();
+    return true;
+}
 
 //Returns true if the Folder was more recently modified then
 //the lastsynchronized file. That is the repository needs to
@@ -183,28 +200,19 @@
     
     //compare the modification time of the extension folder and the last
     //modified file
-    ::osl::FileStatus statFolder(FileStatusMask_ModifyTime);
-    ::osl::FileStatus statFile(FileStatusMask_ModifyTime);
-    if (itemExtFolder.getFileStatus(statFolder) == ::osl::File::E_None)
+    TimeValue timeFolder;
+    if (getModifyTimeTargetFile(folderURL, timeFolder))
     {
-        if (itemFile.getFileStatus(statFile) == ::osl::File::E_None)
+        TimeValue timeFile;
+        if (getModifyTimeTargetFile(fileURL, timeFile))
         {
-            TimeValue timeFolder = statFolder.getModifyTime();
-            TimeValue timeFile = statFile.getModifyTime();
-
-		fprintf(stderr, "compare extension %s to %s\n", 
-			rtl::OUStringToOString(folderURL, RTL_TEXTENCODING_UTF8).getStr(),
-			rtl::OUStringToOString(fileURL, RTL_TEXTENCODING_UTF8).getStr()
-		);
-		fprintf(stderr, "compare extension %d to %d\n", timeFolder.Seconds, timeFile.Seconds);
-
-            if (timeFile.Seconds < timeFolder.Seconds)
+            if (timeFile.Seconds < timeFolder.Seconds)   
                 bNeedsSync = true;
         }
         else
         {
             OSL_ASSERT(0);
-            bNeedsSync = true; 
+            bNeedsSync = true;
         }
     }
     else
@@ -212,6 +220,7 @@
         OSL_ASSERT(0);
         bNeedsSync = true;
     }
+
     return bNeedsSync;    
 }
 


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2293
retrieving revision 1.2294
diff -u -p -r1.2293 -r1.2294
--- openoffice.org.spec	19 Jul 2010 19:45:48 -0000	1.2293
+++ openoffice.org.spec	20 Jul 2010 08:49:25 -0000	1.2294
@@ -119,6 +119,7 @@ Patch41: openoffice.org-3.3.0.oooXXXXX.o
 Patch42: openoffice.org-3.3.0.oooXXXXX.afms.buildtype.patch
 Patch43: workspace.sb126.patch
 Patch44: openoffice.org-3.3.0.ooo113259.vcl.xioerror.patch
+Patch45: openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1651,6 +1652,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch42 -p0 -b .oooXXXXX.afms.buildtype.patch
 %patch43 -p1 -b .workspace.sb126.patch
 %patch44 -p0 -b .openoffice.org-3.3.0.ooo113259.vcl.xioerror.patch
+%patch45 -p0 -b .openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`



More information about the scm-commits mailing list