[pacman-dev] [GIT] The official pacman repository branch, master, updated. v3.2.0-50-gd05882d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The official pacman repository". The branch, master has been updated via d05882db9e417244fa580c4697b45333faffcc79 (commit) via 070135626023caa0186a77f9f846c078e3cf1be8 (commit) via 9dbe5c9d1ee5fb00f25515dfb5a2feb3ae6ebd59 (commit) via a06d0de104d2f03c19b917ea47394d8d6be89a9a (commit) from a4100b384737d6b422a31eb0f6614b4f5f6070cb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d05882db9e417244fa580c4697b45333faffcc79 Author: Xavier Chantry <shiningxc@gmail.com> Date: Sun Aug 17 19:36:28 2008 +0200 Rename alpm_db_get{pkg,grp}cache to alpm_db_get_{pkg,grp}cache This is more consistent with the private functions : _alpm_db_get_{pkg,grp}cache Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> commit 070135626023caa0186a77f9f846c078e3cf1be8 Author: Xavier Chantry <shiningxc@gmail.com> Date: Sun Aug 17 19:30:36 2008 +0200 Change checkdeps and checkdbconflicts to be more flexible. These two functions now take directly a package list rather than a database. checkdbconflicts was renamed to checkconflicts. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> commit 9dbe5c9d1ee5fb00f25515dfb5a2feb3ae6ebd59 Author: Xavier Chantry <shiningxc@gmail.com> Date: Sun Aug 24 02:29:10 2008 +0200 pacman : smarter optdepends handling. During an upgrade, only the new optdepends will be displayed, to only keep the useful information and not clutter pacman output too much. The whole optdepends list is always available with -Si / -Qi. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> commit a06d0de104d2f03c19b917ea47394d8d6be89a9a Author: Xavier Chantry <shiningxc@gmail.com> Date: Sun Aug 24 01:51:56 2008 +0200 makepkg.conf : some info / docs adjustements After commit 7865fb9af487, info pages are now treated like man pages. This means even with !docs, info pages will still be included. And including info pages was the main reason the docs option was enabled by default recently. So this is now longer needed, and we can revert back to !docs by default for disabling gigantic html pages and other docs. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> ----------------------------------------------------------------------- Summary of changes: doc/makepkg.conf.5.txt | 7 ++++--- etc/makepkg.conf.in | 6 +++--- lib/libalpm/add.c | 2 +- lib/libalpm/alpm.h | 8 ++++---- lib/libalpm/conflict.c | 6 +++--- lib/libalpm/db.c | 4 ++-- lib/libalpm/deps.c | 12 ++++-------- lib/libalpm/remove.c | 6 +++--- lib/libalpm/sync.c | 2 +- src/pacman/callback.c | 2 +- src/pacman/query.c | 8 ++++---- src/pacman/sync.c | 12 ++++++------ src/pacman/util.c | 19 +++++++++++++++++++ src/pacman/util.h | 1 + src/util/testdb.c | 5 +++-- 15 files changed, 59 insertions(+), 41 deletions(-) hooks/post-receive -- The official pacman repository
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The official pacman repository".
The branch, master has been updated via d05882db9e417244fa580c4697b45333faffcc79 (commit) via 070135626023caa0186a77f9f846c078e3cf1be8 (commit) via 9dbe5c9d1ee5fb00f25515dfb5a2feb3ae6ebd59 (commit) via a06d0de104d2f03c19b917ea47394d8d6be89a9a (commit) from a4100b384737d6b422a31eb0f6614b4f5f6070cb (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit d05882db9e417244fa580c4697b45333faffcc79 Author: Xavier Chantry <shiningxc@gmail.com> Date: Sun Aug 17 19:36:28 2008 +0200
Rename alpm_db_get{pkg,grp}cache to alpm_db_get_{pkg,grp}cache
This is more consistent with the private functions : _alpm_db_get_{pkg,grp}cache
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
I am not a big fan of public function renaming, but if this was accepted, I bring up an other annoying function name convention (imho): alpm_dep_get_string() alpm_get_md5sum() The return values of these functions must be freed unlike other alpm_*_get_ functions. (The different behaviour can be suspected from "const char*" vs "char*" only). I may missed some other examples. IMHO in these cases the use of "compute" instead of "get" would be more suggestive, see alpm_pkg_compute_requiredby().
commit 070135626023caa0186a77f9f846c078e3cf1be8 Author: Xavier Chantry <shiningxc@gmail.com> Date: Sun Aug 17 19:30:36 2008 +0200
Change checkdeps and checkdbconflicts to be more flexible.
These two functions now take directly a package list rather than a database. checkdbconflicts was renamed to checkconflicts.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
This is cool.
On Mon, Aug 25, 2008 at 7:36 PM, Nagy Gabor <ngaba@bibl.u-szeged.hu> wrote:
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The official pacman repository".
The branch, master has been updated via d05882db9e417244fa580c4697b45333faffcc79 (commit) via 070135626023caa0186a77f9f846c078e3cf1be8 (commit) via 9dbe5c9d1ee5fb00f25515dfb5a2feb3ae6ebd59 (commit) via a06d0de104d2f03c19b917ea47394d8d6be89a9a (commit) from a4100b384737d6b422a31eb0f6614b4f5f6070cb (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit d05882db9e417244fa580c4697b45333faffcc79 Author: Xavier Chantry <shiningxc@gmail.com> Date: Sun Aug 17 19:36:28 2008 +0200
Rename alpm_db_get{pkg,grp}cache to alpm_db_get_{pkg,grp}cache
This is more consistent with the private functions : _alpm_db_get_{pkg,grp}cache
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
I am not a big fan of public function renaming, but if this was accepted, I bring up an other annoying function name convention (imho): alpm_dep_get_string() alpm_get_md5sum() The return values of these functions must be freed unlike other alpm_*_get_ functions. (The different behaviour can be suspected from "const char*" vs "char*" only). I may missed some other examples.
IMHO in these cases the use of "compute" instead of "get" would be more suggestive, see alpm_pkg_compute_requiredby().
I think you are right in this case- if you want to submit a patch I'd welcome it. -Dan
From aa4384123d2ca6068945f5f9574764dc5f334e67 Mon Sep 17 00:00:00 2001 From: Nagy Gabor <ngaba@bibl.u-szeged.hu> Date: Tue, 26 Aug 2008 12:57:08 +0200 Subject: [PATCH] Rename alpm_get_md5sum to alpm_compute_md5sum and alpm_dep_get_string to alpm_dep_compute_string This patch introduces the following function name convention: _compute_ in function name: the return value must be freed. _get_ in function name: the return value must not be freed. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> --- lib/libalpm/add.c | 6 +++--- lib/libalpm/alpm.h | 4 ++-- lib/libalpm/be_files.c | 2 +- lib/libalpm/delta.c | 4 ++-- lib/libalpm/deps.c | 8 ++++---- lib/libalpm/util.c | 4 ++-- src/pacman/package.c | 4 ++-- src/pacman/remove.c | 2 +- src/pacman/sync.c | 2 +- src/pacman/upgrade.c | 2 +- src/util/testdb.c | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 5040589..5098bfe 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -456,8 +456,8 @@ static int extract_single_file(struct archive *archive, return(1); } - hash_local = alpm_get_md5sum(filename); - hash_pkg = alpm_get_md5sum(checkfile); + hash_local = alpm_compute_md5sum(filename); + hash_pkg = alpm_compute_md5sum(checkfile); /* append the new md5 hash to it's respective entry * in newpkg's backup (it will be the new orginal) */ @@ -618,7 +618,7 @@ static int extract_single_file(struct archive *archive, } _alpm_log(PM_LOG_DEBUG, "appending backup entry for %s\n", filename); - hash = alpm_get_md5sum(filename); + hash = alpm_compute_md5sum(filename); MALLOC(backup, backup_len, RET_ERR(PM_ERR_MEMORY, -1)); sprintf(backup, "%s\t%s", oldbackup, hash); diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 168b28b..d5e543f 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -437,7 +437,7 @@ const char *alpm_conflict_get_package2(pmconflict_t *conflict); pmdepmod_t alpm_dep_get_mod(const pmdepend_t *dep); const char *alpm_dep_get_name(const pmdepend_t *dep); const char *alpm_dep_get_version(const pmdepend_t *dep); -char *alpm_dep_get_string(const pmdepend_t *dep); +char *alpm_dep_compute_string(const pmdepend_t *dep); /* * File conflicts @@ -458,7 +458,7 @@ const char *alpm_fileconflict_get_ctarget(pmfileconflict_t *conflict); */ /* checksums */ -char *alpm_get_md5sum(const char *name); +char *alpm_compute_md5sum(const char *name); /* * Errors diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index f5d4e82..f895bc4 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -805,7 +805,7 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) if(info->depends) { fputs("%DEPENDS%\n", fp); for(lp = info->depends; lp; lp = lp->next) { - char *depstring = alpm_dep_get_string(lp->data); + char *depstring = alpm_dep_compute_string(lp->data); fprintf(fp, "%s\n", depstring); free(depstring); } diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c index 22d9beb..78ba1c4 100644 --- a/lib/libalpm/delta.c +++ b/lib/libalpm/delta.c @@ -93,7 +93,7 @@ static alpm_list_t *delta_graph_init(alpm_list_t *deltas) /* determine whether the delta file already exists */ fpath = _alpm_filecache_find(vdelta->delta); - md5sum = alpm_get_md5sum(fpath); + md5sum = alpm_compute_md5sum(fpath); if(fpath && md5sum && strcmp(md5sum, vdelta->delta_md5) == 0) { vdelta->download_size = 0; } @@ -102,7 +102,7 @@ static alpm_list_t *delta_graph_init(alpm_list_t *deltas) /* determine whether a base 'from' file exists */ fpath = _alpm_filecache_find(vdelta->from); - md5sum = alpm_get_md5sum(fpath); + md5sum = alpm_compute_md5sum(fpath); if(fpath && md5sum && strcmp(md5sum, vdelta->from_md5) == 0) { v->weight = vdelta->download_size; } diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 96c971a..940f12c 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -269,7 +269,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps, if(!_alpm_find_dep_satisfier(upgrade, depend) && !_alpm_find_dep_satisfier(dblist, depend)) { /* Unsatisfied dependency in the upgrade list */ - char *missdepstring = alpm_dep_get_string(depend); + char *missdepstring = alpm_dep_compute_string(depend); _alpm_log(PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n", missdepstring, alpm_pkg_get_name(tp)); free(missdepstring); @@ -293,7 +293,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps, if(causingpkg && !_alpm_find_dep_satisfier(upgrade, depend) && !_alpm_find_dep_satisfier(dblist, depend)) { - char *missdepstring = alpm_dep_get_string(depend); + char *missdepstring = alpm_dep_compute_string(depend); _alpm_log(PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n", missdepstring, alpm_pkg_get_name(lp)); free(missdepstring); @@ -581,7 +581,7 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, alpm_list_t *list, pmpkg_t *spkg = _alpm_resolvedep(missdep, dbs_sync, list, tpkg); if(!spkg) { pm_errno = PM_ERR_UNSATISFIED_DEPS; - char *missdepstring = alpm_dep_get_string(missdep); + char *missdepstring = alpm_dep_compute_string(missdep); _alpm_log(PM_LOG_ERROR, _("cannot resolve \"%s\", a dependency of \"%s\"\n"), missdepstring, tpkg->name); free(missdepstring); @@ -685,7 +685,7 @@ const char SYMEXPORT *alpm_dep_get_version(const pmdepend_t *dep) * @param dep the depend to turn into a string * @return a string-formatted dependency with operator if necessary */ -char SYMEXPORT *alpm_dep_get_string(const pmdepend_t *dep) +char SYMEXPORT *alpm_dep_compute_string(const pmdepend_t *dep) { char *name, *opr, *ver, *str = NULL; size_t len; diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index b26c970..2255607 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -538,7 +538,7 @@ int _alpm_lstat(const char *path, struct stat *buf) * @return the checksum on success, NULL on error * @addtogroup alpm_misc */ -char SYMEXPORT *alpm_get_md5sum(const char *filename) +char SYMEXPORT *alpm_compute_md5sum(const char *filename) { unsigned char output[16]; char *md5sum; @@ -572,7 +572,7 @@ int _alpm_test_md5sum(const char *filepath, const char *md5sum) char *md5sum2; int ret; - md5sum2 = alpm_get_md5sum(filepath); + md5sum2 = alpm_compute_md5sum(filepath); if(md5sum == NULL || md5sum2 == NULL) { ret = -1; diff --git a/src/pacman/package.c b/src/pacman/package.c index fddce94..ed81484 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -79,7 +79,7 @@ void dump_pkg_full(pmpkg_t *pkg, int level) /* turn depends list into a text list */ for(i = alpm_pkg_get_depends(pkg); i; i = alpm_list_next(i)) { pmdepend_t *dep = (pmdepend_t*)alpm_list_getdata(i); - depstrings = alpm_list_add(depstrings, alpm_dep_get_string(dep)); + depstrings = alpm_list_add(depstrings, alpm_dep_compute_string(dep)); } if(level>0) { @@ -174,7 +174,7 @@ void dump_pkg_backups(pmpkg_t *pkg) snprintf(path, PATH_MAX-1, "%s%s", root, str); /* if we find the file, calculate checksums, otherwise it is missing */ if(access(path, R_OK) == 0) { - char *md5sum = alpm_get_md5sum(path); + char *md5sum = alpm_compute_md5sum(path); if(md5sum == NULL) { pm_fprintf(stderr, PM_LOG_ERROR, diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 841a08b..11bc157 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -107,7 +107,7 @@ int pacman_remove(alpm_list_t *targets) for(i = data; i; i = alpm_list_next(i)) { pmdepmissing_t *miss = alpm_list_getdata(i); pmdepend_t *dep = alpm_miss_get_dep(miss); - char *depstring = alpm_dep_get_string(dep); + char *depstring = alpm_dep_compute_string(dep); printf(_(":: %s: requires %s\n"), alpm_miss_get_target(miss), depstring); free(depstring); diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 63397aa..aacdb51 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -639,7 +639,7 @@ static int sync_trans(alpm_list_t *targets) for(i = data; i; i = alpm_list_next(i)) { pmdepmissing_t *miss = alpm_list_getdata(i); pmdepend_t *dep = alpm_miss_get_dep(miss); - char *depstring = alpm_dep_get_string(dep); + char *depstring = alpm_dep_compute_string(dep); printf(_(":: %s: requires %s\n"), alpm_miss_get_target(miss), depstring); free(depstring); diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index c54b3ed..2c99688 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -90,7 +90,7 @@ int pacman_upgrade(alpm_list_t *targets) for(i = data; i; i = alpm_list_next(i)) { pmdepmissing_t *miss = alpm_list_getdata(i); pmdepend_t *dep = alpm_miss_get_dep(miss); - char *depstring = alpm_dep_get_string(dep); + char *depstring = alpm_dep_compute_string(dep); /* TODO indicate if the error was a virtual package or not: * :: %s: requires %s, provided by %s diff --git a/src/util/testdb.c b/src/util/testdb.c index 69e3519..e4d6c42 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -140,7 +140,7 @@ int main(int argc, char **argv) for(i = data; i; i = alpm_list_next(i)) { pmdepmissing_t *miss = alpm_list_getdata(i); pmdepend_t *dep = alpm_miss_get_dep(miss); - char *depstring = alpm_dep_get_string(dep); + char *depstring = alpm_dep_compute_string(dep); printf("missing dependency for %s : %s\n", alpm_miss_get_target(miss), depstring); free(depstring); -- 1.6.0
On Tue, Aug 26, 2008 at 1:12 PM, Nagy Gabor <ngaba@bibl.u-szeged.hu> wrote:
From aa4384123d2ca6068945f5f9574764dc5f334e67 Mon Sep 17 00:00:00 2001 From: Nagy Gabor <ngaba@bibl.u-szeged.hu> Date: Tue, 26 Aug 2008 12:57:08 +0200 Subject: [PATCH] Rename alpm_get_md5sum to alpm_compute_md5sum and alpm_dep_get_string to alpm_dep_compute_string
This patch introduces the following function name convention: _compute_ in function name: the return value must be freed. _get_ in function name: the return value must not be freed.
Sounds good to me. The only question I have after reading this patch is whether there are many others alpm functions which need to have their return value freed.
On Tue, Aug 26, 2008 at 1:12 PM, Nagy Gabor <ngaba@bibl.u-szeged.hu> wrote:
From aa4384123d2ca6068945f5f9574764dc5f334e67 Mon Sep 17 00:00:00 2001 From: Nagy Gabor <ngaba@bibl.u-szeged.hu> Date: Tue, 26 Aug 2008 12:57:08 +0200 Subject: [PATCH] Rename alpm_get_md5sum to alpm_compute_md5sum and alpm_dep_get_string to alpm_dep_compute_string
This patch introduces the following function name convention: _compute_ in function name: the return value must be freed. _get_ in function name: the return value must not be freed.
Sounds good to me. The only question I have after reading this patch is whether there are many others alpm functions which need to have their return value freed.
Well, I gave a look in alpm.h (and alpm_list.h) on function headers containing "_get". Without further "investigation" (source reading), I think we had only 2 problematic (public) functions, which were renamed by the patch. Bye
participants (4)
-
Dan McGee
-
dan@archlinux.org
-
Nagy Gabor
-
Xavier