[pacman-dev] CVS update of pacman-lib (lib/libalpm/handle.c src/pacman/pacman.c)
Aaron Griffin
aaron at archlinux.org
Sun Mar 4 04:16:29 EST 2007
Date: Sunday, March 4, 2007 @ 04:16:29
Author: aaron
Path: /home/cvs-pacman/pacman-lib
Modified: lib/libalpm/handle.c (1.35 -> 1.36)
src/pacman/pacman.c (1.102 -> 1.103)
* Fixed the handle realroot stuff
* Added some {}
----------------------+
lib/libalpm/handle.c | 10 ++++++----
src/pacman/pacman.c | 3 ++-
2 files changed, 8 insertions(+), 5 deletions(-)
Index: pacman-lib/lib/libalpm/handle.c
diff -u pacman-lib/lib/libalpm/handle.c:1.35 pacman-lib/lib/libalpm/handle.c:1.36
--- pacman-lib/lib/libalpm/handle.c:1.35 Sun Mar 4 04:08:55 2007
+++ pacman-lib/lib/libalpm/handle.c Sun Mar 4 04:16:28 2007
@@ -155,13 +155,13 @@
/* According to the man page, realpath is safe to use IFF the second arg is
* NULL. */
char *realroot = realpath(root, NULL);
- if(!realroot) {
- realroot = root;
+ if(realroot) {
+ root = realroot;
+ } else {
_alpm_log(PM_LOG_ERROR, _("cannot canonicalize specified root path '%s'"), root);
}
- /* check again, in case both are null */
- if(realroot) {
+ if(root) {
/* verify root ends in a '/' */
int rootlen = strlen(realroot);
if(realroot[rootlen-1] != '/') {
@@ -172,6 +172,8 @@
handle->root[rootlen-1] = '/';
_alpm_log(PM_LOG_DEBUG, _("option 'root' = %s"), handle->root);
+ }
+ if(realroot) {
free(realroot);
}
}
Index: pacman-lib/src/pacman/pacman.c
diff -u pacman-lib/src/pacman/pacman.c:1.102 pacman-lib/src/pacman/pacman.c:1.103
--- pacman-lib/src/pacman/pacman.c:1.102 Mon Feb 26 03:43:02 2007
+++ pacman-lib/src/pacman/pacman.c Sun Mar 4 04:16:28 2007
@@ -434,8 +434,9 @@
}
/* workaround for tr_TR */
- if(lang && !strcmp(lang, "tr_TR"))
+ if(lang && !strcmp(lang, "tr_TR")) {
setlocale(LC_CTYPE, "C");
+ }
bindtextdomain("pacman", "/usr/share/locale");
textdomain("pacman");
More information about the pacman-dev
mailing list