[oe-commits] Mike Westerhof : opkg_nogpg-nocurl: update fix_tmpdirs patch, bump PR

GIT User account git at amethyst.openembedded.net
Sun Jan 11 00:35:04 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 1ca0d99090f3ee489b79eba5f94ec7c216af7834
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=1ca0d99090f3ee489b79eba5f94ec7c216af7834

Author: Mike Westerhof <mwester at dls.net>
Date:   Sat Jan 10 18:33:53 2009 -0600

opkg_nogpg-nocurl: update fix_tmpdirs patch, bump PR

---

 .../files/opkg_wget_nogpg_03_fix_tmpdirs.patch     |   15 ++++++++-------
 packages/opkg/opkg-nogpg-nocurl_svn.bb             |    2 +-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/packages/opkg/files/opkg_wget_nogpg_03_fix_tmpdirs.patch b/packages/opkg/files/opkg_wget_nogpg_03_fix_tmpdirs.patch
index e619562..68c2b93 100644
--- a/packages/opkg/files/opkg_wget_nogpg_03_fix_tmpdirs.patch
+++ b/packages/opkg/files/opkg_wget_nogpg_03_fix_tmpdirs.patch
@@ -5,7 +5,8 @@
 # files it creates further reduce the amount of available memory.
 #
 # Mike Westerhof, Dec 2008
-
+#
+# Patch updated Jan 2009
 --- orig/libopkg/opkg.c	2008-12-20 15:07:04.000000000 -0600
 +++ opkg/libopkg/opkg.c	2008-12-21 21:41:07.000000000 -0600
 @@ -773,15 +773,17 @@
@@ -55,7 +56,7 @@
 +//     tmp = tmpfile();
 +     sprintf_alloc(&tmp_fname, "%s-XXXXXX", opkg_conf_tmp_name);
 +     tmp_f = mkstemp(tmp_fname);
-+     if (tmp_f == 0) {
++     if (tmp_f < 0) {
 +             perror("mkstemp()");
 +             free(tmp_fname);
 +             return errno;
@@ -63,7 +64,7 @@
 +     /* printf("%s: Using tmp_fname %s\n", __FUNCTION__, tmp_fname); */
 +     unlink(tmp_fname);
 +     free(tmp_fname);
-+     tmp = fdopen(tmp_f, "w");
++     tmp = fdopen(tmp_f, "w+");
 +
       if (pkg->installed_files) {
  	  str_list_elt_t *elt;
@@ -115,7 +116,7 @@
 +//     control_file = tmpfile();
 +     sprintf_alloc(&tmp_fname, "%s-XXXXXX", opkg_conf_tmp_name);
 +     tmp_f = mkstemp(tmp_fname);
-+     if (tmp_f == 0) {
++     if (tmp_f < 0) {
 +	     perror("mkstemp()");
 +	     free(tmp_fname);
 +	     return errno;
@@ -123,7 +124,7 @@
 +     /* printf("%s: Using tmp_fname %s\n", __FUNCTION__, tmp_fname); */
 +     unlink(tmp_fname);
 +     free(tmp_fname);
-+     control_file = fdopen(tmp_f, "w");
++     control_file = fdopen(tmp_f, "w+");
 +
       err = pkg_extract_control_file_to_stream(pkg, control_file);
       if (err) { return err; }
@@ -145,7 +146,7 @@
 +//	  list_file = tmpfile();
 +	  sprintf_alloc(&tmp_fname, "%s-XXXXXX", opkg_conf_tmp_name);
 +	  tmp_f = mkstemp(tmp_fname);
-+	  if (tmp_f == 0) {
++	  if (tmp_f < 0) {
 +		  perror("mkstemp()");
 +		  free(tmp_fname);
 +		  return pkg->installed_files;
@@ -153,7 +154,7 @@
 +	  /* printf("%s: Using tmp_fname %s\n", __FUNCTION__, tmp_fname); */
 +	  unlink(tmp_fname);
 +	  free(tmp_fname);
-+	  list_file = fdopen(tmp_f, "w");
++	  list_file = fdopen(tmp_f, "w+");
 +
  	  err = pkg_extract_data_file_names_to_stream(pkg, list_file);
  	  if (err) {
diff --git a/packages/opkg/opkg-nogpg-nocurl_svn.bb b/packages/opkg/opkg-nogpg-nocurl_svn.bb
index d385dc8..4daa58f 100644
--- a/packages/opkg/opkg-nogpg-nocurl_svn.bb
+++ b/packages/opkg/opkg-nogpg-nocurl_svn.bb
@@ -10,7 +10,7 @@ SRC_URI += " \
 	    file://opkg_wget_nogpg_02_use_vfork_system.patch;patch=1 \
 	    file://opkg_wget_nogpg_03_fix_tmpdirs.patch;patch=1 \
 	   "
-PR = "r2"
+PR = "r3"
 
 SRCREV = "${SRCREV_pn-opkg}"
 





More information about the Openembedded-commits mailing list