summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2003-12-21 02:34:32 +0100
committerJudd Vinet <judd@archlinux.org>2003-12-21 02:34:32 +0100
commit68e24b947ea7da1e5e4c2e48109df737e8cda4f0 (patch)
tree64c5315a204c8d6599b1116ced5014959017a433
parentf54a888a1facfd8f086d6414260be5f1b991a66b (diff)
downloadpacman-68e24b947ea7da1e5e4c2e48109df737e8cda4f0.tar.gz
pacman-68e24b947ea7da1e5e4c2e48109df737e8cda4f0.tar.xz
Imported from pacman-2.7.1.tar.gz
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in2
-rw-r--r--doc/makepkg.8.in5
-rw-r--r--etc/makepkg.conf3
-rw-r--r--etc/pacman.conf61
-rw-r--r--libftp/ftplib.c20
-rwxr-xr-xscripts/gensync2
-rwxr-xr-xscripts/makepkg190
-rwxr-xr-xscripts/makeworld4
-rw-r--r--src/pacman.c85
-rw-r--r--src/pacman.h2
11 files changed, 219 insertions, 161 deletions
diff --git a/ChangeLog b/ChangeLog
index 840691cf..c4c6ba85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
VERSION DESCRIPTION
-----------------------------------------------------------------------------
+2.7.1 - Fixed a couple obscure segfaults
+ - LogFiles were logging incorrect dates - fixed
+ - Cleaned up md5sum output in makepkg -g
+ - Added (optional) colorized output messages to makepkg
+ - Renamed the "stable" repo to "release" in pacman.conf
+ - Renamed the "unofficial" repo to "extra" in pacman.conf
2.7 - Added build-time dependencies to makepkg (Jason Chu)
- Added md5sum integrity checking to packages in --sync
mode (Aurelien Foret)
diff --git a/Makefile.in b/Makefile.in
index 987d4e1b..18827932 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,7 +34,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
-PACVER = 2.7
+PACVER = 2.7.1
TOPDIR = @srcdir@
SRCDIR = $(TOPDIR)/src/
diff --git a/doc/makepkg.8.in b/doc/makepkg.8.in
index 9ade54b0..041d4fd1 100644
--- a/doc/makepkg.8.in
+++ b/doc/makepkg.8.in
@@ -1,4 +1,4 @@
-.TH makepkg 8 "November 22, 2003" "makepkg #VERSION#" ""
+.TH makepkg 8 "December 20, 2003" "makepkg #VERSION#" ""
.SH NAME
makepkg \- package build utility
.SH SYNOPSIS
@@ -312,6 +312,9 @@ Output syntax and commandline options.
.B "\-i, \-\-install"
Install/Upgrade the package after a successful build.
.TP
+.B "\-m, \-\-nocolor"
+Disable color in output messages
+.TP
.B "\-n, \-\-nostrip"
Do not strip binaries and libraries.
.TP
diff --git a/etc/makepkg.conf b/etc/makepkg.conf
index 4c8f9969..af29d74d 100644
--- a/etc/makepkg.conf
+++ b/etc/makepkg.conf
@@ -25,6 +25,9 @@ export CXXFLAGS="-march=i686 -O2 -pipe"
# Enable fakeroot for building packages as a non-root user
export USE_FAKEROOT="y"
+# Enable colorized output messages
+export USE_COLOR="n"
+
# if you want your name to show up in the packages you build, set this.
#export PACKAGER="John Doe <john@doe.com>"
diff --git a/etc/pacman.conf b/etc/pacman.conf
index c2592b29..188a6c94 100644
--- a/etc/pacman.conf
+++ b/etc/pacman.conf
@@ -13,7 +13,7 @@ NoUpgrade = etc/passwd etc/group etc/shadow
NoUpgrade = etc/fstab etc/raidtab
NoUpgrade = etc/rc.conf etc/rc.local
NoUpgrade = etc/lilo.conf boot/grub/menu.lst
-#IgnorePkg = lilo gcc
+#IgnorePkg = lilo kernel
#
# REPOSITORIES
@@ -21,48 +21,51 @@ NoUpgrade = etc/lilo.conf boot/grub/menu.lst
[current]
Server = ftp://ftp.archlinux.org/current
Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/current
-Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/current
Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/current
Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/current
Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/current
Server = ftp://ftp.parrswood.net/Mirrors/ftp.archlinux.org/current
+Server = ftp://ftp.kegep.tuc.gr/archlinux/current
Server = http://darkstar.ist.utl.pt/archlinux/current
Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/current
Server = ftp://saule.mintis.lt/pub/linux/current
Server = ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/archlinux/current
+Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/current
-# The "unofficial" package set
+# Uncomment this block to access the EXTRA package set
#
-[unofficial]
-Server = ftp://ftp.archlinux.org/unofficial
-Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/unofficial
-Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/unofficial
-Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/unofficial
-Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/unofficial
-Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/unofficial
-Server = ftp://ftp.parrswood.net/Mirrors/ftp.archlinux.org/unofficial
-Server = http://darkstar.ist.utl.pt/archlinux/unofficial
-Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/unofficial
-Server = ftp://saule.mintis.lt/pub/linux/unofficial
-Server = ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/archlinux/unofficial
+[extra]
+Server = ftp://ftp.archlinux.org/extra
+Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/extra
+Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/extra
+Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/extra
+Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/extra
+Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/extra
+Server = ftp://ftp.parrswood.net/Mirrors/ftp.archlinux.org/extra
+Server = ftp://ftp.kegep.tuc.gr/archlinux/extra
+Server = http://darkstar.ist.utl.pt/archlinux/extra
+Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/extra
+Server = ftp://saule.mintis.lt/pub/linux/extra
+Server = ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/archlinux/extra
-# If you use the 'stable' tree, you should disable the 'current'
+# If you use the RELEASE tree, you should disable the CURRENT
# tree to avoid conflicts
#
-#[stable]
-#Server = ftp://ftp.archlinux.org/stable
-#Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/stable
-#Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/stable
-#Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/stable
-#Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/stable
-#Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/stable
-#Server = ftp://ftp.parrswood.net/Mirrors/ftp.archlinux.org/stable
-#Server = http://darkstar.ist.utl.pt/archlinux/stable
-#Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/stable
-#Server = ftp://saule.mintis.lt/pub/linux/stable
-#Server = ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/archlinux/stable
+#[release]
+#Server = ftp://ftp.archlinux.org/release
+#Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/release
+#Server = ftp://ftp.webtrek.com/pub/mirrors/archlinux/release
+#Server = ftp://ftp.mpi-sb.mpg.de/pub/linux/mirror/ftp.ibiblio.org/pub/Linux/distributions/archlinux/release
+#Server = ftp://ftp.oit.unc.edu/pub/Linux/distributions/archlinux/release
+#Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/release
+#Server = ftp://ftp.parrswood.net/Mirrors/ftp.archlinux.org/release
+#Server = ftp://ftp.kegep.tuc.gr/archlinux/release
+#Server = http://darkstar.ist.utl.pt/archlinux/release
+#Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/release
+#Server = ftp://saule.mintis.lt/pub/linux/release
+#Server = ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/archlinux/release
-# Uncomment this block to access the 'unstable' package set
+# Uncomment this block to access the UNSTABLE package set
#
#[unstable]
#Server = ftp://ftp.archlinux.org/unstable
diff --git a/libftp/ftplib.c b/libftp/ftplib.c
index f312db89..004ede87 100644
--- a/libftp/ftplib.c
+++ b/libftp/ftplib.c
@@ -411,14 +411,18 @@ GLOBALDEF int FtpConnect(const char *host, netbuf **nControl)
}
else
{
- *pnum++ = '\0';
- if (isdigit(*pnum))
- sin.sin_port = htons(atoi(pnum));
- else
- {
- pse = getservbyname(pnum,"tcp");
- sin.sin_port = pse->s_port;
- }
+ *pnum++ = '\0';
+ if (isdigit(*pnum))
+ sin.sin_port = htons(atoi(pnum));
+ else
+ {
+ pse = getservbyname(pnum,"tcp");
+ if(pse == NULL) {
+ perror("getservbyname");
+ return 0;
+ }
+ sin.sin_port = pse->s_port;
+ }
}
if ((sin.sin_addr.s_addr = inet_addr(lhost)) == -1)
{
diff --git a/scripts/gensync b/scripts/gensync
index 5a0b7eda..27d20fc5 100755
--- a/scripts/gensync
+++ b/scripts/gensync
@@ -20,7 +20,7 @@
# USA.
#
-myver='2.7'
+myver='2.7.1'
usage() {
echo "gensync $myver"
diff --git a/scripts/makepkg b/scripts/makepkg
index 10c1c2a0..977efdeb 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -20,8 +20,9 @@
# USA.
#
-myver='2.7'
+myver='2.7.1'
startdir=`pwd`
+USE_COLOR="n"
# source Arch's abs.conf if it's present
[ -f /etc/abs/abs.conf ] && source /etc/abs/abs.conf
@@ -37,8 +38,33 @@ fi
### SUBROUTINES ###
+plain() {
+ if [ "$USE_COLOR" = "Y" -o "$USE_COLOR" = "y" ]; then
+ echo -e " \033[1;1m$1\033[1;0m" >&2
+ else
+ echo " $1" >&2
+ fi
+}
msg() {
- echo "$1" >&2
+ if [ "$USE_COLOR" = "Y" -o "$USE_COLOR" = "y" ]; then
+ echo -e "\033[1;32m==>\033[1;0m \033[1;1m$1\033[1;0m" >&2
+ else
+ echo "==> $1" >&2
+ fi
+}
+warning() {
+ if [ "$USE_COLOR" = "Y" -o "$USE_COLOR" = "y" ]; then
+ echo -e "\033[1;33m==> WARNING:\033[1;0m \033[1;1m$1\033[1;0m" >&2
+ else
+ echo "==> WARNING: $1" >&2
+ fi
+}
+error() {
+ if [ "$USE_COLOR" = "Y" -o "$USE_COLOR" = "y" ]; then
+ echo -e "\033[1;31m==> ERROR:\033[1;0m \033[1;1m$1\033[1;0m" >&2
+ else
+ echo "==> ERROR: $1" >&2
+ fi
}
strip_url() {
@@ -53,7 +79,7 @@ checkdeps() {
ret=$?
if [ "$ret" != "0" ]; then
if [ "$ret" = "127" ]; then
- msg "==> Missing Dependencies:"
+ msg "Missing Dependencies:"
msg ""
nl=0
for dep in $missdep; do
@@ -70,7 +96,7 @@ checkdeps() {
done
msg ""
else
- msg "==> ERROR: pacman returned a fatal error."
+ error "pacman returned a fatal error."
exit 1
fi
fi
@@ -88,10 +114,10 @@ handledeps() {
if [ "$deplist" != "" -a $haveperm -eq 1 ]; then
if [ "$DEP_BIN" = "1" ]; then
# install missing deps from binary packages (using pacman -S)
- msg "==> Installing missing dependencies..."
+ msg "Installing missing dependencies..."
pacman -D $deplist
if [ "$?" = "127" ]; then
- msg "==> ERROR: Failed to install missing dependencies."
+ error "Failed to install missing dependencies."
exit 1
fi
# TODO: check deps again to make sure they were resolved
@@ -99,15 +125,15 @@ handledeps() {
# install missing deps by building them from source.
# we look for each package name in $ABSROOT and build it.
if [ "$ABSROOT" = "" ]; then
- msg "==> ERROR: The ABSROOT environment variable is not defined."
+ error "The ABSROOT environment variable is not defined."
exit 1
fi
# TODO: handle version comparators (eg, glibc>=2.2.5)
- msg "==> Building missing dependencies..."
+ msg "Building missing dependencies..."
for dep in $deplist; do
candidates=`find $ABSROOT -type d -name "$dep"`
if [ "$candidates" = "" ]; then
- msg "==> ERROR: Could not find \"$dep\" under $ABSROOT"
+ error "Could not find \"$dep\" under $ABSROOT"
exit 1
fi
success=0
@@ -126,7 +152,7 @@ handledeps() {
fi
done
if [ "$success" = "0" ]; then
- msg "==> ERROR: Failed to build \"$dep\""
+ error "Failed to build \"$dep\""
exit 1
fi
done
@@ -136,8 +162,8 @@ handledeps() {
fi
elif [ "$deplist" != "" -a $haveperm -eq 0 ]; then
if [ "$DEP_SRC" = "1" -o "$DEP_BIN" = "1" ]; then
- msg "==> WARNING: Cannot auto-install missing dependencies as a normal user!"
- msg "==> Run makepkg as root to resolve dependencies automatically."
+ warning "Cannot auto-install missing dependencies as a normal user!"
+ plain "Run makepkg as root to resolve dependencies automatically."
fi
missingdeps=1
fi
@@ -156,6 +182,7 @@ usage() {
echo " -g, --genmd5 Generate MD5sums for source files"
echo " -h, --help This help"
echo " -i, --install Install package after successful build"
+ echo " -m, --nocolor Disable colorized output messages"
echo " -n, --nostrip Do not strip binaries/libraries"
echo " -p <buildscript> Use an alternate build script (instead of PKGBUILD)"
echo " -r, --rmdeps Remove installed dependencies after a successful build"
@@ -194,6 +221,7 @@ while [ "$#" -ne "0" ]; do
--install) INSTALL=1 ;;
--force) FORCE=1 ;;
--nostrip) NOSTRIP=1 ;;
+ --nocolor) USE_COLOR="n" ;;
--genmd5) GENMD5=1 ;;
--rmdeps) RMDEPS=1 ;;
--help)
@@ -205,7 +233,7 @@ while [ "$#" -ne "0" ]; do
exit 1
;;
-*)
- while getopts "cCsbdhifgnrp:w:-" opt; do
+ while getopts "cCsbdhifgmnrp:w:-" opt; do
case $opt in
c) CLEANUP=1 ;;
C) CLEANCACHE=1 ;;
@@ -215,6 +243,7 @@ while [ "$#" -ne "0" ]; do
i) INSTALL=1 ;;
g) GENMD5=1 ;;
f) FORCE=1 ;;
+ m) USE_COLOR="n" ;;
n) NOSTRIP=1 ;;
w) PKGDEST=$OPTARG ;;
p) BUILDSCRIPT=$OPTARG ;;
@@ -248,11 +277,11 @@ cd -
if [ "$CLEANCACHE" = "1" ]; then
if [ "`id -u`" = "0" -a "$INFAKEROOT" != "1" ]; then
- msg "==> Cleaning up source files from the cache."
+ msg "Cleaning up source files from the cache."
rm -rf /var/cache/pacman/src/*
exit 0
else
- msg "==> You must be root to clean the cache."
+ error "You must be root to clean the cache."
exit 1
fi
fi
@@ -262,7 +291,7 @@ unset replaces depends conflicts backup source install build makedepends
umask 0022
if [ ! -f $BUILDSCRIPT ]; then
- msg "==> ERROR: $BUILDSCRIPT does not exist."
+ error "$BUILDSCRIPT does not exist."
exit 1
fi
@@ -270,21 +299,21 @@ source $BUILDSCRIPT
# check for no-no's
if [ `echo $pkgver | grep '-'` ]; then
- msg "==> ERROR: pkgver is not allowed to contain hyphens."
+ error "pkgver is not allowed to contain hyphens."
exit 1
fi
if [ `echo $pkgrel | grep '-'` ]; then
- msg "==> ERROR: pkgrel is not allowed to contain hyphens."
+ error "pkgrel is not allowed to contain hyphens."
exit 1
fi
if [ -f $PKGDEST/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz -a "$FORCE" = "0" -a "$GENMD5" = "0" ]; then
if [ "$INSTALL" = "1" ]; then
- msg "==> WARNING: a package has already been built, installing existing package."
+ warning "a package has already been built, installing existing package."
pacman --upgrade $PKGDEST/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
exit $?
else
- msg "==> ERROR: a package has already been built. (use -f to overwrite)"
+ error "a package has already been built. (use -f to overwrite)"
exit 1
fi
fi
@@ -294,86 +323,86 @@ fi
if [ "`id -u`" != "0" ]; then
if [ "$USE_FAKEROOT" = "y" -o "$USE_FAKEROOT" = "Y" ]; then
if [ `type -p fakeroot` ]; then
- msg "==> Entering fakeroot environment"
+ msg "Entering fakeroot environment"
fakeroot -- $0 -F $ARGLIST
exit $?
else
- msg "==> WARNING: Fakeroot is not installed. Building as an unprivileged user"
- msg "==> will result in non-root ownership of the packaged files."
- msg "==> Install the fakeroot package to correctly build as a non-root"
- msg "==> user."
- msg ""
+ warning "Fakeroot is not installed. Building as an unprivileged user"
+ plain "will result in non-root ownership of the packaged files."
+ plain "Install the fakeroot package to correctly build as a non-root"
+ plain "user."
+ plain ""
sleep 1
fi
else
- msg "==> WARNING: Running makepkg as an unprivileged user will result in non-root"
- msg "==> ownership of the packaged files. Try using the fakeroot"
- msg "==> environment. (USE_FAKEROOT=y in makepkg.conf)"
- msg ""
+ warning "Running makepkg as an unprivileged user will result in non-root"
+ plain "ownership of the packaged files. Try using the fakeroot"
+ plain "environment. (USE_FAKEROOT=y in makepkg.conf)"
+ plain ""
sleep 1
fi
fi
-msg "==> Making package: $pkgname (`date`)"
+msg "Making package: $pkgname (`date`)"
unset deplist makedeplist
if [ `type -p pacman` -a "$NODEPS" = "0" ]; then
- msg "==> Checking Runtime Dependencies..."
+ msg "Checking Runtime Dependencies..."
deplist=`checkdeps ${depends[@]}`
handledeps $deplist
if [ $? -gt 0 ]; then
exit 1
fi
- msg "==> Checking Buildtime Dependencies..."
+ msg "Checking Buildtime Dependencies..."
makedeplist=`checkdeps ${makedepends[@]}`
handledeps $makedeplist
if [ $? -gt 0 ]; then
exit 1
fi
elif [ "$NODEPS" = "1" ]; then
- msg "==> WARNING: skipping dependency checks."
+ warning "skipping dependency checks."
else
- msg "==> WARNING: pacman was not found in PATH. skipping dependency checks."
+ warning "pacman was not found in PATH. skipping dependency checks."
fi
cd $startdir
# retrieve sources
-msg "==> Retrieving Sources..."
+msg "Retrieving Sources..."
mkdir -p src
cd $startdir/src
for netfile in ${source[@]}; do
file=`strip_url $netfile`
if [ -f ../$file ]; then
- msg " |=> Found $file in build dir"
+ msg " Found $file in build dir"
cp ../$file .
elif [ -f /var/cache/pacman/src/$file ]; then
- msg " |=> Using local copy of $file"
+ msg " Using local copy of $file"
cp /var/cache/pacman/src/$file .
else
# check for a download utility
if [ -z "$FTPAGENT" ]; then
- msg "==> ERROR: FTPAGENT is not configured. Check the /etc/makepkg.conf file."
- msg "==> Aborting..."
+ error "FTPAGENT is not configured. Check the /etc/makepkg.conf file."
+ msg "Aborting..."
exit 1
fi
ftpclient=`echo $FTPAGENT | awk {'print $1'}`
if [ ! -x $ftpclient ]; then
- msg "==> ERROR: ftpclient `basename $ftpclient` is not installed."
- msg "==> Aborting..."
+ error "ftpclient `basename $ftpclient` is not installed."
+ msg "Aborting..."
exit 1
fi
proto=`echo $netfile | sed 's|://.*||'`
if [ "$proto" != "ftp" -a "$proto" != "http" ]; then
- msg "==> ERROR: $netfile was not found in the build directory and is not a proper URL."
- msg "==> Aborting..."
+ error "$netfile was not found in the build directory and is not a proper URL."
+ msg "Aborting..."
exit 1
fi
- msg " |=> Downloading $file"
+ msg " Downloading $file"
$FTPAGENT $netfile 2>&1
if [ ! -f $file ]; then
- msg "==> ERROR: Failed to download $file"
- msg "==> Aborting..."
+ error "Failed to download $file"
+ msg "Aborting..."
exit 1
fi
if [ "`id -u`" = "0" -a "$INFAKEROOT" != "1" ]; then
@@ -387,15 +416,15 @@ done
if [ "$GENMD5" = "0" ]; then
# MD5 validation
if [ ${#md5sums[@]} -ne ${#source[@]} ]; then
- msg "==> WARNING: MD5sums are missing or incomplete. Cannot verify source integrity."
+ warning "MD5sums are missing or incomplete. Cannot verify source integrity."
#sleep 1
elif [ `type -p md5sum` ]; then
- msg "==> Validating source files with MD5sums"
+ msg "Validating source files with MD5sums"
errors=0
idx=0
for netfile in ${source[@]}; do
file=`strip_url $netfile`
- echo -n " |=> $file ... " >&2
+ echo -n " $file ... " >&2
echo "${md5sums[$idx]} $file" | md5sum -c - >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "FAILED" >&2
@@ -406,15 +435,15 @@ if [ "$GENMD5" = "0" ]; then
idx=$(($idx+1))
done
if [ $errors -gt 0 ]; then
- msg "==> ERROR: One or more files did not pass the validity check!"
+ error "One or more files did not pass the validity check!"
exit 1
fi
else
- msg "==> WARNING: The md5sum program is missing. Cannot verify source files!"
+ warning "The md5sum program is missing. Cannot verify source files!"
sleep 1
fi
# extract sources
- msg "==> Extracting Sources..."
+ msg "Extracting Sources..."
for netfile in ${source[@]}; do
file=`strip_url $netfile`
unset cmd
@@ -433,11 +462,11 @@ if [ "$GENMD5" = "0" ]; then
cmd="bunzip2 $file" ;;
esac
if [ "$cmd" != "" ]; then
- msg " |=> $cmd"
+ msg " $cmd"
$cmd
if [ $? -ne 0 ]; then
- msg "==> ERROR: Failed to extract $file"
- msg "==> Aborting..."
+ error "Failed to extract $file"
+ msg "Aborting..."
exit 1
fi
fi
@@ -445,12 +474,13 @@ if [ "$GENMD5" = "0" ]; then
else
# generate md5 hashes
if [ ! `type -p md5sum` ]; then
- msg "==> ERROR: Cannot find the md5sum program."
+ error "Cannot find the md5sum program."
exit 1
fi
- msg "==> Generating MD5sums for source files"
- msg ""
+ msg "Generating MD5sums for source files"
+ plain ""
ct=0
+ newline=0
numsrc=${#source[@]}
for netfile in ${source[@]}; do
file=`strip_url $netfile`
@@ -458,17 +488,25 @@ else
if [ $ct -eq 0 ]; then
echo -n "md5sums=("
else
- echo -ne "\t"
+ if [ $newline -eq 0 ]; then
+ echo -n " "
+ fi
fi
echo -n "'$sum'"
ct=$(($ct+1))
if [ $ct -eq $numsrc ]; then
echo ')'
else
- echo ' \'
+ if [ $newline -eq 1 ]; then
+ echo '\'
+ newline=0
+ else
+ echo -n ' '
+ newline=1
+ fi
fi
done
- msg ""
+ plain ""
exit 0
fi
@@ -480,16 +518,16 @@ fi
# check for existing pkg directory
if [ -d $startdir/pkg ]; then
- msg "==> Removing existing pkg directory..."
+ msg "Removing existing pkg directory..."
rm -rf $startdir/pkg
fi
mkdir -p $startdir/pkg
# build
-msg "==> Starting build()..."
+msg "Starting build()..."
build 2>&1
if [ $? -gt 0 ]; then
- msg "==> Build Failed. Aborting..."
+ error "Build Failed. Aborting..."
exit 2
fi
@@ -514,7 +552,7 @@ fi
# compress man pages
if [ -d pkg/usr/man ]; then
- msg "==> Compressing man pages..."
+ msg "Compressing man pages..."
for i in `find pkg/usr/man -type f`; do
ext=`echo $i | sed 's|.*\.||g'`
fn=`echo $i | sed 's|.*/||g'`
@@ -534,9 +572,9 @@ cd $startdir
# strip binaries
if [ "$NOSTRIP" = "0" ]; then
- msg "==> Stripping debugging symbols from libraries..."
+ msg "Stripping debugging symbols from libraries..."
find pkg/{,usr,usr/local,opt/*}/lib -type f -exec /usr/bin/strip --strip-debug '{}' \; 2>&1
- msg "==> Stripping symbols from binaries..."
+ msg "Stripping symbols from binaries..."
find pkg/{,usr,usr/local,opt/*}/{bin,sbin} -type f -exec /usr/bin/strip '{}' \; 2>&1
fi
@@ -550,7 +588,7 @@ fi
size=`du -cb $startdir/pkg | tail -1 | awk '{print $1}'`
# write the .PKGINFO file
-msg "==> Generating .PKGINFO file..."
+msg "Generating .PKGINFO file..."
cd $startdir/pkg
echo "# Generated by makepkg $myver" >.PKGINFO
echo -n "# " >>.PKGINFO
@@ -584,17 +622,17 @@ done
# check for an install script
if [ "$install" != "" ]; then
- msg "==> Copying install script..."
+ msg "Copying install script..."
cp $startdir/$install $startdir/pkg/.INSTALL
fi
# build a filelist
-msg "==> Generating .FILELIST file..."
+msg "Generating .FILELIST file..."
cd $startdir/pkg
tar cvf /dev/null * | sort >.FILELIST
# tar it up
-msg "==> Compressing package..."
+msg "Compressing package..."
cd $startdir/pkg
if [ -f $startdir/pkg/.INSTALL ]; then
cmd="tar czvf $PKGDEST/$pkgname-$pkgver-$pkgrel.pkg.tar.gz .PKGINFO .FILELIST .INSTALL *"
@@ -605,19 +643,19 @@ $cmd | sort >../filelist
cd $startdir
if [ "$CLEANUP" = "1" ]; then
- msg "==> Cleaning up..."
+ msg "Cleaning up..."
rm -rf src pkg filelist
fi
if [ "$RMDEPS" = "1" -a "`id -u`" = "0" -a "$INFAKEROOT" != "1" ]; then
- msg "==> Removing installed dependencies..."
+ msg "Removing installed dependencies..."
pacman -R $makedeplist $deplist
fi
-msg "==> Finished making: $pkgname (`date`)"
+msg "Finished making: $pkgname (`date`)"
if [ "$INSTALL" = "1" -a "`id -u`" = "0" -a "$INFAKEROOT" != "1" ]; then
- msg "==> Running pacman --upgrade..."
+ msg "Running pacman --upgrade..."
pacman --upgrade $PKGDEST/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
exit $?
fi
diff --git a/scripts/makeworld b/scripts/makeworld
index a5d4c6e8..e1d5ed9d 100755
--- a/scripts/makeworld
+++ b/scripts/makeworld
@@ -21,7 +21,7 @@
#
toplevel=`pwd`
-version="2.7"
+version="2.7.1"
usage() {
echo "makeworld version $version"
@@ -117,7 +117,7 @@ for category in $*; do
. PKGBUILD
buildstatus=0
if [ ! -f $dest/$pkgname-$pkgver-$pkgrel.pkg.tar.gz ]; then
- makepkg $MAKEPKG_OPTS -w $dest 2>>$toplevel/makepkg.log
+ makepkg $MAKEPKG_OPTS -m -w $dest 2>>$toplevel/makepkg.log
if [ $? -gt 0 ]; then
buildstatus=2
else
diff --git a/src/pacman.c b/src/pacman.c
index 3c33ac7b..5faab248 100644
--- a/src/pacman.c
+++ b/src/pacman.c
@@ -941,56 +941,57 @@ int pacman_sync(pacdb_t *db, PMList *targets)
/* double-check */
FREELIST(files);
- /* Check integrity of files */
- printf("checking package integrity... ");
- fflush(stdout);
+ if(allgood) {
+ /* Check integrity of files */
+ printf("checking package integrity... ");
+ fflush(stdout);
- for(i = final; i; i = i->next) {
- syncpkg_t *sync;
- char str[PATH_MAX], pkgname[PATH_MAX];
- char *md5sum1, *md5sum2;
+ for(i = final; i; i = i->next) {
+ syncpkg_t *sync;
+ char str[PATH_MAX], pkgname[PATH_MAX];
+ char *md5sum1, *md5sum2;
- sync = (syncpkg_t*)i->data;
- snprintf(pkgname, PATH_MAX, "%s-%s.pkg.tar.gz", sync->pkg->name, sync->pkg->version);
+ sync = (syncpkg_t*)i->data;
+ snprintf(pkgname, PATH_MAX, "%s-%s.pkg.tar.gz", sync->pkg->name, sync->pkg->version);
- md5sum1 = sync->pkg->md5sum;
- if(md5sum1 == NULL || md5sum1[0] == '\0') {
- if(allgood) {
- printf("\n");
+ md5sum1 = sync->pkg->md5sum;
+ if(md5sum1 == NULL || md5sum1[0] == '\0') {
+ if(allgood) {
+ printf("\n");
+ }
+ fprintf(stderr, "error: can't get md5 checksum for package %s\n", pkgname);
+ allgood = 0;
+ continue;
}
- fprintf(stderr, "error: can't get md5 checksum for package %s\n", pkgname);
- allgood = 0;
- continue;
- }
- snprintf(str, PATH_MAX, "%s/%s", ldir, pkgname);
- md5sum2 = MDFile(str);
- if(md5sum2 == NULL || md5sum2[0] == '\0') {
- if(allgood) {
- printf("\n");
+ snprintf(str, PATH_MAX, "%s/%s", ldir, pkgname);
+ md5sum2 = MDFile(str);
+ if(md5sum2 == NULL || md5sum2[0] == '\0') {
+ if(allgood) {
+ printf("\n");
+ }
+ fprintf(stderr, "error: can't get md5 checksum for archive %s\n", pkgname);
+ allgood = 0;
+ continue;
}
- fprintf(stderr, "error: can't get md5 checksum for archive %s\n", pkgname);
- FREE(md5sum1);
- allgood = 0;
- continue;
- }
- if(strcmp(md5sum1, md5sum2) != 0) {
- if(allgood) {
- printf("\n");
+ if(strcmp(md5sum1, md5sum2) != 0) {
+ if(allgood) {
+ printf("\n");
+ }
+ fprintf(stderr, "error: archive %s is corrupted\n", pkgname);
+ allgood = 0;
}
- fprintf(stderr, "error: archive %s is corrupted\n", pkgname);
- allgood = 0;
- }
- FREE(md5sum2);
- }
- if(allgood) {
- printf("done.\n");
- } else {
- fprintf(stderr, "\n");
+ FREE(md5sum2);
+ }
+ if(allgood) {
+ printf("done.\n");
+ } else {
+ fprintf(stderr, "\n");
+ }
}
- if(!pmo_s_downloadonly) {
+ if(!pmo_s_downloadonly && allgood) {
/* remove any conflicting packages (WITH dep checks) */
if(rmtargs) {
int retcode;
@@ -1067,7 +1068,7 @@ int pacman_sync(pacdb_t *db, PMList *targets)
}
}
- if(!varcache && !pmo_s_downloadonly) {
+ if(!varcache && !pmo_s_downloadonly && allgood) {
/* delete packages */
for(i = files; i; i = i->next) {
unlink(i->data);
@@ -3029,7 +3030,7 @@ void logaction(FILE *fp, char *fmt, ...)
t = time(NULL);
tm = localtime(&t);
- fprintf(logfd, "[%02d/%02d/%02d %02d:%02d] %s\n", tm->tm_mon, tm->tm_mday,
+ fprintf(logfd, "[%02d/%02d/%02d %02d:%02d] %s\n", tm->tm_mon+1, tm->tm_mday,
tm->tm_year-100, tm->tm_hour, tm->tm_min, msg);
}
}
diff --git a/src/pacman.h b/src/pacman.h
index 5828f8cc..004339a5 100644
--- a/src/pacman.h
+++ b/src/pacman.h
@@ -22,7 +22,7 @@
#define _PAC_PACMAN_H
#ifndef PACVER
-#define PACVER "2.7"
+#define PACVER "2.7.1"
#endif
#ifndef PKGDIR