From allan at archlinux.org Thu Dec 7 05:31:28 2017 From: allan at archlinux.org (Allan McRae) Date: Thu, 7 Dec 2017 15:31:28 +1000 Subject: [pacman-dev] [PATCH v2 2/2] makepkg: refactor checking for write permissions into a utility function In-Reply-To: <20171030180329.24189-2-eschwartz@archlinux.org> References: <20171008070510.13259-1-eschwartz@archlinux.org> <20171030180329.24189-1-eschwartz@archlinux.org> <20171030180329.24189-2-eschwartz@archlinux.org> Message-ID: <59c4e4af-f44d-ba53-3f52-650ca58cbfbd@archlinux.org> On 31/10/17 04:03, Eli Schwartz wrote: > Additionally provide a separate error for the confusing if unlikely > event that the user tries to use an existing file as a package output > directory. > > This also means we now consistently try to create any nonexistent *DEST > directories as needed before aborting with E_FS_PERMISSIONS. Previously > only $BUILDDIR received that kindness. > > Fixes FS#43537 > > Signed-off-by: Eli Schwartz > --- > > mkdir -p has a really bad error when a file exists that conflicts with > the path to be created. But I'm still not sure whether to include that > code in ensure_writable_dir > > scripts/libmakepkg/util/util.sh.in | 19 +++++++++++++++++++ > scripts/makepkg.sh.in | 19 ++++++------------- > 2 files changed, 25 insertions(+), 13 deletions(-) > > diff --git a/scripts/libmakepkg/util/util.sh.in b/scripts/libmakepkg/util/util.sh.in > index d676249d..8a6149ed 100644 > --- a/scripts/libmakepkg/util/util.sh.in > +++ b/scripts/libmakepkg/util/util.sh.in > @@ -83,3 +83,22 @@ cd_safe() { > exit 1 > fi > } > + > +# Try to create directory if one does not yet exist. Fails if the directory > +# exists but has no write permissions, or if there is an existing file with > +# the same name. > +ensure_writable_dir() { > + local parent=$1 dirname=$1 > + > + until [[ -e $parent ]]; do > + parent="${parent%/*}" > + done > + if [[ -f $parent ]]; then > + error "$(gettext "Cannot create %s due to conflicting file.")" "$parent" > + return 1 > + fi > + if ( [[ ! -d $dirname ]] && ! mkdir -p "$dirname" ) || [[ ! -w $dirname ]]; then > + return 1 > + fi > + return 0 > +} > diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in > index 20cc22ad..35665f16 100644 > --- a/scripts/makepkg.sh.in > +++ b/scripts/makepkg.sh.in > @@ -1360,34 +1360,27 @@ else > fi > > > -if [[ ! -d $BUILDDIR ]]; then > - if ! mkdir -p "$BUILDDIR"; then > - error "$(gettext "You do not have write permission to create packages in %s.")" "$BUILDDIR" > - plain "$(gettext "Aborting...")" > - exit 1 > - fi > - chmod a-s "$BUILDDIR" As discussed on IRC, this chmod is important. If the build dir gets created with a sticky bit, that propagates through the package. A From allan at archlinux.org Thu Dec 7 05:51:03 2017 From: allan at archlinux.org (Allan McRae) Date: Thu, 7 Dec 2017 15:51:03 +1000 Subject: [pacman-dev] [PATCH v3 3/4] makepkg: add support for the zst format In-Reply-To: <20171030181519.24501-3-eschwartz@archlinux.org> References: <20171008065024.12604-1-eschwartz@archlinux.org> <20171030181519.24501-1-eschwartz@archlinux.org> <20171030181519.24501-3-eschwartz@archlinux.org> Message-ID: On 31/10/17 04:15, Eli Schwartz wrote: > Signed-off-by: Eli Schwartz > --- This and the repo-add patch look fine, but will not be pulled until libarchive supporting these formats is released. > > v3: fix typo > > doc/makepkg.conf.5.txt | 3 ++- > etc/makepkg.conf.in | 1 + > scripts/libmakepkg/util/compress.sh.in | 1 + > 3 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt > index 5bd3472f..d01c13b6 100644 > --- a/doc/makepkg.conf.5.txt > +++ b/doc/makepkg.conf.5.txt > @@ -246,6 +246,7 @@ Options > **COMPRESSGZ=**"(gzip -c -f -n)":: > **COMPRESSBZ2=**"(bzip2 -c -f)":: > **COMPRESSXZ=**"(xz -c -z -)":: > +**COMPRESSZST=**"(zstd -c -z -)":: > **COMPRESSLZO**"(lzop -q)":: > **COMPRESSLRZ=**"(lrzip -q)":: > **COMPRESSZ=**"(compress -c -f)":: There has got to be a better way than continuously extending this variable list... A From allan at archlinux.org Thu Dec 7 05:57:44 2017 From: allan at archlinux.org (Allan McRae) Date: Thu, 7 Dec 2017 15:57:44 +1000 Subject: [pacman-dev] [PATCH] makepkg --packagelist: just list the built package files we will build In-Reply-To: <20171030183712.26034-1-eschwartz@archlinux.org> References: <20171030183712.26034-1-eschwartz@archlinux.org> Message-ID: On 31/10/17 04:37, Eli Schwartz wrote: > Currently this seems to be only theoretically useful. The most likely > reason for wanting a packagelist is in order to script makepkg and > derive the filenames for the packages we want to install or repo-add, > but in the current implementation this requires a lot of additional > post-processing which must be duplicated in every utility to wrap > makepkg. > > - It is of minimal use to know what packages might get created on some > other device utilizing a different CPU/OS architecture, so don't list > them. > - It is non-trivial to reimplement makepkg's logic for sourcing any of > several makepkg.conf configuration files, then applying environment > overrides in order to get the PKGDEST and PKGEXT, so include them > directly in the returned filenames. > > Signed-off-by: Eli Schwartz Needs makepkg man page update too. > --- > scripts/libmakepkg/util/pkgbuild.sh.in | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in > index 2a4bd3af..6cfda0b3 100644 > --- a/scripts/libmakepkg/util/pkgbuild.sh.in > +++ b/scripts/libmakepkg/util/pkgbuild.sh.in > @@ -149,14 +149,12 @@ print_all_package_names() { > local version=$(get_full_version) > local architecture pkg opts a > for pkg in ${pkgname[@]}; do > - get_pkgbuild_attribute "$pkg" 'arch' 1 architecture > + architecture=$(get_pkg_arch $pkg) > get_pkgbuild_attribute "$pkg" 'options' 1 opts > - for a in ${architecture[@]}; do > - printf "%s-%s-%s\n" "$pkg" "$version" "$a" > - if in_opt_array "debug" ${opts[@]} && in_opt_array "strip" ${opts[@]}; then > - printf "%s-%s-%s-%s\n" "$pkg" "@DEBUGSUFFIX@" "$version" "$a" > - fi > - done > + printf "%s/%s-%s-%s%s\n" "$PKGDEST" "$pkg" "$version" "$architecture" "$PKGEXT" > + if in_opt_array "debug" ${opts[@]} && in_opt_array "strip" ${opts[@]}; then > + printf "%s/%s-%s-%s-%s%s\n" "$PKGDEST" "$pkg" "@DEBUGSUFFIX@" "$version" "$architecture" "$PKGEXT" > + fi > done > } > > From eschwartz at archlinux.org Thu Dec 7 05:57:09 2017 From: eschwartz at archlinux.org (Eli Schwartz) Date: Thu, 7 Dec 2017 00:57:09 -0500 Subject: [pacman-dev] [PATCH v3 2/2] makepkg: refactor checking for write permissions into a utility function In-Reply-To: <59c4e4af-f44d-ba53-3f52-650ca58cbfbd@archlinux.org> References: <59c4e4af-f44d-ba53-3f52-650ca58cbfbd@archlinux.org> Message-ID: <20171207055709.19164-1-eschwartz@archlinux.org> Additionally provide a separate error for the confusing if unlikely event that the user tries to use an existing file as a package output directory. This also means we now consistently try to create any nonexistent *DEST directories as needed before aborting with E_FS_PERMISSIONS. Previously only $BUILDDIR received that kindness. Fixes FS#43537 Signed-off-by: Eli Schwartz --- v3: rebase against escondida's error codes patch Also re-add the erroneously removed `chmod a-s`. Just do this unconditionally now. scripts/libmakepkg/util/util.sh.in | 19 +++++++++++++++++++ scripts/makepkg.sh.in | 20 +++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/scripts/libmakepkg/util/util.sh.in b/scripts/libmakepkg/util/util.sh.in index d676249d..8a6149ed 100644 --- a/scripts/libmakepkg/util/util.sh.in +++ b/scripts/libmakepkg/util/util.sh.in @@ -83,3 +83,22 @@ cd_safe() { exit 1 fi } + +# Try to create directory if one does not yet exist. Fails if the directory +# exists but has no write permissions, or if there is an existing file with +# the same name. +ensure_writable_dir() { + local parent=$1 dirname=$1 + + until [[ -e $parent ]]; do + parent="${parent%/*}" + done + if [[ -f $parent ]]; then + error "$(gettext "Cannot create %s due to conflicting file.")" "$parent" + return 1 + fi + if ( [[ ! -d $dirname ]] && ! mkdir -p "$dirname" ) || [[ ! -w $dirname ]]; then + return 1 + fi + return 0 +} diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 1191e4ec..c9c80bca 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1359,34 +1359,28 @@ else fi -if [[ ! -d $BUILDDIR ]]; then - if ! mkdir -p "$BUILDDIR"; then - error "$(gettext "You do not have write permission to create packages in %s.")" "$BUILDDIR" - plain "$(gettext "Aborting...")" - exit $E_FS_PERMISSIONS - fi - chmod a-s "$BUILDDIR" -fi -if [[ ! -w $BUILDDIR ]]; then +# check that all settings directories are user-writable +if ! ensure_writable_dir "$BUILDDIR"; then error "$(gettext "You do not have write permission to create packages in %s.")" "$BUILDDIR" plain "$(gettext "Aborting...")" exit $E_FS_PERMISSIONS fi +chmod a-s "$BUILDDIR" -if (( ! (NOBUILD || GENINTEG) )) && [[ ! -w $PKGDEST ]]; then +if (( ! (NOBUILD || GENINTEG) )) && ! ensure_writable_dir "$PKGDEST"; then error "$(gettext "You do not have write permission to store packages in %s.")" "$PKGDEST" plain "$(gettext "Aborting...")" exit $E_FS_PERMISSIONS fi -if [[ ! -w $SRCDEST ]] ; then +if ! ensure_writable_dir "$SRCDEST" ; then error "$(gettext "You do not have write permission to store downloads in %s.")" "$SRCDEST" plain "$(gettext "Aborting...")" exit $E_FS_PERMISSIONS fi if (( SOURCEONLY )); then - if [[ ! -w $SRCPKGDEST ]]; then + if ! ensure_writable_dir "$SRCPKGDEST"; then error "$(gettext "You do not have write permission to store source tarballs in %s.")" "$SRCPKGDEST" plain "$(gettext "Aborting...")" exit $E_FS_PERMISSIONS @@ -1397,7 +1391,7 @@ if (( SOURCEONLY )); then IGNOREARCH=1 fi -if (( LOGGING )) && [[ ! -w $LOGDEST ]]; then +if (( LOGGING )) && ! ensure_writable_dir "$LOGDEST"; then error "$(gettext "You do not have write permission to store logs in %s.")" "$LOGDEST" plain "$(gettext "Aborting...")" exit $E_FS_PERMISSIONS -- 2.15.1 From andrew.gregory.8 at gmail.com Sat Dec 16 17:41:10 2017 From: andrew.gregory.8 at gmail.com (Andrew Gregory) Date: Sat, 16 Dec 2017 12:41:10 -0500 Subject: [pacman-dev] [PATCH] avoid printing NULL string Message-ID: <20171216174111.4641-1-andrew.gregory.8@gmail.com> Signed-off-by: Andrew Gregory --- lib/libalpm/be_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 06f509a6..1b7c8b6f 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -626,9 +626,9 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive, if(filename == NULL) { /* A file exists outside of a subdirectory. This isn't a read error, so return * success and try to continue on. */ _alpm_log(db->handle, ALPM_LOG_WARNING, _("unknown database file: %s\n"), - filename); + entryname); return 0; } if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0 -- 2.15.1 From andrew.gregory.8 at gmail.com Sat Dec 16 17:41:11 2017 From: andrew.gregory.8 at gmail.com (Andrew Gregory) Date: Sat, 16 Dec 2017 12:41:11 -0500 Subject: [pacman-dev] [PATCH] dload: ensure callback is always initialized once Message-ID: <20171216174111.4641-2-andrew.gregory.8@gmail.com> Frontends rely on an initialization call for setup between downloads. Checking for intialization after checking for a completed download can skip initialization in cases where files are small enough to be downloaded all at once (FS#56408). Relying on previous download size can result in multiple initializations if there are multiple non-transfer events prior to the download starting (fS#56468). Introduce a new cb_initialized variable to the payload struct and use it to ensure that the callback is initialized exactly once prior to any actual events. Fixes FS#56408, FS#56468 Signed-off-by: Andrew Gregory --- lib/libalpm/dload.c | 9 +++++---- lib/libalpm/dload.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 875b689c..44db5f88 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -132,13 +132,13 @@ static int dload_progress_cb(void *file, curl_off_t dltotal, curl_off_t dlnow, * 0, -1: download initialized * 0, 0: non-download event * x {x>0}, x: download complete * x {x>0, x 0}: download progress, expected total is known */ - if(current_size == total_size) { - payload->handle->dlcb(payload->remote_name, dlnow, dltotal); - } else if(!payload->prevprogress) { + if(!payload->cb_initialized) { payload->handle->dlcb(payload->remote_name, 0, -1); - } else if(payload->prevprogress == current_size) { + payload->cb_initialized = 1; + } + if(payload->prevprogress == current_size) { payload->handle->dlcb(payload->remote_name, 0, 0); } else { /* do NOT include initial_size since it wasn't part of the package's * download_size (nor included in the total download size callback) */ @@ -731,7 +731,8 @@ void _alpm_dload_payload_reset_for_retry(struct dload_payload *payload) FREE(payload->fileurl); payload->initial_size += payload->prevprogress; payload->prevprogress = 0; payload->unlink_on_fail = 0; + payload->cb_initialized = 0; } /* vim: set noet: */ diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index 6ca775a7..ac948528 100644 --- a/lib/libalpm/dload.h +++ b/lib/libalpm/dload.h @@ -40,8 +40,9 @@ struct dload_payload { int allow_resume; int errors_ok; int unlink_on_fail; int trust_remote_name; + int cb_initialized; #ifdef HAVE_LIBCURL CURLcode curlerr; /* last error produced by curl */ #endif }; -- 2.15.1 From eschwartz at archlinux.org Sun Dec 17 19:28:23 2017 From: eschwartz at archlinux.org (Eli Schwartz) Date: Sun, 17 Dec 2017 14:28:23 -0500 Subject: [pacman-dev] [PATCH 2/3] vercmp: remove --usage variant of the -help option In-Reply-To: <20171217192824.26777-1-eschwartz@archlinux.org> References: <20171217192824.26777-1-eschwartz@archlinux.org> Message-ID: <20171217192824.26777-2-eschwartz@archlinux.org> I think two ways to ask for this are enough for everyone, and we have never documented this anyway. Signed-off-by: Eli Schwartz --- src/util/vercmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/vercmp.c b/src/util/vercmp.c index 7b34b30a..42639bec 100644 --- a/src/util/vercmp.c +++ b/src/util/vercmp.c @@ -47,8 +47,7 @@ int main(int argc, char *argv[]) return 2; } if(argc > 1 && - (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0 - || strcmp(argv[1], "--usage") == 0)) { + (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)) { usage(); return 0; } -- 2.15.1 From eschwartz at archlinux.org Sun Dec 17 19:28:24 2017 From: eschwartz at archlinux.org (Eli Schwartz) Date: Sun, 17 Dec 2017 14:28:24 -0500 Subject: [pacman-dev] [PATCH 3/3] vercmp: fix incorrect info in the manpage In-Reply-To: <20171217192824.26777-1-eschwartz@archlinux.org> References: <20171217192824.26777-1-eschwartz@archlinux.org> Message-ID: <20171217192824.26777-3-eschwartz@archlinux.org> Signed-off-by: Eli Schwartz --- doc/vercmp.8.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/doc/vercmp.8.txt b/doc/vercmp.8.txt index 5316b3cb..18819953 100644 --- a/doc/vercmp.8.txt +++ b/doc/vercmp.8.txt @@ -11,7 +11,7 @@ vercmp - version comparison utility Synopsis -------- -'vercmp' +'vercmp' [-h] [--help] Description @@ -44,8 +44,9 @@ mainly for supporting versioned dependencies that do not include the 'pkgrel'. Options ------- *-h, \--help*:: - Display syntax for the given operation. If no operation was supplied, - then the general syntax is shown. + + Display summary of the available return codes. Must be the first option + specified. Examples @@ -67,11 +68,6 @@ Examples -1 -Configuration -------------- -There is none. - - See Also -------- linkman:pacman[8], linkman:makepkg[8], linkman:libalpm[3] -- 2.15.1 From eschwartz at archlinux.org Sun Dec 17 19:28:22 2017 From: eschwartz at archlinux.org (Eli Schwartz) Date: Sun, 17 Dec 2017 14:28:22 -0500 Subject: [pacman-dev] [PATCH 1/3] vercmp: fail when the wrong number of arguments are provided Message-ID: <20171217192824.26777-1-eschwartz@archlinux.org> Fixes FS#49093 Signed-off-by: Eli Schwartz --- src/util/vercmp.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/util/vercmp.c b/src/util/vercmp.c index 3521a96a..7b34b30a 100644 --- a/src/util/vercmp.c +++ b/src/util/vercmp.c @@ -40,8 +40,6 @@ static void usage(void) int main(int argc, char *argv[]) { - const char *s1 = ""; - const char *s2 = ""; int ret; if(argc == 1) { @@ -54,14 +52,12 @@ int main(int argc, char *argv[]) usage(); return 0; } - if(argc > 2) { - s2 = argv[2]; - } - if(argc > 1) { - s1 = argv[1]; + if(argc != 3) { + printf("error: %d arguments specified but vercmp needs 2\n", argc-1); + return EXIT_FAILURE; } - ret = alpm_pkg_vercmp(s1, s2); + ret = alpm_pkg_vercmp(argv[1], argv[2]); printf("%d\n", ret); return EXIT_SUCCESS; } -- 2.15.1 From andrew.gregory.8 at gmail.com Mon Dec 18 02:53:05 2017 From: andrew.gregory.8 at gmail.com (Andrew Gregory) Date: Sun, 17 Dec 2017 21:53:05 -0500 Subject: [pacman-dev] [PATCH 1/3] vercmp: fail when the wrong number of arguments are provided In-Reply-To: <20171217192824.26777-1-eschwartz@archlinux.org> References: <20171217192824.26777-1-eschwartz@archlinux.org> Message-ID: <20171218025304.GA3130@b42-desktop.localdomain> On 12/17/17 at 02:28pm, Eli Schwartz wrote: > Fixes FS#49093 > > Signed-off-by: Eli Schwartz > --- > src/util/vercmp.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/src/util/vercmp.c b/src/util/vercmp.c > index 3521a96a..7b34b30a 100644 > --- a/src/util/vercmp.c > +++ b/src/util/vercmp.c > @@ -40,8 +40,6 @@ static void usage(void) > > int main(int argc, char *argv[]) > { > - const char *s1 = ""; > - const char *s2 = ""; > int ret; > > if(argc == 1) { > @@ -54,14 +52,12 @@ int main(int argc, char *argv[]) > usage(); > return 0; > } > - if(argc > 2) { > - s2 = argv[2]; > - } > - if(argc > 1) { > - s1 = argv[1]; > + if(argc != 3) { > + printf("error: %d arguments specified but vercmp needs 2\n", argc-1); Errors should go to stderr, not stdout, and our style guidelines require spaces around arithmetic operators. > + return EXIT_FAILURE; > } > > - ret = alpm_pkg_vercmp(s1, s2); > + ret = alpm_pkg_vercmp(argv[1], argv[2]); > printf("%d\n", ret); > return EXIT_SUCCESS; > } > -- > 2.15.1 From eschwartz at archlinux.org Mon Dec 18 03:57:52 2017 From: eschwartz at archlinux.org (Eli Schwartz) Date: Sun, 17 Dec 2017 22:57:52 -0500 Subject: [pacman-dev] [PATCH v2] vercmp: fail when the wrong number of arguments are provided In-Reply-To: <20171218025304.GA3130@b42-desktop.localdomain> References: <20171218025304.GA3130@b42-desktop.localdomain> Message-ID: <20171218035752.12777-1-eschwartz@archlinux.org> Fixes FS#49093 Signed-off-by: Eli Schwartz --- v2: errors go to stderr follow style guidelines for arithmetic minor grammatical correction for error message src/util/vercmp.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/util/vercmp.c b/src/util/vercmp.c index 3521a96a..6298ba79 100644 --- a/src/util/vercmp.c +++ b/src/util/vercmp.c @@ -40,8 +40,6 @@ static void usage(void) int main(int argc, char *argv[]) { - const char *s1 = ""; - const char *s2 = ""; int ret; if(argc == 1) { @@ -54,14 +52,12 @@ int main(int argc, char *argv[]) usage(); return 0; } - if(argc > 2) { - s2 = argv[2]; - } - if(argc > 1) { - s1 = argv[1]; + if(argc != 3) { + fprintf(stderr, "error: %d argument(s) specified but vercmp needs 2\n", argc - 1); + return EXIT_FAILURE; } - ret = alpm_pkg_vercmp(s1, s2); + ret = alpm_pkg_vercmp(argv[1], argv[2]); printf("%d\n", ret); return EXIT_SUCCESS; } -- 2.15.1 From andrew.gregory.8 at gmail.com Thu Dec 21 04:22:36 2017 From: andrew.gregory.8 at gmail.com (Andrew Gregory) Date: Wed, 20 Dec 2017 23:22:36 -0500 Subject: [pacman-dev] [PATCH] do not rely on name hashes for matching Message-ID: <20171221042236.1667-1-andrew.gregory.8@gmail.com> 6cfc4757b98e813428d261dbc185e20618ca83a6 was overzealous in attempting to optimize away a call to strcmp based on a comparison of hashes. The call can be skipped if the hashes are different, but different strings could have the same hash. Signed-off-by: Andrew Gregory --- lib/libalpm/deps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 96f91739..3d3f8ef2 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -698,10 +698,8 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep, } for(j = _alpm_db_get_pkgcache(db); j; j = j->next) { alpm_pkg_t *pkg = j->data; - /* with hash != hash, we can even skip the strcmp() as we know they can't - * possibly be the same string */ - if(pkg->name_hash != dep->name_hash && _alpm_depcmp(pkg, dep) - && !alpm_pkg_find(excluding, pkg->name)) { + if((pkg->name_hash != dep->name_hash || strcmp(pkg->name, dep->name) != 0) + && _alpm_depcmp(pkg, dep) && !alpm_pkg_find(excluding, pkg->name)) { if(alpm_pkg_should_ignore(handle, pkg)) { alpm_question_install_ignorepkg_t question = { .type = ALPM_QUESTION_INSTALL_IGNOREPKG, -- 2.15.1 From allan at archlinux.org Sun Dec 24 06:09:31 2017 From: allan at archlinux.org (Allan McRae) Date: Sun, 24 Dec 2017 16:09:31 +1000 Subject: [pacman-dev] Disallowing comments on closed bugs Message-ID: <8e7b7028-2b5b-895a-19dd-efd03d7bb7c0@archlinux.org> Because of comments posted on a bug that was closed over a year ago (that achieved nothing...), I have disabled comments on closed bugs. All future comments on closed bugs will have to be achieved through a request to reopen the bug. A From mar77i at protonmail.ch Sun Dec 24 09:18:20 2017 From: mar77i at protonmail.ch (Mar77i) Date: Sun, 24 Dec 2017 04:18:20 -0500 Subject: [pacman-dev] Disallowing comments on closed bugs Message-ID: Merry disappointmas to you too. That conversation looks a lot like other people's family holidays. Cheer up, or beer up, if you think that helps the former. :) cheers! mar77i ? Sent with ProtonMail Secure Email. ?