[arch-commits] Commit in chromium/trunk (PKGBUILD fix-downloads-on-ntfs.patch)

Evangelos Foutras foutrelis at archlinux.org
Wed Nov 9 19:26:17 UTC 2011


    Date: Wednesday, November 9, 2011 @ 14:26:16
  Author: foutrelis
Revision: 142436

upgpkg: chromium 15.0.874.106-2

Fix downloading on NTFS partitions (FS#26804)

Added:
  chromium/trunk/fix-downloads-on-ntfs.patch
Modified:
  chromium/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   20 +++++++++++++-------
 fix-downloads-on-ntfs.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-11-09 18:50:28 UTC (rev 142435)
+++ PKGBUILD	2011-11-09 19:26:16 UTC (rev 142436)
@@ -6,7 +6,7 @@
 
 pkgname=chromium
 pkgver=15.0.874.106
-pkgrel=1
+pkgrel=2
 pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser"
 arch=('i686' 'x86_64')
 url="http://www.chromium.org/"
@@ -22,12 +22,14 @@
         chromium.desktop
         chromium.sh
         gcc-4.6.patch
-        nacl.gypi)
-sha1sums=('ddf41ebb6f4a050e2dafc97d7b333675fced8d68'
-          '7d97535ec0ed124e95888de84b2c6a3654a27d4a'
-          '427ecf06cae11f28f59b1912d659ad5541391682'
-          '39999918746524fff30e73dc656754733df5c2c2'
-          'df4cee39e1d49e10f9c075f5e6e9db28e8260926')
+        nacl.gypi
+        fix-downloads-on-ntfs.patch)
+sha256sums=('d203de54fad4737434fc60c62406dd7548afb590e138defbfa5609ee8d91965c'
+            '09bfac44104f4ccda4c228053f689c947b3e97da9a4ab6fa34ce061ee83d0322'
+            'c53bfc4db9dde684fbaed6a4bbecb207e3e7a0a2703233426fe076a6d3c557f3'
+            '9c5e0803904d1a0e71ab7444c92a7046a34a9518eeba7a70f2eec7abecb8bf4e'
+            '25bddd2eee7821e18ddda06f6e69552c359e1c04a10971ac3985556c3d8ef059'
+            '6364c464d1885b2ec21076f01f993725925ccc066805f1ecbbeaf6f79b93c209')
 
 build() {
   cd "$srcdir/chromium-$pkgver"
@@ -43,6 +45,10 @@
   sed -i '/#include <cups\/cups.h>/ a #include <cups/ppd.h>' \
     chrome/browser/ui/webui/print_preview_handler.cc
 
+  # Fix downloading on NTFS partitions
+  # http://code.google.com/p/chromium/issues/detail?id=102200
+  patch -Np2 -i "$srcdir/fix-downloads-on-ntfs.patch"
+
   # Use Python 2
   find . -type f -exec sed -i -r \
     -e 's|/usr/bin/python$|&2|g' \

Added: fix-downloads-on-ntfs.patch
===================================================================
--- fix-downloads-on-ntfs.patch	                        (rev 0)
+++ fix-downloads-on-ntfs.patch	2011-11-09 19:26:16 UTC (rev 142436)
@@ -0,0 +1,26 @@
+--- trunk/src/content/browser/download/base_file.cc	2011/11/03 00:57:14	108379
++++ trunk/src/content/browser/download/base_file.cc	2011/11/03 00:57:22	108380
+@@ -332,16 +332,19 @@
+     int stat_error = stat(new_path.value().c_str(), &st);
+     bool stat_succeeded = (stat_error == 0);
+     if (!stat_succeeded)
+-      return LOG_ERROR("stat", net::MapSystemError(errno));
++      LOG_ERROR("stat", net::MapSystemError(errno));
+ 
+     // TODO(estade): Move() falls back to copying and deleting when a simple
+     // rename fails. Copying sucks for large downloads. crbug.com/8737
+     if (!file_util::Move(full_path_, new_path))
+       return LOG_ERROR("Move", net::MapSystemError(errno));
+ 
+-    int chmod_error = chmod(new_path.value().c_str(), st.st_mode);
+-    if (chmod_error < 0)
+-      return LOG_ERROR("chmod", net::MapSystemError(errno));
++    if (stat_succeeded) {
++      // On Windows file systems (FAT, NTFS), chmod fails.  This is OK.
++      int chmod_error = chmod(new_path.value().c_str(), st.st_mode);
++      if (chmod_error < 0)
++        LOG_ERROR("chmod", net::MapSystemError(errno));
++    }
+   }
+ #endif
+ 




More information about the arch-commits mailing list