1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Merge branch 'maint'

This commit is contained in:
Dan McGee 2008-01-14 22:58:44 -06:00
commit 38e981fab3
26 changed files with 148 additions and 168 deletions

View File

@ -145,8 +145,9 @@ Options and Directives
a package to provide dependencies other than its own package name. For
example, the dcron package can provide 'cron', which allows packages to
depend on 'cron' rather than 'dcron OR fcron'.
Versioned provisions are also possible. For example, dcron can provide
'cron 2.0' to satisfy the 'cron>=2.0' dependency of other packages.
Versioned provisions are also possible, in the 'name=version' format.
For example, dcron can provide 'cron=2.0' to satisfy the 'cron>=2.0'
dependency of other packages.
*replaces (array)*::
An array of packages that this package should replace, and can be used

View File

@ -30,6 +30,11 @@ to use.
Options
-------
*\--asroot*::
Allow makepkg to run as root. This is for security purposes as it is
normally dangerous to do so. This will also disable use of fakeroot and
sudo.
*-A, \--ignorearch*::
Ignore a missing or incomplete arch field in the build script. This is
for rebuilding packages from source when the PKGBUILD may be slightly
@ -68,6 +73,11 @@ Options
default to the current directory. This allows the built package to be
overwritten.
*-forcever*::
This is a hidden option that should *not* be used unless you really know
what you are doing. makepkg uses this internally when calling itself to
set the new development pkgver of the package.
*-g, \--geninteg*::
For each source file in the source array of PKGBUILD, download the file
if required and generate integrity checks. The integrity checks
@ -78,6 +88,11 @@ Options
*-h, \--help*::
Output syntax and command line options.
*\--holdver*::
Useful when building development versions of packages. Prevents makepkg
from automatically bumping the pkgver to the latest revision number in
the package's development tree.
*-i, \--install*::
Install or upgrade the package after a successful build using
linkman:pacman[8].
@ -108,11 +123,6 @@ Options
dependencies are not found, pacman will try to resolve them. If
successful, the missing packages will be downloaded and installed.
*\--asroot*::
Allow makepkg to run as root. This is for security purposes as it is
normally dangerous to do so. This will also disable use of fakeroot and
sudo.
*\--source*::
Do not actually build the package, but build a source-only tarball. This
is useful for passing a single tarball to another program such as a

View File

@ -120,9 +120,9 @@ Options
*\--cachedir* <'dir'>::
Specify an alternative package cache location (a typical default is
``/var/cache/pacman/pkg''). Multiple cache directories can be specified,
and they are tried in the order they are passed to pacman. *NOTE*: if
specified, this is an absolute path and the root path is not automatically
prepended. This behavior changed in pacman 3.1.0.
and they are tried in the order they are passed to pacman. *NOTE*: this
is an absolute path, the root path is not automatically prepended. This
behavior changed in pacman 3.1.0.
*\--config* <'file'>::
Specify an alternate configuration file.
@ -207,7 +207,8 @@ Remove Options[[RO]]
--------------------
*-c, \--cascade*::
Remove all target packages, as well as all packages that depend on one
or more target packages. This operation is recursive.
or more target packages. This operation is recursive, and must be used
with care since it can remove many potentially needed packages.
*-k, \--keep*::
Removes the database entry only. Leaves all files in place.
@ -218,10 +219,11 @@ Remove Options[[RO]]
file should be renamed with a ``.pacsave'' extension.
*-s, \--recursive*::
Remove each target specified including all dependencies, provided that
(A) they are not required by other packages; and (B) they were not
explicitly installed by the user. This option is analogous to a
backwards '\--sync' operation.
Remove each target specified including all of their dependencies, provided
that (A) they are not required by other packages; and (B) they were not
explicitly installed by the user. This operation is recursive and analogous
to a backwards '\--sync' operation, and helps keep a clean system without
orphans.
Sync Options[[SO]]

View File

@ -1,5 +1,3 @@
SUBDIRS = pacman.d
dist_sysconf_DATA = makepkg.conf pacman.conf
EXTRA_DIST = makepkg.conf.in pacman.conf.in

View File

