Imported from pacman-2.5.1.tar.gz

This commit is contained in:
Judd Vinet 2003-07-12 00:06:30 +00:00
parent 636c641119
commit ffe1d50cff
8 changed files with 53 additions and 44 deletions

View file

@ -1,5 +1,8 @@
VERSION DESCRIPTION VERSION DESCRIPTION
------------------------------------------------------------------ ------------------------------------------------------------------
2.5.1 - Added retries to the downloader to get around some
transient network errors. (this will likely be an option
in pacman.conf for later versions)
2.5 - Added an URL tag to package info 2.5 - Added an URL tag to package info
- Sped up package load times by about 500% by introducing - Sped up package load times by about 500% by introducing
a .FILELIST into the package a .FILELIST into the package

View file

@ -34,7 +34,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
PACVER = 2.5 PACVER = 2.5.1
TOPDIR = @srcdir@ TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/ SRCDIR = $(TOPDIR)/src/

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
myver='2.5' myver='2.5.1'
usage() { usage() {
echo "gensync $myver" echo "gensync $myver"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
myver='2.5' myver='2.5.1'
startdir=`pwd` startdir=`pwd`
[ -f /etc/makepkg.conf ] && source /etc/makepkg.conf [ -f /etc/makepkg.conf ] && source /etc/makepkg.conf

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
toplevel=`pwd` toplevel=`pwd`
version="2.5" version="2.5.1"
usage() { usage() {
echo "makeworld version $version" echo "makeworld version $version"
@ -42,12 +42,12 @@ for arg in $*; do
-*) -*)
while getopts "cisbdf-" opt; do while getopts "cisbdf-" opt; do
case $opt in case $opt in
c) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -c" ;; c) MAKEPKG_OPTS="$MAKEPKG_OPTS -c" ;;
i) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -i" ;; i) MAKEPKG_OPTS="$MAKEPKG_OPTS -i" ;;
s) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -s" ;; s) MAKEPKG_OPTS="$MAKEPKG_OPTS -s" ;;
b) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -b" ;; b) MAKEPKG_OPTS="$MAKEPKG_OPTS -b" ;;
d) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -d" ;; d) MAKEPKG_OPTS="$MAKEPKG_OPTS -d" ;;
f) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -f" ;; f) MAKEPKG_OPTS="$MAKEPKG_OPTS -f" ;;
-) -)
OPTIND=0 OPTIND=0
break break

View file

@ -1226,7 +1226,7 @@ int pacman_remove(pacdb_t *db, PMList *targets)
snprintf(pm_install, PATH_MAX, "%s%s/%s/%s-%s/install", pmo_root, PKGDIR, db->treename, info->name, info->version); snprintf(pm_install, PATH_MAX, "%s%s/%s/%s-%s/install", pmo_root, PKGDIR, db->treename, info->name, info->version);
if(!stat(pm_install, &buf)) { if(!stat(pm_install, &buf)) {
vprint("Executing pre-remove script...\n"); vprint("Executing pre-remove script...\n");
snprintf(pm_install, PATH_MAX, "%s%s/%s/%s-%s/install", pmo_root, PKGDIR, db->treename, info->name, info->version); snprintf(pm_install, PATH_MAX, "%s/%s/%s-%s/install", PKGDIR, db->treename, info->name, info->version);
snprintf(line, PATH_MAX, "chroot %s /bin/sh %s pre_remove %s", pmo_root, pm_install, info->version); snprintf(line, PATH_MAX, "chroot %s /bin/sh %s pre_remove %s", pmo_root, pm_install, info->version);
system(line); system(line);

View file

@ -22,7 +22,7 @@
#define _PAC_PACMAN_H #define _PAC_PACMAN_H
#ifndef PACVER #ifndef PACVER
#define PACVER "2.5" #define PACVER "2.5.1"
#endif #endif
#ifndef PKGDIR #ifndef PKGDIR

View file

@ -155,6 +155,8 @@ int downloadfiles(PMList *servers, char *localpath, PMList *files)
sync_fnm[24] = '\0'; sync_fnm[24] = '\0';
if(!server->islocal) { if(!server->islocal) {
int tries = 2;
while(tries) {
if(!FtpSize(fn, &fsz, FTPLIB_IMAGE, control)) { if(!FtpSize(fn, &fsz, FTPLIB_IMAGE, control)) {
fprintf(stderr, "warning: failed to get filesize for %s\n", fn); fprintf(stderr, "warning: failed to get filesize for %s\n", fn);
} }
@ -180,16 +182,20 @@ int downloadfiles(PMList *servers, char *localpath, PMList *files)
fprintf(stderr, "\nfailed downloading %s from %s: %s\n", fprintf(stderr, "\nfailed downloading %s from %s: %s\n",
fn, server->server, FtpLastResponse(control)); fn, server->server, FtpLastResponse(control));
/* we leave the partially downloaded file in place so it can be resumed later */ /* we leave the partially downloaded file in place so it can be resumed later */
/* try each file twice in case it was just one of those transient network errors */
tries--;
} else { } else {
char completefile[PATH_MAX]; char completefile[PATH_MAX];
log_progress(control, fsz-offset, &fsz); log_progress(control, fsz-offset, &fsz);
complete = list_add(complete, fn); complete = list_add(complete, fn);
tries = 0;
/* rename "output.part" file to "output" file */ /* rename "output.part" file to "output" file */
snprintf(completefile, PATH_MAX, "%s/%s", localpath, fn); snprintf(completefile, PATH_MAX, "%s/%s", localpath, fn);
rename(output, completefile); rename(output, completefile);
} }
printf("\n"); printf("\n");
fflush(stdout); fflush(stdout);
}
} else { } else {
/* local repository, just copy the file */ /* local repository, just copy the file */
char src[PATH_MAX], dest[PATH_MAX]; char src[PATH_MAX], dest[PATH_MAX];