diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-04-04 07:30:14 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-04-04 07:30:14 +0200 |
commit | 76f816b9f764434d02e90207ee4656ebae2b6a8c (patch) | |
tree | b115bfcb7322e63698cae0ffc9fd945d8fee2585 | |
parent | 9c9e18ef32c0cf3fe33ed251d28c70651bb85f65 (diff) | |
download | pacman-76f816b9f764434d02e90207ee4656ebae2b6a8c.tar.gz pacman-76f816b9f764434d02e90207ee4656ebae2b6a8c.tar.xz |
Backport changes from 3.0.1
* Align makepkg -g checksums (Tom Killian <tom@archlinux.org>)
* Use additional case-sensitive string compare to defeat locale issues (tr_TR)
* Added Russian mirror
* Fix a -R failure when trying to remove the same target twice
* Bump configure.ac version to 3.0.1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | etc/pacman.d/mirrorlist.in | 2 | ||||
-rw-r--r-- | lib/libalpm/alpm.c | 41 | ||||
-rw-r--r-- | lib/libalpm/trans.c | 3 | ||||
-rwxr-xr-x | scripts/makepkg.in | 6 |
6 files changed, 40 insertions, 19 deletions
@@ -1,5 +1,10 @@ VERSION DESCRIPTION ----------------------------------------------------------------------------- +3.0.1 - fix a locale issue with tr_TR upper/lower-case conversion + - allow removal when listing the same package multiple times + - fix a repo-add bug that left a .PKGINFO file in the current + directory + - proper error messages when we cannot read mtab for freespace 3.0.0 - first release based on libalpm backend - added internationalization (gettext) support: - de, fr, hu, it, pt_BR, en_GB, ru_RU translations diff --git a/configure.ac b/configure.ac index 2872c38e..baafd823 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.59) dnl Update it right before the release since $pkgver_foo are all _post_ release snapshots -AC_INIT([Pacman package manager], 3.0.0, [pacman-dev@archlinux.org], [pacman]) +AC_INIT([Pacman package manager], 3.0.1, [pacman-dev@archlinux.org], [pacman]) AC_LANG([C]) AC_CONFIG_HEADERS(config.h) AC_CANONICAL_HOST diff --git a/etc/pacman.d/mirrorlist.in b/etc/pacman.d/mirrorlist.in index 2f6090ea..7eb0ff26 100644 --- a/etc/pacman.d/mirrorlist.in +++ b/etc/pacman.d/mirrorlist.in @@ -52,6 +52,8 @@ Server = ftp://cesium.di.uminho.pt/pub/archlinux/@@REPO@@/os/@CARCH@ Server = ftp://darkstar.ist.utl.pt/pub/archlinux/@@REPO@@/os/@CARCH@ # - Romania Server = ftp://ftp.iasi.roedu.net/mirrors/archlinux.org/@@REPO@@/os/@CARCH@ +# - Russia +Server = http://archlinux.freeside.ru/@@REPO@@/os/@CARCH@ # - Sweden Server = ftp://ftp.ds.hj.se/pub/os/linux/archlinux/@@REPO@@/os/@CARCH@ Server = ftp://ftp.gigabit.nu/@@REPO@@/os/@CARCH@ diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 1678fd32..a53e98b8 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -891,6 +891,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const char *ptr = NULL; char *key = NULL; int linenum = 0; + char origkey[256]; char section[256] = ""; pmdb_t *db = NULL; @@ -945,21 +946,22 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const RET_ERR(PM_ERR_CONF_BAD_SYNTAX, -1); } _alpm_strtrim(key); + strncpy(origkey, key, min(255, strlen(key))); key = _alpm_strtoupper(key); if(!strlen(section) && strcmp(key, "INCLUDE")) { RET_ERR(PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION, -1); } if(ptr == NULL) { - if(!strcmp(key, "NOPASSIVEFTP")) { + if(strcmp(origkey, "NoPassiveFTP") == 0 || strcmp(key, "NOPASSIVEFTP") == 0) { alpm_option_set_nopassiveftp(1); _alpm_log(PM_LOG_DEBUG, _("config: nopassiveftp")); - } else if(!strcmp(key, "USESYSLOG")) { + } else if(strcmp(origkey, "UseSyslog") == 0 || strcmp(key, "USESYSLOG") == 0) { alpm_option_set_usesyslog(1); _alpm_log(PM_LOG_DEBUG, _("config: usesyslog")); - } else if(!strcmp(key, "ILOVECANDY")) { + } else if(strcmp(origkey, "ILoveCandy") == 0 || strcmp(key, "ILOVECANDY") == 0) { alpm_option_set_chomp(1); _alpm_log(PM_LOG_DEBUG, _("config: chomp")); - } else if(!strcmp(key, "USECOLOR")) { + } else if(strcmp(origkey, "UseColor") == 0 || strcmp(key, "USECOLOR") == 0) { alpm_option_set_usecolor(1); _alpm_log(PM_LOG_DEBUG, _("config: usecolor")); } else { @@ -967,13 +969,13 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const } } else { _alpm_strtrim(ptr); - if(!strcmp(key, "INCLUDE")) { + if(strcmp(origkey, "Include") == 0 || strcmp(key, "INCLUDE") == 0) { char conf[PATH_MAX]; strncpy(conf, ptr, PATH_MAX); _alpm_log(PM_LOG_DEBUG, _("config: including %s"), conf); alpm_parse_config(conf, callback, section); - } else if(!strcmp(section, "options")) { - if(!strcmp(key, "NOUPGRADE")) { + } else if(strcmp(section, "options") == 0) { + if(strcmp(origkey, "NoUpgrade") == 0 || strcmp(key, "NOUPGRADE") == 0) { char *p = ptr; char *q; @@ -986,7 +988,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const } alpm_option_add_noupgrade(p); _alpm_log(PM_LOG_DEBUG, _("config: noupgrade: %s"), p); - } else if(!strcmp(key, "NOEXTRACT")) { + } else if(strcmp(origkey, "NoExtract") == 0 || strcmp(key, "NOEXTRACT") == 0) { char *p = ptr; char *q; @@ -999,7 +1001,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const } alpm_option_add_noextract(p); _alpm_log(PM_LOG_DEBUG, _("config: noextract: %s"), p); - } else if(!strcmp(key, "IGNOREPKG")) { + } else if(strcmp(origkey, "IgnorePkg") == 0 || strcmp(key, "IGNOREPKG") == 0) { char *p = ptr; char *q; @@ -1012,7 +1014,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const } alpm_option_add_ignorepkg(p); _alpm_log(PM_LOG_DEBUG, _("config: ignorepkg: %s"), p); - } else if(!strcmp(key, "HOLDPKG")) { + } else if(strcmp(origkey, "HoldPkg") == 0 || strcmp(key, "HOLDPKG") == 0) { char *p = ptr; char *q; @@ -1025,27 +1027,34 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const } alpm_option_add_holdpkg(p); _alpm_log(PM_LOG_DEBUG, _("config: holdpkg: %s"), p); - } else if(!strcmp(key, "DBPATH")) { + } else if(strcmp(origkey, "DBPath") == 0 || strcmp(key, "DBPATH") == 0) { /* shave off the leading slash, if there is one */ if(*ptr == '/') { ptr++; } alpm_option_set_dbpath(ptr); _alpm_log(PM_LOG_DEBUG, _("config: dbpath: %s"), ptr); - } else if(!strcmp(key, "CACHEDIR")) { + } else if(strcmp(origkey, "CacheDir") == 0 || strcmp(key, "CACHEDIR") == 0) { /* shave off the leading slash, if there is one */ if(*ptr == '/') { ptr++; } alpm_option_set_cachedir(ptr); _alpm_log(PM_LOG_DEBUG, _("config: cachedir: %s"), ptr); - } else if (!strcmp(key, "LOGFILE")) { + } else if(strcmp(origkey, "RootDir") == 0 || strcmp(key, "ROOTDIR") == 0) { + /* shave off the leading slash, if there is one */ + if(*ptr == '/') { + ptr++; + } + alpm_option_set_root(ptr); + _alpm_log(PM_LOG_DEBUG, _("config: rootdir: %s"), ptr); + } else if (strcmp(origkey, "LogFile") == 0 || strcmp(key, "LOGFILE") == 0) { alpm_option_set_logfile(ptr); _alpm_log(PM_LOG_DEBUG, _("config: logfile: %s"), ptr); - } else if (!strcmp(key, "XFERCOMMAND")) { + } else if (strcmp(origkey, "XferCommand") == 0 || strcmp(key, "XFERCOMMAND") == 0) { alpm_option_set_xfercommand(ptr); _alpm_log(PM_LOG_DEBUG, _("config: xfercommand: %s"), ptr); - } else if (!strcmp(key, "UPGRADEDELAY")) { + } else if (strcmp(origkey, "UpgradeDelay") == 0 || strcmp(key, "UPGRADEDELAY") == 0) { /* The config value is in days, we use seconds */ time_t ud = atol(ptr) * 60 * 60 *24; alpm_option_set_upgradedelay(ud); @@ -1054,7 +1063,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const RET_ERR(PM_ERR_CONF_BAD_SYNTAX, -1); } } else { - if(!strcmp(key, "SERVER")) { + if(strcmp(origkey, "Server") == 0 || strcmp(key, "SERVER") == 0) { /* add to the list */ if(alpm_db_setserver(db, ptr) != 0) { /* pm_errno is set by alpm_db_setserver */ diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 1198292f..009ec7f1 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -135,7 +135,8 @@ int _alpm_trans_addtarget(pmtrans_t *trans, char *target) ASSERT(target != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1)); if(alpm_list_find_str(trans->targets, target)) { - RET_ERR(PM_ERR_TRANS_DUP_TARGET, -1); + return(0); + //RET_ERR(PM_ERR_TRANS_DUP_TARGET, -1); } switch(trans->type) { diff --git a/scripts/makepkg.in b/scripts/makepkg.in index 62a2a444..e2627eb1 100755 --- a/scripts/makepkg.in +++ b/scripts/makepkg.in @@ -762,7 +762,11 @@ else if [ $ct -eq 0 ]; then echo -n "${integrity_name}s=(" else - echo -ne "\t " + indent=0 + while [ $indent -lt $((${#integrity_name}+3)) ]; do + echo -n " " + indent=$(($indent+1)) + done fi echo -n "'$sum'" ct=$(($ct+1)) |