@ -1,7 +1,7 @@
#
# @sysconfdir@/pacman.conf
#
# See the pacman manpage for option directives
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
@ -23,24 +23,24 @@ HoldPkg = pacman glibc
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
#[testing]
#Include = @sysconfdir@/pacman.d/mirrorlist
[core]
# Add your preferred servers here, they will be used first
Include = @sysconfdir@/pacman.d/mirrorlist
[extra]
# Add your preferred servers here, they will be used first
Include = @sysconfdir@/pacman.d/mirrorlist
[community]
# Add your preferred servers here, they will be used first
Include = @sysconfdir@/pacman.d/mirrorlist
#[unstable]
# Add your preferred servers here, they will be used first
# An example of a disabled remote package repository with multiple servers
# available. To enable, uncomment the following lines. You can add preferred
# servers immediately after the header and they will be used before the
# default mirrors.
#[core]
#Server = ftp://ftp.example.com/foobar/$repo/os/i686/
# The file referenced here should contain a list of 'Server = ' lines.
#Include = @sysconfdir@/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for

View File

@ -1 +0,0 @@
mirrorlist

View File

@ -1,17 +0,0 @@
pkgsysconfdir = ${sysconfdir}/pacman.d
dist_pkgsysconf_DATA = mirrorlist
EXTRA_DIST = mirrorlist.in
#
# Files that should be removed, but which Automake does not know.
MOSTLYCLEANFILES = $(dist_pkgsysconf_DATA)
$(dist_pkgsysconf_DATA): Makefile
rm -f $@ $@.tmp
sed \
-e 's|@CARCH[@]|$(CARCH)|g' \
$(srcdir)/mirrorlist.in >$@.tmp
mv $@.tmp $@
mirrorlist: $(srcdir)/mirrorlist.in
# vim:set ts=2 sw=2 noet:

View File

