mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
Merge branch 'maint'
This commit is contained in:
commit
b2fde01c54
@ -84,6 +84,7 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
|
|||||||
struct stat buf;
|
struct stat buf;
|
||||||
size_t len;
|
size_t len;
|
||||||
int ret;
|
int ret;
|
||||||
|
mode_t oldmask;
|
||||||
|
|
||||||
ALPM_LOG_FUNC;
|
ALPM_LOG_FUNC;
|
||||||
|
|
||||||
@ -104,6 +105,9 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
|
|||||||
MALLOC(syncpath, len, RET_ERR(PM_ERR_MEMORY, -1));
|
MALLOC(syncpath, len, RET_ERR(PM_ERR_MEMORY, -1));
|
||||||
sprintf(syncpath, "%s%s", dbpath, "sync/");
|
sprintf(syncpath, "%s%s", dbpath, "sync/");
|
||||||
|
|
||||||
|
/* make sure we have a sane umask */
|
||||||
|
oldmask = umask(0022);
|
||||||
|
|
||||||
if(stat(syncpath, &buf) != 0) {
|
if(stat(syncpath, &buf) != 0) {
|
||||||
_alpm_log(PM_LOG_DEBUG, "database dir '%s' does not exist, creating it\n",
|
_alpm_log(PM_LOG_DEBUG, "database dir '%s' does not exist, creating it\n",
|
||||||
syncpath);
|
syncpath);
|
||||||
@ -124,6 +128,7 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
|
|||||||
ret = _alpm_download_single_file(dbfile, db->servers, syncpath, force);
|
ret = _alpm_download_single_file(dbfile, db->servers, syncpath, force);
|
||||||
free(dbfile);
|
free(dbfile);
|
||||||
free(syncpath);
|
free(syncpath);
|
||||||
|
umask(oldmask);
|
||||||
|
|
||||||
if(ret == 1) {
|
if(ret == 1) {
|
||||||
/* files match, do nothing */
|
/* files match, do nothing */
|
||||||
@ -429,7 +434,12 @@ static int sync_db_read(pmdb_t *db, struct archive *archive,
|
|||||||
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
||||||
READ_AND_STORE_ALL(pkg->provides);
|
READ_AND_STORE_ALL(pkg->provides);
|
||||||
} else if(strcmp(line, "%DELTAS%") == 0) {
|
} else if(strcmp(line, "%DELTAS%") == 0) {
|
||||||
READ_AND_STORE_ALL(pkg->deltas);
|
/* Different than the rest because of the _alpm_delta_parse call. */
|
||||||
|
while(1) {
|
||||||
|
READ_NEXT(line);
|
||||||
|
if(strlen(line) == 0) break;
|
||||||
|
pkg->deltas = alpm_list_add(pkg->deltas, _alpm_delta_parse(line));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(strcmp(filename, "files") == 0) {
|
} else if(strcmp(filename, "files") == 0) {
|
||||||
|
@ -61,7 +61,7 @@ static int mount_point_cmp(const void *p1, const void *p2)
|
|||||||
|
|
||||||
static alpm_list_t *mount_point_list(void)
|
static alpm_list_t *mount_point_list(void)
|
||||||
{
|
{
|
||||||
alpm_list_t *mount_points = NULL;
|
alpm_list_t *mount_points = NULL, *ptr;
|
||||||
alpm_mountpoint_t *mp;
|
alpm_mountpoint_t *mp;
|
||||||
|
|
||||||
#if defined HAVE_GETMNTENT
|
#if defined HAVE_GETMNTENT
|
||||||
@ -124,6 +124,10 @@ static alpm_list_t *mount_point_list(void)
|
|||||||
|
|
||||||
mount_points = alpm_list_msort(mount_points, alpm_list_count(mount_points),
|
mount_points = alpm_list_msort(mount_points, alpm_list_count(mount_points),
|
||||||
mount_point_cmp);
|
mount_point_cmp);
|
||||||
|
for(ptr = mount_points; ptr != NULL; ptr = ptr->next) {
|
||||||
|
mp = ptr->data;
|
||||||
|
_alpm_log(PM_LOG_DEBUG, "mountpoint: %s\n", mp->mount_dir);
|
||||||
|
}
|
||||||
return(mount_points);
|
return(mount_points);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,6 +260,7 @@ cleanup:
|
|||||||
int _alpm_check_diskspace(pmtrans_t *trans, pmdb_t *db_local)
|
int _alpm_check_diskspace(pmtrans_t *trans, pmdb_t *db_local)
|
||||||
{
|
{
|
||||||
alpm_list_t *mount_points, *i;
|
alpm_list_t *mount_points, *i;
|
||||||
|
alpm_mountpoint_t *root_mp;
|
||||||
size_t replaces = 0, current = 0, numtargs;
|
size_t replaces = 0, current = 0, numtargs;
|
||||||
int abort = 0;
|
int abort = 0;
|
||||||
alpm_list_t *targ;
|
alpm_list_t *targ;
|
||||||
@ -263,7 +268,13 @@ int _alpm_check_diskspace(pmtrans_t *trans, pmdb_t *db_local)
|
|||||||
numtargs = alpm_list_count(trans->add);
|
numtargs = alpm_list_count(trans->add);
|
||||||
mount_points = mount_point_list();
|
mount_points = mount_point_list();
|
||||||
if(mount_points == NULL) {
|
if(mount_points == NULL) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not determine filesystem mount points"));
|
_alpm_log(PM_LOG_ERROR, _("could not determine filesystem mount points\n"));
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
root_mp = match_mount_point(mount_points, handle->root);
|
||||||
|
if(root_mp == NULL) {
|
||||||
|
_alpm_log(PM_LOG_ERROR, _("could not determine root mount point %s\n"),
|
||||||
|
handle->root);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stddef.h> /* size_t */
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/stat.h> /* struct stat */
|
#include <sys/stat.h> /* struct stat */
|
||||||
#include <archive.h> /* struct archive */
|
#include <archive.h> /* struct archive */
|
||||||
|
14
ltmain.sh
14
ltmain.sh
@ -5790,6 +5790,11 @@ func_mode_link ()
|
|||||||
arg=$func_stripname_result
|
arg=$func_stripname_result
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-Wl,--as-needed|-Wl,--no-as-needed)
|
||||||
|
deplibs="$deplibs $arg"
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
|
||||||
-Wl,*)
|
-Wl,*)
|
||||||
func_stripname '-Wl,' '' "$arg"
|
func_stripname '-Wl,' '' "$arg"
|
||||||
args=$func_stripname_result
|
args=$func_stripname_result
|
||||||
@ -6150,6 +6155,15 @@ func_mode_link ()
|
|||||||
lib=
|
lib=
|
||||||
found=no
|
found=no
|
||||||
case $deplib in
|
case $deplib in
|
||||||
|
-Wl,--as-needed|-Wl,--no-as-needed)
|
||||||
|
if test "$linkmode,$pass" = "prog,link"; then
|
||||||
|
compile_deplibs="$deplib $compile_deplibs"
|
||||||
|
finalize_deplibs="$deplib $finalize_deplibs"
|
||||||
|
else
|
||||||
|
deplibs="$deplib $deplibs"
|
||||||
|
fi
|
||||||
|
continue
|
||||||
|
;;
|
||||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
||||||
if test "$linkmode,$pass" = "prog,link"; then
|
if test "$linkmode,$pass" = "prog,link"; then
|
||||||
compile_deplibs="$deplib $compile_deplibs"
|
compile_deplibs="$deplib $compile_deplibs"
|
||||||
|
@ -1258,7 +1258,8 @@ check_sanity() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local provides_list=()
|
local provides_list=()
|
||||||
eval $(awk '/^[[:space:]]*provides=/,/\)/' "$BUILDFILE" | sed "s/provides=/provides_list+=/")
|
eval $(awk '/^[[:space:]]*provides=/,/\)/' "$BUILDFILE" | \
|
||||||
|
sed -e "s/provides=/provides_list+=/" -e "s/#.*//")
|
||||||
for i in ${provides_list[@]}; do
|
for i in ${provides_list[@]}; do
|
||||||
if [[ $i != ${i//</} || $i != ${i//>/} ]]; then
|
if [[ $i != ${i//</} || $i != ${i//>/} ]]; then
|
||||||
error "$(gettext "Provides array cannot contain comparison (< or >) operators.")"
|
error "$(gettext "Provides array cannot contain comparison (< or >) operators.")"
|
||||||
@ -1267,7 +1268,8 @@ check_sanity() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
local backup_list=()
|
local backup_list=()
|
||||||
eval $(awk '/^[[:space:]]*backup=/,/\)/' "$BUILDFILE" | sed "s/backup=/backup_list+=/")
|
eval $(awk '/^[[:space:]]*backup=/,/\)/' "$BUILDFILE" | \
|
||||||
|
sed -e "s/backup=/backup_list+=/" -e "s/#.*//")
|
||||||
for i in "${backup_list[@]}"; do
|
for i in "${backup_list[@]}"; do
|
||||||
if [[ ${i:0:1} = "/" ]]; then
|
if [[ ${i:0:1} = "/" ]]; then
|
||||||
error "$(gettext "Backup entry should not contain leading slash : %s")" "$i"
|
error "$(gettext "Backup entry should not contain leading slash : %s")" "$i"
|
||||||
@ -1276,7 +1278,8 @@ check_sanity() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
local optdepends_list=()
|
local optdepends_list=()
|
||||||
eval $(awk '/^[[:space:]]*optdepends=/,/\)/' "$BUILDFILE" | sed "s/optdepends=/optdepends_list+=/")
|
eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(|#.*)$/' "$BUILDFILE" | \
|
||||||
|
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//")
|
||||||
for i in "${optdepends_list[@]}"; do
|
for i in "${optdepends_list[@]}"; do
|
||||||
local pkg=${i%%:*}
|
local pkg=${i%%:*}
|
||||||
if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]+$ ]]; then
|
if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]+$ ]]; then
|
||||||
@ -1300,7 +1303,8 @@ check_sanity() {
|
|||||||
|
|
||||||
local valid_options=1
|
local valid_options=1
|
||||||
local known kopt options_list
|
local known kopt options_list
|
||||||
eval $(awk '/^[[:space:]]*options=/,/\)/' "$BUILDFILE" | sed "s/options=/options_list+=/")
|
eval $(awk '/^[[:space:]]*options=/,/\)/' "$BUILDFILE" | \
|
||||||
|
sed -e "s/options=/options_list+=/" -e "s/#.*//")
|
||||||
for i in ${options_list[@]}; do
|
for i in ${options_list[@]}; do
|
||||||
known=0
|
known=0
|
||||||
# check if option matches a known option or its inverse
|
# check if option matches a known option or its inverse
|
||||||
|
@ -663,6 +663,13 @@ static int process_targname(alpm_list_t *dblist, char *targname)
|
|||||||
{
|
{
|
||||||
pmpkg_t *pkg = alpm_find_dbs_satisfier(dblist, targname);
|
pmpkg_t *pkg = alpm_find_dbs_satisfier(dblist, targname);
|
||||||
|
|
||||||
|
/* #FS23342 - skip ignored packages when user says no */
|
||||||
|
if(pm_errno == PM_ERR_PKG_IGNORED) {
|
||||||
|
pm_printf(PM_LOG_WARNING, _("skipping target: %s\n"), targname);
|
||||||
|
pm_errno = 0;
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
if(pkg) {
|
if(pkg) {
|
||||||
return(process_pkg(pkg));
|
return(process_pkg(pkg));
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,5 @@ self.addpkg2db("sync", pkg)
|
|||||||
self.option["IgnorePkg"] = ["package1"]
|
self.option["IgnorePkg"] = ["package1"]
|
||||||
self.args = "--ask=1 -S %s" % pkg.name
|
self.args = "--ask=1 -S %s" % pkg.name
|
||||||
|
|
||||||
self.addrule("PACMAN_RETCODE=1")
|
self.addrule("PACMAN_RETCODE=0")
|
||||||
self.addrule("!PKG_EXIST=package1")
|
self.addrule("!PKG_EXIST=package1")
|
||||||
|
Loading…
Reference in New Issue
Block a user