Imported from pacman-2.5.1.tar.gz
This commit is contained in:
parent
636c641119
commit
ffe1d50cff
8 changed files with 53 additions and 44 deletions
|
@ -1,5 +1,8 @@
|
|||
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
|
||||
- Sped up package load times by about 500% by introducing
|
||||
a .FILELIST into the package
|
||||
|
|
|
@ -34,7 +34,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
|||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
||||
PACVER = 2.5
|
||||
PACVER = 2.5.1
|
||||
|
||||
TOPDIR = @srcdir@
|
||||
SRCDIR = $(TOPDIR)/src/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
myver='2.5'
|
||||
myver='2.5.1'
|
||||
|
||||
usage() {
|
||||
echo "gensync $myver"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
myver='2.5'
|
||||
myver='2.5.1'
|
||||
startdir=`pwd`
|
||||
|
||||
[ -f /etc/makepkg.conf ] && source /etc/makepkg.conf
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
toplevel=`pwd`
|
||||
version="2.5"
|
||||
version="2.5.1"
|
||||
|
||||
usage() {
|
||||
echo "makeworld version $version"
|
||||
|
@ -42,12 +42,12 @@ for arg in $*; do
|
|||
-*)
|
||||
while getopts "cisbdf-" opt; do
|
||||
case $opt in
|
||||
c) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -c" ;;
|
||||
i) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -i" ;;
|
||||
s) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -s" ;;
|
||||
b) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -b" ;;
|
||||
d) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -d" ;;
|
||||
f) MAKEPKGS_OPTS="$MAKEPKGS_OPTS -f" ;;
|
||||
c) MAKEPKG_OPTS="$MAKEPKG_OPTS -c" ;;
|
||||
i) MAKEPKG_OPTS="$MAKEPKG_OPTS -i" ;;
|
||||
s) MAKEPKG_OPTS="$MAKEPKG_OPTS -s" ;;
|
||||
b) MAKEPKG_OPTS="$MAKEPKG_OPTS -b" ;;
|
||||
d) MAKEPKG_OPTS="$MAKEPKG_OPTS -d" ;;
|
||||
f) MAKEPKG_OPTS="$MAKEPKG_OPTS -f" ;;
|
||||
-)
|
||||
OPTIND=0
|
||||
break
|
||||
|
|
|
@ -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);
|
||||
if(!stat(pm_install, &buf)) {
|
||||
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);
|
||||
|
||||
system(line);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#define _PAC_PACMAN_H
|
||||
|
||||
#ifndef PACVER
|
||||
#define PACVER "2.5"
|
||||
#define PACVER "2.5.1"
|
||||
#endif
|
||||
|
||||
#ifndef PKGDIR
|
||||
|
|
|
@ -155,6 +155,8 @@ int downloadfiles(PMList *servers, char *localpath, PMList *files)
|
|||
sync_fnm[24] = '\0';
|
||||
|
||||
if(!server->islocal) {
|
||||
int tries = 2;
|
||||
while(tries) {
|
||||
if(!FtpSize(fn, &fsz, FTPLIB_IMAGE, control)) {
|
||||
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",
|
||||
fn, server->server, FtpLastResponse(control));
|
||||
/* 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 {
|
||||
char completefile[PATH_MAX];
|
||||
log_progress(control, fsz-offset, &fsz);
|
||||
complete = list_add(complete, fn);
|
||||
tries = 0;
|
||||
/* rename "output.part" file to "output" file */
|
||||
snprintf(completefile, PATH_MAX, "%s/%s", localpath, fn);
|
||||
rename(output, completefile);
|
||||
}
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
}
|
||||
} else {
|
||||
/* local repository, just copy the file */
|
||||
char src[PATH_MAX], dest[PATH_MAX];
|
||||
|
|
Loading…
Add table
Reference in a new issue