@ -1,84 +0,0 @@
#
# $repo: Arch Linux @REPO@ repository
#
# United States
Server = ftp://ftp.archlinux.org/$repo/os/@CARCH@
Server = ftp://ftp.nethat.com/pub/linux/archlinux/$repo/os/@CARCH@
Server = ftp://locke.suu.edu/linux/dist/archlinux/$repo/os/@CARCH@
Server = ftp://mirrors.unixheads.org/archlinux/$repo/os/@CARCH@
Server = ftp://ftp-linux.cc.gatech.edu/pub/linux/distributions/archlinux/$repo/os/@CARCH@
Server = ftp://mirror.cs.vt.edu/pub/ArchLinux/$repo/os/@CARCH@
Server = http://mirrors.easynews.com/linux/archlinux/$repo/os/@CARCH@
Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/$repo/os/@CARCH@
Server = http://holmes.umflint.edu/archlinux/$repo/os/@CARCH@
# South America
# - Brazil
Server = http://archlinux.c3sl.ufpr.br/$repo/os/@CARCH@
Server = ftp://archlinux.c3sl.ufpr.br/archlinux/$repo/os/@CARCH@
# Europe
# - Austria
Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/$repo/os/@CARCH@
# - Belgium
Server = ftp://ftp.belnet.be/mirror/archlinux.org/$repo/os/@CARCH@
# - Czech Republic
Server = ftp://ftp.sh.cvut.cz/MIRRORS/arch/$repo/os/@CARCH@
# - Estonia
Server = ftp://ftp.estpak.ee/pub/archlinux/$repo/os/@CARCH@
# - Finland
Server = ftp://ftp.sixnix.net/pub/archlinux/$repo/os/@CARCH@
# - France
Server = ftp://mir1.archlinuxfr.org/archlinux/$repo/os/@CARCH@
Server = ftp://mir2.archlinuxfr.org/archlinux/$repo/os/@CARCH@
Server = ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/$repo/os/@CARCH@
Server = http://mir.archlinux.fr/$repo/os/@CARCH@
Server = ftp://ftp.free.fr/mirrors/ftp.archlinux.org/$repo/os/@CARCH@
# - Germany
Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/$repo/os/@CARCH@
Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/$repo/os/@CARCH@
Server = ftp://ftp.archlinuxppc.org/i686/$repo/os/@CARCH@
# - Great Britain
Server = http://www.mirrorservice.org/sites/ftp.archlinux.org/$repo/os/@CARCH@
# - Greece
Server = ftp://ftp.ntua.gr/pub/linux/archlinux/$repo/os/@CARCH@
# - Hungary
Server = ftp://ftp.mfa.kfki.hu/pub/mirrors/ftp.archlinux.org/$repo/os/@CARCH@
# - Ireland
Server = ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/$repo/os/@CARCH@
# - Italy
Server = ftp://mi.mirror.garr.it/mirrors/archlinux/$repo/os/@CARCH@
# - Netherlands
Server = ftp://ftp.nluug.nl/pub/metalab/distributions/archlinux/$repo/os/@CARCH@
Server = ftp://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/$repo/os/@CARCH@
# - Poland
Server = ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/$repo/os/@CARCH@
Server = ftp://mirror.icis.pcz.pl/archlinux/$repo/os/@CARCH@
# - Portugal
Server = ftp://cesium.di.uminho.pt/pub/archlinux/$repo/os/@CARCH@
# - Romania
Server = ftp://ftp.iasi.roedu.net/mirrors/archlinux.org/$repo/os/@CARCH@
# - Russia
Server = ftp://archlinux.org.ru/pub/archlinux/$repo/os/@CARCH@
Server = ftp://mirror.yandex.ru/archlinux/$repo/os/@CARCH@
Server = http://archlinux.freeside.ru/$repo/os/@CARCH@
# - Sweden
Server = ftp://ftp.ds.hj.se/pub/os/linux/archlinux/$repo/os/@CARCH@
Server = ftp://ftp.gigabit.nu/$repo/os/@CARCH@
# - Switzerland
Server = ftp://archlinux.puzzle.ch/$repo/os/@CARCH@
# - Turkey
Server = http://server.elsistech.com/archlinux/$repo/os/@CARCH@
# - Ukraine
Server = ftp://hell.org.ua/archlinux/$repo/os/@CARCH@
Server = ftp://ftp.linux.kiev.ua/pub/Linux/ArchLinux/$repo/os/@CARCH@
# Asia
# - Israel
Server = http://mirror.isoc.org.il/pub/archlinux/$repo/os/@CARCH@
# Australia
Server = ftp://mirror.pacific.net.au/linux/archlinux/$repo/os/@CARCH@
Server = ftp://mirror.aarnet.edu.au/pub/archlinux/$repo/os/@CARCH@

View File

