From 133a39e2bb78f2be1a60094a5a398f04315df64a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 27 Oct 2009 21:11:29 -0500 Subject: Fix opendir error condition checks Thanks to Laszlo Papp for the following catch: opendir(path)) == (DIR *)-1; is maybe the result of misunderstanding the manpage. If an opendir() call isn't successful it returns NULL rather than '(DIR *)-1'. Noticed-by: Laszlo Papp Signed-off-by: Dan McGee --- lib/libalpm/util.c | 3 ++- src/pacman/util.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 082c095b..2b006e21 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -404,7 +404,8 @@ int _alpm_rmrf(const char *path) } } } else { - if((dirp = opendir(path)) == (DIR *)-1) { + dirp = opendir(path); + if(!dirp) { return(1); } for(dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) { diff --git a/src/pacman/util.c b/src/pacman/util.c index a02b43cd..c68e6841 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -174,7 +174,8 @@ int rmrf(const char *path) return(1); } - if((dirp = opendir(path)) == (DIR *)-1) { + dirp = opendir(path); + if(!dirp) { return(1); } for(dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) { -- cgit v1.2.3-70-g09d2 From db756ed9316648c8ba6a82a0f0818515421f8a94 Mon Sep 17 00:00:00 2001 From: Cedric Staniewski Date: Thu, 5 Nov 2009 23:14:09 +0000 Subject: makepkg: quote arrays in order to preserve spaces in array items Fixes FS#16871 and makes the pkgdesc workaround obsolete. Signed-off-by: Cedric Staniewski Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ba0d3d91..13e4ed5e 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1298,7 +1298,7 @@ devel_update() { backup_package_variables() { for var in ${splitpkg_overrides[@]}; do indirect="${var}_backup" - eval "${indirect}=(\${$var[@]})" + eval "${indirect}=(\"\${$var[@]}\")" done } @@ -1306,16 +1306,11 @@ restore_package_variables() { for var in ${splitpkg_overrides[@]}; do indirect="${var}_backup" if [ -n "${!indirect}" ]; then - eval "${var}=(\${$indirect[@]})" + eval "${var}=(\"\${$indirect[@]}\")" else unset ${var} fi done - - # pkgdesc gets restored as an array - convert back to a string - local pkgdesc_backup="${pkgdesc[@]}" - unset pkgdesc - pkgdesc=${pkgdesc_backup} } # getopt like parser -- cgit v1.2.3-70-g09d2 From e09253d15b879f3375d57efd656e687a984ebc36 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 10 Nov 2009 11:55:38 -0600 Subject: Necessary updates for 3.3.3 release Should cover everything worth mentioning in NEWS, plus the version number bumps as usual. Signed-off-by: Dan McGee --- NEWS | 9 +++++++++ configure.ac | 4 ++-- doc/index.txt | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 7fd6df11..743028c0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,14 @@ VERSION DESCRIPTION ----------------------------------------------------------------------------- +3.3.3 - correctly check the return code from opendir() + - fix possible infinite loop in alpm_list_remove() + - makepkg: + - quote arrays to preserve spaces in arrays (FS#16871) + - allow passing arguments with spaces + - adjust preselected option for clearing cache + - translations: + - zh_CN: fix positional parameter usage in makepkg (FS#16983) + - el: fix Y/N response translation (FS#16568) 3.3.2 - fix infinite filesize download issue (FS#16359) - fix bogus download size on TotalDownload - documentation updates diff --git a/configure.ac b/configure.ac index dada0dd8..80e41a6e 100644 --- a/configure.ac +++ b/configure.ac @@ -42,12 +42,12 @@ AC_PREREQ(2.60) # pacman_version_micro += 1 m4_define([lib_current], [4]) -m4_define([lib_revision], [2]) +m4_define([lib_revision], [3]) m4_define([lib_age], [0]) m4_define([pacman_version_major], [3]) m4_define([pacman_version_minor], [3]) -m4_define([pacman_version_micro], [2]) +m4_define([pacman_version_micro], [3]) m4_define([pacman_version], [pacman_version_major.pacman_version_minor.pacman_version_micro]) diff --git a/doc/index.txt b/doc/index.txt index 8cd9b414..646a5dce 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -62,6 +62,7 @@ Releases `------------`------- Date Version --------------------- +2009-11-10 v3.3.3 2009-10-05 v3.3.2 2009-09-22 v3.3.1 2009-08-02 v3.3.0 -- cgit v1.2.3-70-g09d2