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
|
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
|
||||||
|
|
|
@ -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/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
myver='2.5'
|
myver='2.5.1'
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "gensync $myver"
|
echo "gensync $myver"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -155,41 +155,47 @@ int downloadfiles(PMList *servers, char *localpath, PMList *files)
|
||||||
sync_fnm[24] = '\0';
|
sync_fnm[24] = '\0';
|
||||||
|
|
||||||
if(!server->islocal) {
|
if(!server->islocal) {
|
||||||
if(!FtpSize(fn, &fsz, FTPLIB_IMAGE, control)) {
|
int tries = 2;
|
||||||
fprintf(stderr, "warning: failed to get filesize for %s\n", fn);
|
while(tries) {
|
||||||
}
|
if(!FtpSize(fn, &fsz, FTPLIB_IMAGE, control)) {
|
||||||
offset = 0;
|
fprintf(stderr, "warning: failed to get filesize for %s\n", fn);
|
||||||
if(!stat(output, &st)) {
|
|
||||||
offset = (int)st.st_size;
|
|
||||||
}
|
|
||||||
if(offset) {
|
|
||||||
if(!FtpRestart(offset, control)) {
|
|
||||||
fprintf(stderr, "warning: failed to resume download -- restarting\n");
|
|
||||||
/* can't resume: */
|
|
||||||
/* unlink the file in order to restart download from scratch */
|
|
||||||
unlink(output);
|
|
||||||
}
|
}
|
||||||
}
|
offset = 0;
|
||||||
/* set up our progress bar's callback */
|
if(!stat(output, &st)) {
|
||||||
FtpOptions(FTPLIB_CALLBACK, (long)log_progress, control);
|
offset = (int)st.st_size;
|
||||||
FtpOptions(FTPLIB_IDLETIME, (long)1000, control);
|
}
|
||||||
FtpOptions(FTPLIB_CALLBACKARG, (long)&fsz, control);
|
if(offset) {
|
||||||
FtpOptions(FTPLIB_CALLBACKBYTES, (10*1024), control);
|
if(!FtpRestart(offset, control)) {
|
||||||
|
fprintf(stderr, "warning: failed to resume download -- restarting\n");
|
||||||
|
/* can't resume: */
|
||||||
|
/* unlink the file in order to restart download from scratch */
|
||||||
|
unlink(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* set up our progress bar's callback */
|
||||||
|
FtpOptions(FTPLIB_CALLBACK, (long)log_progress, control);
|
||||||
|
FtpOptions(FTPLIB_IDLETIME, (long)1000, control);
|
||||||
|
FtpOptions(FTPLIB_CALLBACKARG, (long)&fsz, control);
|
||||||
|
FtpOptions(FTPLIB_CALLBACKBYTES, (10*1024), control);
|
||||||
|
|
||||||
if(!FtpGet(output, lp->data, FTPLIB_IMAGE, control)) {
|
if(!FtpGet(output, lp->data, FTPLIB_IMAGE, control)) {
|
||||||
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 */
|
||||||
} else {
|
/* try each file twice in case it was just one of those transient network errors */
|
||||||
char completefile[PATH_MAX];
|
tries--;
|
||||||
log_progress(control, fsz-offset, &fsz);
|
} else {
|
||||||
complete = list_add(complete, fn);
|
char completefile[PATH_MAX];
|
||||||
/* rename "output.part" file to "output" file */
|
log_progress(control, fsz-offset, &fsz);
|
||||||
snprintf(completefile, PATH_MAX, "%s/%s", localpath, fn);
|
complete = list_add(complete, fn);
|
||||||
rename(output, completefile);
|
tries = 0;
|
||||||
|
/* rename "output.part" file to "output" file */
|
||||||
|
snprintf(completefile, PATH_MAX, "%s/%s", localpath, fn);
|
||||||
|
rename(output, completefile);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
printf("\n");
|
|
||||||
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];
|
||||||
|
|
Loading…
Add table
Reference in a new issue