@ -648,7 +648,7 @@ int _alpm_prov_cmp(const void *provision, const void *needle)
char *tmpptr;
char *provname = strdup(provision);
int retval = 0;
tmpptr = strchr(provname, ' ');
tmpptr = strchr(provname, '=');
if(tmpptr != NULL) { /* provision-version */
*tmpptr='\0';

View File

@ -343,10 +343,10 @@ int SYMEXPORT alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
satisfy = (strcmp(pkgname, dep->name) == 0
&& dep_vercmp(pkgversion, dep->mod, dep->version));
/* check provisions, format : "name version" */
/* check provisions, format : "name=version" */
for(i = alpm_pkg_get_provides(pkg); i && !satisfy; i = i->next) {
char *provname = strdup(i->data);
char *provver = strchr(provname, ' ');
char *provver = strchr(provname, '=');
if(provver == NULL) { /* no provision version */
satisfy = (dep->mod == PM_DEP_MOD_ANY

View File

@ -487,7 +487,7 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
/* creates a directory in $root/tmp/ for copying/extracting the scriptlet */
snprintf(tmpdir, PATH_MAX, "%stmp/", root);
if(stat(tmpdir, &buf)) {
_alpm_makepath(tmpdir);
_alpm_makepath_mode(tmpdir, 01777);
}
snprintf(tmpdir, PATH_MAX, "%stmp/alpm_XXXXXX", root);
if(mkdtemp(tmpdir) == NULL) {

View File

@ -178,8 +178,13 @@ char* strsep(char** str, const char* delims)
}
#endif
/* does the same thing as 'mkdir -p' */
int _alpm_makepath(const char *path)
{
return(_alpm_makepath_mode(path, 0755));
}
/* does the same thing as 'mkdir -p' */
int _alpm_makepath_mode(const char *path, mode_t mode)
{
char *orig, *str, *ptr;
char full[PATH_MAX] = "";
@ -196,7 +201,7 @@ int _alpm_makepath(const char *path)
strcat(full, "/");
strcat(full, ptr);
if(stat(full, &buf)) {
if(mkdir(full, 0755)) {
if(mkdir(full, mode)) {
FREE(orig);
umask(oldmask);
_alpm_log(PM_LOG_ERROR, _("failed to make path '%s' : %s\n"),
@ -399,6 +404,8 @@ int _alpm_unpack(const char *archive, const char *prefix, const char *fn)
if(S_ISREG(st->st_mode)) {
archive_entry_set_mode(entry, 0644);
} else if(S_ISDIR(st->st_mode)) {
archive_entry_set_mode(entry, 0755);
}
if (fn && strcmp(fn, entryname)) {

View File

@ -51,6 +51,7 @@
#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
int _alpm_makepath(const char *path);
int _alpm_makepath_mode(const char *path, mode_t mode);
int _alpm_copyfile(const char *src, const char *dest);
char *_alpm_strtrim(char *str);
char *_alpm_strreplace(const char *str, const char *needle, const char *replace);

View File

@ -1,7 +1,7 @@
self.description = "-S provision"
sp = pmpkg("pkg1")
sp.provides = ["provision 1.0-1"]
sp.provides = ["provision=1.0-1"]
self.addpkg2db("sync", sp)
self.args = "-S provision"

View File

@ -1,11 +1,11 @@
self.description = "-S provision"
sp = pmpkg("pkg1")
sp.provides = ["provision 1.0-1"]
sp.provides = ["provision=1.0-1"]
self.addpkg2db("sync", sp)
sp = pmpkg("pkg2")
sp.provides = ["provision 1.0-1"]
sp.provides = ["provision=1.0-1"]
self.addpkg2db("sync", sp)
self.args = "-S provision"

View File

@ -8,7 +8,7 @@ lp = pmpkg("pkg2", "1.0-2")
lp.provides = ["provision"]
self.addpkg2db("local", lp)
self.args = "-A %s" % p.filename()
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")

View File

@ -5,10 +5,10 @@ p.depends = ["provision>=1.0-2"]
self.addpkg(p)
lp = pmpkg("pkg2", "1.0-2")
lp.provides = ["provision 1.0-2"]
lp.provides = ["provision=1.0-2"]
self.addpkg2db("local", lp)
self.args = "-A %s" % p.filename()
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")

View File

@ -5,10 +5,10 @@ p.depends = ["provision>=1.0-2"]
self.addpkg(p)
lp = pmpkg("pkg2", "1.0-2")
lp.provides = ["provision 1.0-1"]
lp.provides = ["provision=1.0-1"]
self.addpkg2db("local", lp)
self.args = "-A %s" % p.filename()
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")

View File

@ -0,0 +1,15 @@
self.description = "provision>=1.0-2 dependency"
p = pmpkg("pkg1", "1.0-2")
p.depends = ["provision>=1.0-2"]
self.addpkg2db("sync", p)
lp = pmpkg("pkg2", "1.0-2")
lp.provides = ["provision"]
self.addpkg2db("local", lp)
self.args = "-S %s" % p.name
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")

View File

@ -0,0 +1,15 @@
self.description = "provision>=1.0-2 dependency (2)"
p = pmpkg("pkg1", "1.0-2")
p.depends = ["provision>=1.0-2"]
self.addpkg2db("sync", p)
lp = pmpkg("pkg2", "1.0-2")
lp.provides = ["provision=1.0-2"]
self.addpkg2db("local", lp)
self.args = "-S %s" % p.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")

View File

@ -0,0 +1,15 @@
self.description = "provision>=1.0-2 dependency (3)"
p = pmpkg("pkg1", "1.0-2")
p.depends = ["provision>=1.0-2"]
self.addpkg2db("sync", p)
lp = pmpkg("pkg2", "1.0-2")
lp.provides = ["provision=1.0-1"]
self.addpkg2db("local", lp)
self.args = "-S %s" % p.name
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")

View File

@ -57,6 +57,7 @@ REPKG=0
LOGGING=0
SOURCEONLY=0
IGNOREARCH=0
HOLDVER=0
# Forces the pkgver of the current PKGBUILD. Used by the fakeroot call
# when dealing with svn/cvs/etc PKGBUILDs.
@ -979,6 +980,10 @@ install_package() {
devel_check() {
newpkgver=""
# Only update pkgver if --holdver is not set
if [ "$HOLDVER" = "1" ]; then
return
fi
if [ "$FORCE_VER" = "" ]; then
# Check if this is a svn/cvs/etc PKGBUILD; set $newpkgver if so.
# This will only be used on the first call to makepkg; subsequent
@ -1069,6 +1074,7 @@ usage() {
echo "$(gettext " -R, --repackage Repackage contents of pkg/ without building")"
echo "$(gettext " -s, --syncdeps Install missing dependencies with pacman")"
echo "$(gettext " --asroot Allow makepkg to run as root user")"
echo "$(gettext " --holdver Prevent automatic version bumping for development PKGBUILDs")"
echo "$(gettext " --source Do not build package; generate a source-only tarball")"
echo
echo "$(gettext "These options can be passed to pacman:")"
@ -1116,8 +1122,8 @@ SRCDEST=${SRCDEST:-$startdir} #default to $startdir if undefined
# Parse Command Line Options.
OPT_SHORT="AbcCdefFghiLmop:rRsSV"
OPT_LONG="ignorearch,asroot,builddeps,clean,cleancache,nodeps,noextract,force,geninteg,help,install,log"
OPT_LONG="$OPT_LONG,nocolor,nobuild,rmdeps,repackage,source,syncdeps,usesudo,version,forcever:"
OPT_LONG="ignorearch,asroot,builddeps,clean,cleancache,nodeps,noextract,force,forcever:,geninteg,help,holdver"
OPT_LONG="$OPT_LONG,install,log,nocolor,nobuild,rmdeps,repackage,source,syncdeps,usesudo,version"
# Pacman Options
OPT_LONG="$OPT_LONG,noconfirm,noprogressbar"
OPT_TEMP="$(getopt -o "$OPT_SHORT" -l "$OPT_LONG" -n "$(basename "$0")" -- "$@" || echo 'GETOPT GO BANG!')"
@ -1143,8 +1149,11 @@ while true; do
-d|--nodeps) NODEPS=1 ;;
-e|--noextract) NOEXTRACT=1 ;;
-f|--force) FORCE=1 ;;
#hidden opt used by fakeroot call for svn/cvs/etc PKGBUILDs to set pkgver
--forcever) shift; FORCE_VER=$1;;
-F) INFAKEROOT=1 ;;
-g|--geninteg) GENINTEG=1 ;;
--holdver) HOLDVER=1 ;;
-i|--install) INSTALL=1 ;;
-L|--log) LOGGING=1 ;;
-m|--nocolor) USE_COLOR='n' ;;
@ -1155,9 +1164,6 @@ while true; do
--source) SOURCEONLY=1 ;;
-s|--syncdeps) DEP_BIN=1 ;;
# Hidden option used by fakeroot call for svn/cvs/etc PKGBUILDs to set the pkgver
--forcever) shift; FORCE_VER=$1;;
# BEGIN DEPRECATED
-S|--usesudo)
warning "$(gettext "Sudo is used by default now. The --usesudo option is deprecated!")" ;;
@ -1172,6 +1178,13 @@ while true; do
shift
done
if [ "$HOLDVER" = "1" -a "$FORCE_VER" != "" ]; then
# The extra '--' is here to prevent gettext from thinking --holdver is
# an option
error "$(gettext -- "--holdver and --forcever cannot both be specified")"
exit 1
fi
if [ "$CLEANCACHE" = "1" ]; then
#fix flyspray feature request #5223
if [ -n "$SRCDEST" -a "$SRCDEST" != "$startdir" ]; then
@ -1311,11 +1324,15 @@ if [ "$install" -a ! -f "$install" ]; then
exit 1
fi
# We need to run devel_update regardless of whether we are in the fakeroot
# build process so that if the user runs makepkg --forcever manually, we
# 1) output the correct pkgver, and 2) use the correct filename when
# checking if the package file already exists - fixes FS #9194
devel_check
devel_update
if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" \
-a "$FORCE" = "0" -a "$GENINTEG" = "0" -a "$SOURCEONLY" = "0" \
-a "$FORCE_VER" = "" ]; then
-a "$FORCE" = "0" -a "$GENINTEG" = "0" -a "$SOURCEONLY" = "0" ]; then
if [ "$INSTALL" = "1" ]; then
warning "$(gettext "A package has already been built, installing existing package...")"
install_package
@ -1332,7 +1349,6 @@ if [ "$INFAKEROOT" = "1" ]; then
if [ "$REPKG" = "1" ]; then
warning "$(gettext "Skipping build.")"
else
devel_update
run_build
tidy_install
fi

