From 7520c0facb23887fe93057736834061c6dedfdec Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 10 Jul 2012 20:16:37 -0500 Subject: Add more debug logging to dir_belongsto_pkg() function Now that we pass in the handle, we might as well add logging. Signed-off-by: Dan McGee --- lib/libalpm/conflict.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index d6e5d8c6..6bfd256f 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -341,6 +341,8 @@ static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath, /* check directory is actually in package - used for subdirectory checks */ if(!_alpm_filelist_contains(alpm_pkg_get_files(pkg), dirpath)) { + _alpm_log(handle, ALPM_LOG_DEBUG, + "directory %s not in package %s\n", dirpath, pkg->name); return 0; } @@ -357,6 +359,9 @@ static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath, } if(_alpm_filelist_contains(alpm_pkg_get_files(i->data), dirpath)) { + _alpm_log(handle, ALPM_LOG_DEBUG, + "file %s also in package %s\n", dirpath, + ((alpm_pkg_t*)i->data)->name); return 0; } } @@ -391,6 +396,8 @@ static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath, continue; } else { closedir(dir); + _alpm_log(handle, ALPM_LOG_DEBUG, + "unowned file %s found in directory\n", path); return 0; } } @@ -554,7 +561,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, sprintf(dir, "%s/", filestr); if(_alpm_filelist_contains(alpm_pkg_get_files(dbpkg), dir)) { _alpm_log(handle, ALPM_LOG_DEBUG, - "check if all files in %s belong to %s\n", + "checking if all files in %s belong to %s\n", dir, dbpkg->name); resolved_conflict = dir_belongsto_pkg(handle, dir, dbpkg); } -- cgit v1.2.3-24-g4f1b From 958b41fa5fcbb6ac806bd969d6333019ba3c6441 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 11 Jul 2012 11:10:56 +1000 Subject: contrib/bacman: fix package architecture in filename Give the generated package the correct architecture in its filename rather than assuming the system architecture. Also add updated copyright notice. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- contrib/bacman.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/bacman.in b/contrib/bacman.in index c55d7161..f7e3202f 100755 --- a/contrib/bacman.in +++ b/contrib/bacman.in @@ -4,7 +4,8 @@ # This script rebuilds an already installed package using metadata # stored into the pacman database and system files # -# (c) 2008 - locci +# Copyright (c) 2008 locci +# Copyright (c) 2008-2012 Pacman Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -88,7 +89,6 @@ if [[ -r ~/.makepkg.conf ]]; then source ~/.makepkg.conf fi -pkg_arch=${CARCH:-'unknown'} pkg_dest="${PKGDEST:-$PWD}" pkg_pkger=${PACKAGER:-'Unknown Packager'} @@ -184,7 +184,6 @@ fi echo "# $(LC_ALL=C date)" >> .PKGINFO echo "#" >> .PKGINFO -cat "$pkg_dir"/{desc,files} | while read i; do if [[ -z $i ]]; then continue; @@ -214,6 +213,7 @@ while read i; do ;; %ARCH%) echo "arch = $i" >> .PKGINFO + pkg_arch="$i" ;; %BUILDDATE%) echo "builddate = $(date -u "+%s")" >> .PKGINFO @@ -249,7 +249,7 @@ while read i; do echo "backup = ${i%%$'\t'*}" >> .PKGINFO ;; esac -done +done < <(cat "$pkg_dir"/{desc,files}) comp_files=".PKGINFO" -- cgit v1.2.3-24-g4f1b From b782388f1670d9ff819461cfa7e365f7e8178173 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 16 Jul 2012 00:28:00 +1000 Subject: makepkg: remove unnecessary formatting This extra newline leaves a gap that looks strange in of itself, but is highlighted when piping -g output to a PKGBUILD. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 6990572b..e21418a6 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -602,7 +602,6 @@ get_integlist() { generate_checksums() { msg "$(gettext "Generating checksums for source files...")" - plain "" if ! type -p openssl >/dev/null; then error "$(gettext "Cannot find the %s binary required for generating sourcefile checksums.")" "openssl" -- cgit v1.2.3-24-g4f1b