index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | doc/Makefile.am | 4 | ||||
-rw-r--r-- | doc/pacman.conf.5.txt | 3 | ||||
-rw-r--r-- | etc/makepkg.conf.in | 2 | ||||
-rw-r--r-- | etc/pacman.conf.in | 1 | ||||
-rw-r--r-- | lib/libalpm/alpm.h | 2 | ||||
-rw-r--r-- | lib/libalpm/dload.c | 53 | ||||
-rw-r--r-- | lib/libalpm/handle.c | 14 | ||||
-rw-r--r-- | lib/libalpm/handle.h | 1 | ||||
-rw-r--r-- | scripts/makepkg.sh.in | 4 | ||||
-rw-r--r-- | src/pacman/pacman.c | 5 |
@@ -57,7 +57,6 @@ library is initialized. * dbpath: The toplevel database directory (Default: /var/lib/pacman) * logfile: The base path to pacman's log file (Default: /var/log/pacman.log) * usesyslog: Log to syslog instead of `logfile` for file-base logging. -* nopassiveftp: Do not use passive FTP commands for ftp connections. The following options also have `alpm_option_{add,remove}_*` functions, as the values are list structures. diff --git a/doc/Makefile.am b/doc/Makefile.am index 4703b63a..6261d926 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -84,12 +84,12 @@ ASCIIDOC_OPTS = \ -a pacman_version="$(REAL_PACKAGE_VERSION)" \ -a pacman_date="`date +%Y-%m-%d`" \ -a sysconfdir=$(sysconfdir) + A2X_OPTS = \ --no-xmllint \ -d manpage \ -f manpage \ - --xsltproc-opts='-param man.endnotes.list.enabled 0' \ - --xsltproc-opts='-param man.endnotes.are.numbered 0' + --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0' # These rules are due to the includes and files of the asciidoc text $(ASCIIDOC_MANS): asciidoc.conf footer.txt diff --git a/doc/pacman.conf.5.txt b/doc/pacman.conf.5.txt index a1c1f2a6..46a0b3de 100644 --- a/doc/pacman.conf.5.txt +++ b/doc/pacman.conf.5.txt @@ -108,9 +108,6 @@ Options http/ftp support, or need the more advanced proxy support that comes with utilities like wget. -*NoPassiveFtp*:: - Disables passive ftp connections when downloading packages. (aka Active Mode) - *NoUpgrade =* file ...:: All files listed with a `NoUpgrade` directive will never be touched during a package install/upgrade, and the new files will be installed with a diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index 1368ff1f..3a3a4154 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -26,7 +26,7 @@ DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u' CARCH="@CARCH@" CHOST="@CHOST@" -#-- Exclusive: will only run on @CARCHFLAGS@ +#-- Exclusive: will only run on @CARCH@ # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe" diff --git a/etc/pacman.conf.in b/etc/pacman.conf.in index 30bfc321..35572740 100644 --- a/etc/pacman.conf.in +++ b/etc/pacman.conf.in @@ -28,7 +28,6 @@ SyncFirst = pacman #NoExtract = # Misc options (all disabled by default) -#NoPassiveFtp #UseSyslog #ShowSize #UseDelta diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index ce8c6919..9a935c28 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -151,8 +151,6 @@ void alpm_option_add_ignoregrp(const char *grp); void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps); int alpm_option_remove_ignoregrp(const char *grp); -unsigned short alpm_option_get_nopassiveftp(); -void alpm_option_set_nopassiveftp(unsigned short nopasv); void alpm_option_set_usedelta(unsigned short usedelta); pmdb_t *alpm_option_get_localdb(); diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 4695731a..f8fb09fe 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -76,30 +76,6 @@ static char *get_tempfile(const char *path, const char *filename) { return(tempfile); } -/* Build a 'struct url' from an url. */ -static struct url *url_for_string(const char *url) -{ - struct url *ret = NULL; - ret = fetchParseURL(url); - if(!ret) { - _alpm_log(PM_LOG_ERROR, _("url '%s' is invalid\n"), url); - RET_ERR(PM_ERR_SERVER_BAD_URL, NULL); - } - - /* if no URL scheme specified, assume HTTP */ - if(strlen(ret->scheme) == 0) { - _alpm_log(PM_LOG_WARNING, _("url scheme not specified, assuming HTTP\n")); - strcpy(ret->scheme, SCHEME_HTTP); - } - /* add a user & password for anonymous FTP */ - if(strcmp(ret->scheme,SCHEME_FTP) == 0 && strlen(ret->user) == 0) { - strcpy(ret->user, "anonymous"); - strcpy(ret->pwd, "libalpm@guest"); - } - - return(ret); -} - static int download_internal(const char *url, const char *localpath, time_t mtimeold, time_t *mtimenew) { fetchIO *dlf = NULL; @@ -110,17 +86,20 @@ static int download_internal(const char *url, const char *localpath, size_t dl_thisfile = 0, nread = 0; char *tempfile, *destfile, *filename; struct sigaction new_action, old_action; - struct url *fileurl = url_for_string(url); + struct url *fileurl; char buffer[PM_DLBUF_LEN]; - if(!fileurl) { - return(-1); - } - filename = get_filename(url); if(!filename) { return(-1); } + + fileurl = fetchParseURL(url); + if(!fileurl) { + _alpm_log(PM_LOG_ERROR, _("url '%s' is invalid\n"), url); + RET_ERR(PM_ERR_SERVER_BAD_URL, -1); + } + destfile = get_destfile(localpath, filename); tempfile = get_tempfile(localpath, filename); @@ -161,7 +140,7 @@ static int download_internal(const char *url, const char *localpath, sigaction(SIGPIPE, NULL, &old_action); sigaction(SIGPIPE, &new_action, NULL); - dlf = fetchXGet(fileurl, &ust, (handle->nopassiveftp ? "i" : "pi")); + dlf = fetchXGet(fileurl, &ust, "i"); if(fetchLastErrCode == FETCH_UNCHANGED) { _alpm_log(PM_LOG_DEBUG, "mtimes are identical, skipping %s\n", filename); @@ -214,14 +193,12 @@ static int download_internal(const char *url, const char *localpath, while((nread = fetchIO_read(dlf, buffer, PM_DLBUF_LEN)) > 0) { size_t nwritten = 0; - while(nwritten < nread) { - nwritten += fwrite(buffer, 1, (nread - nwritten), localf); - if(ferror(localf)) { - _alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s\n"), - destfile, strerror(errno)); - ret = -1; - goto cleanup; - } + nwritten = fwrite(buffer, 1, nread, localf); + if((nwritten != nread) || ferror(localf)) { + _alpm_log(PM_LOG_ERROR, _("error writing to file '%s': %s\n"), + destfile, strerror(errno)); + ret = -1; + goto cleanup; } dl_thisfile += nread; diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index d1a35ad9..819b9742 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -213,15 +213,6 @@ alpm_list_t SYMEXPORT *alpm_option_get_ignoregrps() return handle->ignoregrp; } -unsigned short SYMEXPORT alpm_option_get_nopassiveftp() -{ - if (handle == NULL) { - pm_errno = PM_ERR_HANDLE_NULL; - return -1; - } - return handle->nopassiveftp; -} - pmdb_t SYMEXPORT *alpm_option_get_localdb() { if (handle == NULL) { @@ -529,11 +520,6 @@ int SYMEXPORT alpm_option_remove_ignoregrp(const char *grp) return(0); } -void SYMEXPORT alpm_option_set_nopassiveftp(unsigned short nopasv) -{ - handle->nopassiveftp = nopasv; -} - void SYMEXPORT alpm_option_set_usedelta(unsigned short usedelta) { handle->usedelta = usedelta; diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index c7c262cf..541eb23a 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -58,7 +58,6 @@ typedef struct _pmhandle_t { /* options */ unsigned short usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */ - unsigned short nopassiveftp; /* Don't use PASV ftp connections */ unsigned short usedelta; /* Download deltas if possible */ } pmhandle_t; diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c8384f80..daa95856 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -354,7 +354,7 @@ check_deps() { fi } -handledeps() { +handle_deps() { local R_DEPS_SATISFIED=0 local R_DEPS_MISSING=1 @@ -402,7 +402,7 @@ resolve_deps() { return $R_DEPS_SATISFIED fi - if handledeps $deplist; then + if handle_deps $deplist; then pkgdeps="$pkgdeps $deplist" # check deps again to make sure they were resolved deplist="$(check_deps $*)" diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 77c558d1..25647b5e 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -787,10 +787,7 @@ static int _parseconfig(const char *file, const char *givensection, } if(ptr == NULL && strcmp(section, "options") == 0) { /* directives without settings, all in [options] */ - if(strcmp(key, "NoPassiveFtp") == 0) { - alpm_option_set_nopassiveftp(1); - pm_printf(PM_LOG_DEBUG, "config: nopassiveftp\n"); - } else if(strcmp(key, "UseSyslog") == 0) { + if(strcmp(key, "UseSyslog") == 0) { alpm_option_set_usesyslog(1); pm_printf(PM_LOG_DEBUG, "config: usesyslog\n"); } else if(strcmp(key, "ILoveCandy") == 0) { |