View File

@ -28,6 +28,9 @@ confdir='@sysconfdir@'
FORCE=0
REPO_DB_FILE=""
# ensure we have a sane umask set
umask 0022
msg() {
local mesg=$1; shift
printf "==> ${mesg}\n" "$@" >&1
@ -77,7 +80,7 @@ test_repo_db_file () {
return 0 # YES
fi
else
return 0 # YES - No database file is also aloud.
return 0 # YES - No database file is also allowed
fi
return 1 # NO
@ -138,7 +141,7 @@ db_write_entry()
startdir
local OLDIFS="$IFS"
# IFS (field seperator) is only the newline character
# IFS (field separator) is only the newline character
IFS="
"
@ -285,7 +288,7 @@ gstmpdir=$(mktemp -d /tmp/repo-add.XXXXXXXXXX) || (\
exit 1)
success=0
# parse arguements
# parse arguments
for arg in "$@"; do
if [ "$arg" == "--force" -o "$arg" == "-f" ]; then
FORCE=1
@ -315,7 +318,7 @@ for arg in "$@"; do
fi
done
# if all operations were a success, rezip database
# if all operations were a success, re-zip database
if [ $success -eq 1 ]; then
msg "$(gettext "Creating updated database file %s")" "$REPO_DB_FILE"
pushd "$gstmpdir" 2>&1 >/dev/null

View File

@ -132,7 +132,7 @@ gstmpdir=$(mktemp -d /tmp/repo-remove.XXXXXXXXXX) || (\
exit 1)
success=0
# parse arguements
# parse arguments
for arg in "$@"; do
if [ -z "$REPO_DB_FILE" ]; then
REPO_DB_FILE=$(readlink -f "$arg")
@ -154,7 +154,7 @@ for arg in "$@"; do
fi
done
# if all operations were a success, rezip database
# if all operations were a success, re-zip database
if [ $success -eq 1 ]; then
msg "$(gettext "Creating updated database file '%s'...")" "$REPO_DB_FILE"
pushd "$gstmpdir" 2>&1 >/dev/null

View File

@ -606,8 +606,8 @@ static int _parseconfig(const char *file, const char *givensection,
* follow the toupper() rules we may expect, e.g. tr_TR where i != I.
*/
upperkey = strtoupper(strdup(key));
if(section == NULL && (strcmp(key, "Include") == 0 || strcmp(upperkey, "INCLUDE") == 0)) {
pm_printf(PM_LOG_ERROR, _("config file %s, line %d: 'Include' directive must belong to a section.\n"),
if(section == NULL) {
pm_printf(PM_LOG_ERROR, _("config file %s, line %d: All directives must belong to a section.\n"),
file, linenum);
return(1);
}

View File

@ -155,8 +155,7 @@ int pacman_remove(alpm_list_t *targets)
list_display(_("Targets:"), lst);
FREELIST(lst);
/* get confirmation */
if(!config->noconfirm
&& yesno(_("\nDo you want to remove these packages? [Y/n] ")) == 0) {
if(yesno(_("\nDo you want to remove these packages? [Y/n] ")) == 0) {
remove_cleanup();
FREELIST(finaltargs);
return(1);