<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16443</id>
	<title>Nabble - pacman-dev</title>
	<updated>2009-12-11T08:38:29Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/pacman-dev-f16443.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pacman-dev-f16443.html" />
	<subtitle type="html">This list is used by pacman developers and contributors to coordinate, fix problems, share patches, etc.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26747467</id>
	<title>Re: makepkg in a constrained environment</title>
	<published>2009-12-11T08:38:29Z</published>
	<updated>2009-12-11T08:38:29Z</updated>
	<author>
		<name>Sebastian Nowicki-3</name>
	</author>
	<content type="html">&lt;br&gt;On 03/12/2009, at 8:41 AM, Dan McGee wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, Dec 2, 2009 at 2:47 PM, Ciprian Dorin, Craciun
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26747467&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ciprian.craciun@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;Looking closer at what the mentioned patch introduced:
&lt;br&gt;&amp;gt;&amp;gt; ~~~~
&lt;br&gt;&amp;gt;&amp;gt; - local sum=&amp;quot;$(${integ}sum &amp;quot;$file&amp;quot; | cut -d ' ' -f 1)&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; + local sum=&amp;quot;$(openssl dgst -${integ} &amp;quot;$file&amp;quot; | awk '{print $NF}')&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; ~~~~
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;I'm proposing not to get back to what it has been (which assumed
&lt;br&gt;&amp;gt;&amp;gt; that there was a md5sum sha128sum, &amp;lt;something-else&amp;gt;sum), but I'm
&lt;br&gt;&amp;gt;&amp;gt; proposing that for md5 we should use md5sum, which I'm sure it exists
&lt;br&gt;&amp;gt;&amp;gt; on any UNIX. Or better even, try to see if openssl exists, if not
&lt;br&gt;&amp;gt;&amp;gt; falling back to md5sum, at least for md5sums...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As a side note, it doesn't exist on all UNIX-y systems, for example on
&lt;br&gt;&amp;gt; Mac OS X- there is a /sbin/md5, but not an md5sum command.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Dan
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&amp;nbsp;From what I recall, the `md5` utility on Mac OS X uses openssl &amp;nbsp;
&lt;br&gt;(libcrypto) anyway. It does occur to me that hashing should be re- 
&lt;br&gt;factored into a separate function, as it does occur at least twice.
&lt;br&gt;&lt;br&gt;On 03/12/2009, at 5:30 AM, Ciprian Dorin, Craciun wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;For the moment, I think that my best option is to write my own &amp;nbsp;
&lt;br&gt;&amp;gt; makepkg.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Of course I'll write it in any other programming language than
&lt;br&gt;&amp;gt; Bash... :) For example I think I'll try rc (Plan9 shell), because it
&lt;br&gt;&amp;gt; seems the most sane shell I've ever seen...
&lt;br&gt;&lt;br&gt;That's a little drastic. Why not just make the changes you wanted to &amp;nbsp;
&lt;br&gt;makepkg? You could also send the patches to the ML. They might not get &amp;nbsp;
&lt;br&gt;accepted, but if you're willing to go as rewriting makepkg from &amp;nbsp;
&lt;br&gt;scratch, what do you care?
&lt;br&gt;&lt;br&gt;Bash isn't the greatest language to write a large (for bash) utility &amp;nbsp;
&lt;br&gt;like makepkg, but I doubt RC will be much better.
&lt;br&gt;&lt;br&gt;Why can't you just install bsdtar and openssl? Sure they're separate &amp;nbsp;
&lt;br&gt;packages, but ones that makepkg depends on.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/makepkg-in-a-constrained-environment-tp26607106p26747467.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26722422</id>
	<title>Re: [PATCH] makepkg: improve removal of	installed	dependencies</title>
	<published>2009-12-09T21:39:58Z</published>
	<updated>2009-12-09T21:39:58Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Cedric Staniewski wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 12/03/2009 03:33 PM, Allan McRae wrote:
&lt;br&gt;&amp;gt;&amp;gt; Compare a list of packages on the system before and after dependency resolution
&lt;br&gt;&amp;gt;&amp;gt; in order to get a complete list of packages to remove. &amp;nbsp;This allows makepkg to
&lt;br&gt;&amp;gt;&amp;gt; remove packages installed due to provides.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Bail in cases where packages that were on the system originally have been
&lt;br&gt;&amp;gt;&amp;gt; removed as there is a risk of breaking the system when removing the new
&lt;br&gt;&amp;gt;&amp;gt; packages
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Fixes FS#15144
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Signed-off-by: Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26722422&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have not tested the patch yet, so just some comments on the code for now.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Thanks for the comments. &amp;nbsp;I have pushed the updated patch on my working 
&lt;br&gt;branch: 
&lt;br&gt;&lt;a href=&quot;http://projects.archlinux.org/users/allan/pacman.git/commit/?h=working&amp;id=ffc7b0dc&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://projects.archlinux.org/users/allan/pacman.git/commit/?h=working&amp;id=ffc7b0dc&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;lt;snip&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt;
&lt;br&gt;&amp;nbsp;&amp;gt; You could use comm here. The advantage would be that it do not pull in
&lt;br&gt;&amp;nbsp;&amp;gt; a new dependency as it is in coreutils too and you do not need grep to
&lt;br&gt;&amp;nbsp;&amp;gt; get the unique lines.
&lt;br&gt;&amp;nbsp;&amp;gt;
&lt;br&gt;&amp;nbsp;&amp;gt; if [[ -n $(printf &amp;quot;%s\n&amp;quot; ${original_pkglist[@]} \
&lt;br&gt;&amp;nbsp;&amp;gt; 	| comm -23 - &amp;lt;(printf &amp;quot;%s\n&amp;quot; ${current_pkglist[@]})) ]]
&lt;br&gt;&amp;nbsp;&amp;gt;
&lt;br&gt;&lt;br&gt;I went for:
&lt;br&gt;&amp;nbsp; &amp;nbsp;if [[ -n $(comm -23 &amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${original_pkglist[@]}&amp;quot;) \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${current_pkglist[@]}&amp;quot;)) ]]; then
&lt;br&gt;&lt;br&gt;The only slight annoyance was when using comm the output of pacman -Qq 
&lt;br&gt;needed sorted as pacman outputs in a very slightly different 
&lt;br&gt;alphabetical order to what comm expects and &amp;quot;--nocheck-order&amp;quot; is not 
&lt;br&gt;portable to BSD/OSX.
&lt;br&gt;&lt;br&gt;Allan
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-improve-removal-of-installed-dependencies-tp26626877p26722422.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26720163</id>
	<title>Re: [PATCH 2/2] Add new --print operation for all operations</title>
	<published>2009-12-09T16:22:14Z</published>
	<updated>2009-12-09T16:22:14Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">On Mon, Nov 16, 2009 at 4:02 AM, Dan McGee &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26720163&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dpmcgee@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; +*\--print*::
&lt;br&gt;&amp;gt;&amp;gt; +       Only print the targets instead of performing the actual operation (sync,
&lt;br&gt;&amp;gt;&amp;gt; +       remove or upgrade).  Use '\--print-format' to specify how targets are
&lt;br&gt;&amp;gt;&amp;gt; +       displayed.
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; +*\--print-format* &amp;lt;'format'&amp;gt;::
&lt;br&gt;&amp;gt;&amp;gt; +       Specify a printf-like format to control the output of the '\--print'
&lt;br&gt;&amp;gt;&amp;gt; +       operation.  The possible are attributes are : %n for pkgname, %v for pkgver, %l
&lt;br&gt;&amp;gt;&amp;gt; +       for location, %r for repo and %s for size. The default format string is &amp;quot;%l&amp;quot;,
&lt;br&gt;&amp;gt;&amp;gt; +       which displays url with '-S', filename with '-U' and pkgname-pkgver with '-R'.
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; * Isn't --print actually -p/--print?
&lt;br&gt;&amp;gt; * Should the default format stuff actually be in the --print
&lt;br&gt;&amp;gt; documentation (either as well, or completely move it there?). I feel
&lt;br&gt;&amp;gt; like I would look there first.
&lt;br&gt;&amp;gt; * You didn't kill the print-uri documentation.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;done done done
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; +       /* set up the print operations */
&lt;br&gt;&amp;gt;&amp;gt; +       if(config-&amp;gt;print) {
&lt;br&gt;&amp;gt;&amp;gt; +               config-&amp;gt;noconfirm = 1;
&lt;br&gt;&amp;gt;&amp;gt; +               config-&amp;gt;flags |= PM_TRANS_FLAG_NOCONFLICTS;
&lt;br&gt;&amp;gt;&amp;gt; +               config-&amp;gt;flags |= PM_TRANS_FLAG_NOLOCK;
&lt;br&gt;&amp;gt;&amp;gt; +               /* Display only errors */
&lt;br&gt;&amp;gt;&amp;gt; +               config-&amp;gt;logmask &amp;= ~PM_LOG_WARNING;
&lt;br&gt;&amp;gt; Man, I hate having to do this. We really should think about a
&lt;br&gt;&amp;gt; stderr/stdout jihad.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;So like we would display all warnings/errors to stderr and the useful
&lt;br&gt;stuff to stdout ?
&lt;br&gt;&lt;br&gt;And it &amp;nbsp;indeed sounds like it would be a lot of work.. It seems like
&lt;br&gt;pacman was not written having in mind it could be used in
&lt;br&gt;scripts/wrapper.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; +       }
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt;  #if defined(HAVE_GETEUID) &amp;&amp; !defined(CYGWIN)
&lt;br&gt;&amp;gt;&amp;gt;        /* check if we have sufficient permission for the requested operation */
&lt;br&gt;&amp;gt;&amp;gt;        if(myuid &amp;gt; 0 &amp;&amp; needs_root()) {
&lt;br&gt;&amp;gt;&amp;gt; diff --git a/src/pacman/remove.c b/src/pacman/remove.c
&lt;br&gt;&amp;gt;&amp;gt; index b5119fa..06503d3 100644
&lt;br&gt;&amp;gt;&amp;gt; --- a/src/pacman/remove.c
&lt;br&gt;&amp;gt;&amp;gt; +++ b/src/pacman/remove.c
&lt;br&gt;&amp;gt;&amp;gt; @@ -159,6 +159,12 @@ int pacman_remove(alpm_list_t *targets)
&lt;br&gt;&amp;gt;&amp;gt;        }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;        /* Step 3: actually perform the removal */
&lt;br&gt;&amp;gt;&amp;gt; +       if(config-&amp;gt;print) { /* --print */
&lt;br&gt;&amp;gt;&amp;gt; +               print_packages(alpm_trans_get_pkgs());
&lt;br&gt;&amp;gt;&amp;gt; +               /* we are done */
&lt;br&gt;&amp;gt; None of the comments here seem particularly necessary. (/*--print*/,
&lt;br&gt;&amp;gt; /*we are done*/). Can you kill them?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;done
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; -       /* Display only errors with -Sp and -Sw operations */
&lt;br&gt;&amp;gt;&amp;gt; -       if((config-&amp;gt;flags &amp; PM_TRANS_FLAG_DOWNLOADONLY) || config-&amp;gt;op_s_printuris) {
&lt;br&gt;&amp;gt;&amp;gt; +       /* Display only errors with -Sw operations */
&lt;br&gt;&amp;gt;&amp;gt; +       if(config-&amp;gt;flags &amp; PM_TRANS_FLAG_DOWNLOADONLY) {
&lt;br&gt;&amp;gt; Why do we do this for -Sw?
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;That question was not directly related to my patch but yeah, I have no
&lt;br&gt;idea why we do this for -Sw so I killed it.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;        /* Step 3: perform the installation */
&lt;br&gt;&amp;gt;&amp;gt; +       if(config-&amp;gt;print) { /* --print */
&lt;br&gt;&amp;gt;&amp;gt; +               print_packages(alpm_trans_get_pkgs());
&lt;br&gt;&amp;gt;&amp;gt; +               /* we are done */
&lt;br&gt;&amp;gt;&amp;gt; +               trans_release();
&lt;br&gt;&amp;gt;&amp;gt; +               return(0);
&lt;br&gt;&amp;gt; Kill comments
&lt;br&gt;&lt;br&gt;done
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; +               /* %r : repo */
&lt;br&gt;&amp;gt;&amp;gt; +               if(strstr(temp,&amp;quot;%r&amp;quot;)) {
&lt;br&gt;&amp;gt;&amp;gt; +                       const char *repo = &amp;quot;local&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; +                       pmdb_t *db = alpm_pkg_get_db(pkg);
&lt;br&gt;&amp;gt;&amp;gt; +                       if(db) {
&lt;br&gt;&amp;gt;&amp;gt; +                               repo = alpm_db_get_name(db);
&lt;br&gt;&amp;gt;&amp;gt; +                       }
&lt;br&gt;&amp;gt;&amp;gt; +                       string = strreplace(temp, &amp;quot;%r&amp;quot;, repo);
&lt;br&gt;&amp;gt;&amp;gt; +                       free(temp);
&lt;br&gt;&amp;gt;&amp;gt; +                       temp = string;
&lt;br&gt;&amp;gt;&amp;gt; +               }
&lt;br&gt;&amp;gt;&amp;gt; +               /* %s : size */
&lt;br&gt;&amp;gt;&amp;gt; +               if(strstr(temp,&amp;quot;%s&amp;quot;)) {
&lt;br&gt;&amp;gt;&amp;gt; +                       char *size;
&lt;br&gt;&amp;gt;&amp;gt; +                       double mbsize = 0.0;
&lt;br&gt;&amp;gt;&amp;gt; +                       mbsize = pkg_get_size(pkg) / (1024.0 * 1024.0);
&lt;br&gt;&amp;gt;&amp;gt; +                       asprintf(&amp;size, &amp;quot;%.2f&amp;quot;, mbsize);
&lt;br&gt;&amp;gt;&amp;gt; +                       string = strreplace(temp, &amp;quot;%s&amp;quot;, size);
&lt;br&gt;&amp;gt;&amp;gt; +                       free(size);
&lt;br&gt;&amp;gt;&amp;gt; +                       free(temp);
&lt;br&gt;&amp;gt;&amp;gt; +                       temp = string;
&lt;br&gt;&amp;gt;&amp;gt; +               }
&lt;br&gt;&amp;gt; This strreplace() stuff seems a bit naive, considering we could do a
&lt;br&gt;&amp;gt; lot of replaces on the string. I'm not sure we need to worry about it
&lt;br&gt;&amp;gt; but could be a place for some improvement.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Do you mean that we are walking through the same string many times ?
&lt;br&gt;&lt;br&gt;I thought at some point we could have a multireplace function which
&lt;br&gt;could take a list of struct replace { char *old ; char *new; } but ...
&lt;br&gt;firstly it looked a bit overkill
&lt;br&gt;and secondly, I was worried that all the pkg/db accessors could be
&lt;br&gt;more costly than these strings operations.
&lt;br&gt;Though that could also be solved by doing a first pass on the string
&lt;br&gt;to see what format options we have, and then build the replace list
&lt;br&gt;with only the stuff we need.
&lt;br&gt;&lt;br&gt;I agree the current code is quite naive but it does not affect
&lt;br&gt;performance so much that it makes the operation unusable.
&lt;br&gt;pacman -S kde gnome --print --printformat '%n %v %l %r %s' takes 0.7 second.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; OK, and now for some usability testing.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $ ./src/pacman/pacman -Q
&lt;br&gt;&amp;gt; &amp;lt;big list of packages&amp;gt;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; zope-interface 3.5.1-1
&lt;br&gt;&amp;gt; zvbi 0.2.33-1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $ ./src/pacman/pacman -Q --print
&lt;br&gt;&amp;gt; error: no targets specified (use -h for help)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So two things here- I expected --print to work and it did not, and we
&lt;br&gt;&amp;gt; already have the standard &amp;quot;pkgname &amp;lt;space&amp;gt; pkgver&amp;quot; output that our
&lt;br&gt;&amp;gt; default print format uses. Do we want to invent a new one with the
&lt;br&gt;&amp;gt; default --print for remove?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Oh wait, does --print even work for -Q? Now I'm all confused. :)
&lt;br&gt;&amp;gt; $ ./src/pacman/pacman -Q --print pacman-git
&lt;br&gt;&amp;gt; error: package &amp;quot;pacman-git&amp;quot; not found
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $ ./src/pacman/pacman -Q pacman-git
&lt;br&gt;&amp;gt; pacman-git 20091018-1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; More unexpected behavior...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $ ./src/pacman/pacman -Ss --print pacman
&lt;br&gt;&amp;gt; core/pacman 3.3.3-1 (base)
&lt;br&gt;&amp;gt;    A library-based package manager with dependency support
&lt;br&gt;&amp;gt; core/pacman-mirrorlist 20090616-1 (base) [installed]
&lt;br&gt;&amp;gt;    Arch Linux mirror list for use by pacman
&lt;br&gt;&amp;gt; extra/namcap 2.4-1 [installed]
&lt;br&gt;&amp;gt;    A Pacman package analyzer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I wanted a list of URLs for all packages that matched my pacman
&lt;br&gt;&amp;gt; search, I did not get that...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Dan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;About that last part, I already replied one month ago :)
&lt;br&gt;Since the changes I just did were quite trivial, I will just push an
&lt;br&gt;updated version to my print branch.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--print-installed-packages-tp25337480p26720163.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26718919</id>
	<title>[PATCH] improve download_internal error messages</title>
	<published>2009-12-09T14:30:11Z</published>
	<updated>2009-12-09T14:30:11Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">download_internal is supposed to always set pm_errno but did not in many
&lt;br&gt;cases.
&lt;br&gt;&lt;br&gt;The most important (and tested) change is the one concerning fetchStat. This
&lt;br&gt;is typically where the code will fail when the network is down for example.
&lt;br&gt;&lt;br&gt;Before commit d2dbb04a9af7a18da, this fetchStat call did not exist and the
&lt;br&gt;same kind of errors would be encountered in the fetchXGet call that follows.
&lt;br&gt;I just copied the error printing to restore the old behavior.
&lt;br&gt;&lt;br&gt;Signed-off-by: Xavier Chantry &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26718919&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shiningxc@...&lt;/a&gt;&amp;gt;
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;lib/libalpm/dload.c | &amp;nbsp; 10 ++++++++--
&lt;br&gt;&amp;nbsp;1 files changed, 8 insertions(+), 2 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
&lt;br&gt;index bc5cdfd..499f7f5 100644
&lt;br&gt;--- a/lib/libalpm/dload.c
&lt;br&gt;+++ b/lib/libalpm/dload.c
&lt;br&gt;@@ -118,13 +118,14 @@ static int download_internal(const char *url, const char *localpath,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	filename = get_filename(url);
&lt;br&gt;&amp;nbsp;	if(!filename) {
&lt;br&gt;-		return(-1);
&lt;br&gt;+		_alpm_log(PM_LOG_ERROR, _(&amp;quot;url '%s' is invalid\n&amp;quot;), url);
&lt;br&gt;+		RET_ERR(PM_ERR_SERVER_BAD_URL, -1);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	fileurl = fetchParseURL(url);
&lt;br&gt;&amp;nbsp;	if(!fileurl) {
&lt;br&gt;&amp;nbsp;		_alpm_log(PM_LOG_ERROR, _(&amp;quot;url '%s' is invalid\n&amp;quot;), url);
&lt;br&gt;-		RET_ERR(PM_ERR_SERVER_BAD_URL, -1);
&lt;br&gt;+		RET_ERR(PM_ERR_LIBFETCH, -1);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	destfile = get_destfile(localpath, filename);
&lt;br&gt;@@ -179,6 +180,9 @@ static int download_internal(const char *url, const char *localpath,
&lt;br&gt;&amp;nbsp;	 * non-stat request, so avoid it. */
&lt;br&gt;&amp;nbsp;	fetchLastErrCode = 0;
&lt;br&gt;&amp;nbsp;	if(fetchStat(fileurl, &amp;ust, &amp;quot;&amp;quot;) == -1) {
&lt;br&gt;+		pm_errno = PM_ERR_LIBFETCH;
&lt;br&gt;+		_alpm_log(PM_LOG_ERROR, _(&amp;quot;failed retrieving file '%s' from %s : %s\n&amp;quot;),
&lt;br&gt;+				filename, gethost(fileurl), fetchLastErrString);
&lt;br&gt;&amp;nbsp;		ret = -1;
&lt;br&gt;&amp;nbsp;		goto cleanup;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;@@ -230,6 +234,7 @@ static int download_internal(const char *url, const char *localpath,
&lt;br&gt;&amp;nbsp;		dl_thisfile = 0;
&lt;br&gt;&amp;nbsp;		localf = fopen(tempfile, &amp;quot;wb&amp;quot;);
&lt;br&gt;&amp;nbsp;		if(localf == NULL) { /* still null? */
&lt;br&gt;+			pm_errno = PM_ERR_RETRIEVE;
&lt;br&gt;&amp;nbsp;			_alpm_log(PM_LOG_ERROR, _(&amp;quot;error writing to file '%s': %s\n&amp;quot;),
&lt;br&gt;&amp;nbsp;					tempfile, strerror(errno));
&lt;br&gt;&amp;nbsp;			ret = -1;
&lt;br&gt;@@ -247,6 +252,7 @@ static int download_internal(const char *url, const char *localpath,
&lt;br&gt;&amp;nbsp;		size_t nwritten = 0;
&lt;br&gt;&amp;nbsp;		nwritten = fwrite(buffer, 1, nread, localf);
&lt;br&gt;&amp;nbsp;		if((nwritten != nread) || ferror(localf)) {
&lt;br&gt;+			pm_errno = PM_ERR_RETRIEVE;
&lt;br&gt;&amp;nbsp;			_alpm_log(PM_LOG_ERROR, _(&amp;quot;error writing to file '%s': %s\n&amp;quot;),
&lt;br&gt;&amp;nbsp;					tempfile, strerror(errno));
&lt;br&gt;&amp;nbsp;			ret = -1;
&lt;br&gt;-- 
&lt;br&gt;1.6.5.5
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pacman--Sy-with-no-network-%3D-weird-result-tp26531369p26718919.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26718793</id>
	<title>Re: pacman -Sy with no network = weird result</title>
	<published>2009-12-09T14:19:14Z</published>
	<updated>2009-12-09T14:19:14Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">On Mon, Nov 30, 2009 at 7:03 AM, Dan McGee &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26718793&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dpmcgee@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 9:52 AM, Xavier &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26718793&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shiningxc@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Here is a quick and lazy bug report so that I do not forget :)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; LANG=C sudo pacman -Sy
&lt;br&gt;&amp;gt;&amp;gt; :: Synchronizing package databases...
&lt;br&gt;&amp;gt;&amp;gt; error: failed to update testing (library not initialized)
&lt;br&gt;&amp;gt;&amp;gt; error: failed to update core (library not initialized)
&lt;br&gt;&amp;gt;&amp;gt; error: failed to update extra (library not initialized)
&lt;br&gt;&amp;gt;&amp;gt; error: failed to update community-testing (library not initialized)
&lt;br&gt;&amp;gt;&amp;gt; error: failed to update community (library not initialized)
&lt;br&gt;&amp;gt;&amp;gt; error: failed to synchronize any databases
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The error and the output is quite confusing.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Should this get turned into a real bug report? :P
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;No, it should get turned into a patch :)
&lt;br&gt;&lt;br&gt;I just realized an additional reason I got very confused by the above
&lt;br&gt;output (I thought my system was completely broken :D). I think I was
&lt;br&gt;used to the old ouput :
&lt;br&gt;:: Synchronizing package databases...
&lt;br&gt;error: failed retrieving file 'testing.db.tar.gz' from
&lt;br&gt;mir.archlinux.fr : Transient resolver failure
&lt;br&gt;error: failed retrieving file 'testing.db.tar.gz' from
&lt;br&gt;mir1.archlinuxfr.org : Transient resolver failure
&lt;br&gt;error: failed to update testing (Transient resolver failure)
&lt;br&gt;error: failed retrieving file 'core.db.tar.gz' from mir.archlinux.fr :
&lt;br&gt;Transient resolver failure
&lt;br&gt;error: failed retrieving file 'core.db.tar.gz' from
&lt;br&gt;mir1.archlinuxfr.org : Transient resolver failure
&lt;br&gt;error: failed to update core (Transient resolver failure)
&lt;br&gt;error: failed retrieving file 'extra.db.tar.gz' from mir.archlinux.fr
&lt;br&gt;: Transient resolver failure
&lt;br&gt;error: failed retrieving file 'extra.db.tar.gz' from
&lt;br&gt;mir1.archlinuxfr.org : Transient resolver failure
&lt;br&gt;error: failed to update extra (Transient resolver failure)
&lt;br&gt;error: failed retrieving file 'community.db.tar.gz' from
&lt;br&gt;mir.archlinux.fr : Transient resolver failure
&lt;br&gt;error: failed retrieving file 'community.db.tar.gz' from
&lt;br&gt;mir1.archlinuxfr.org : Transient resolver failure
&lt;br&gt;error: failed to update community (Transient resolver failure)
&lt;br&gt;error: failed to synchronize any databases
&lt;br&gt;&lt;br&gt;So not only we did not set pm_errno (to ERR_LIBFETCH which prints
&lt;br&gt;fetchLastErrString = Transient resolver failure), but also we no
&lt;br&gt;longer printed the message for each url/mirror.
&lt;br&gt;&lt;br&gt;This was caused by commit d2dbb04a9af7a18da which does fetchStat first
&lt;br&gt;, but did not print any error in that case.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; fetchLastErrCode = 0;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; if(fetchStat(fileurl, &amp;ust, &amp;quot;&amp;quot;) == -1) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret = -1;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto cleanup;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;A patch will follow to restore the old more verbose behavior :)
&lt;br&gt;&lt;br&gt;Sidenote : I saw many times people confused, even with the above
&lt;br&gt;verbose output, usually after installing arch and before setting up
&lt;br&gt;the network. Not sure how they cannot realize their network is down.
&lt;br&gt;Maybe 'transient resolver failure' is confusing ? That's a libfetch
&lt;br&gt;message though, so we cannot change it. And it seems appropriate.
&lt;br&gt;And 'failed retrieving file' sounds explicit enough.
&lt;br&gt;&lt;br&gt;Comments and thoughts welcome.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pacman--Sy-with-no-network-%3D-weird-result-tp26531369p26718793.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26715515</id>
	<title>Re: [PATCH] docs: set text width to 72 in vim directive</title>
	<published>2009-12-09T10:50:15Z</published>
	<updated>2009-12-09T10:50:15Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">On Thu, Dec 3, 2009 at 8:59 AM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26715515&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 12/03/2009 01:47 AM, Dan McGee wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Wed, Dec 2, 2009 at 12:05 PM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26715515&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; A &amp;quot;why&amp;quot; in the commit message would be awfully nice, I'm confused here. :)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26715515&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sorry, I thought it were quite clear. The text in the man pages is
&lt;br&gt;&amp;gt; already wrapped after a certain amount of characters and I thought is
&lt;br&gt;&amp;gt; would be nice to add this to the vim directive or am I missing something
&lt;br&gt;&amp;gt; here?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;These man pages wrapping have always pissed me off , because all lines
&lt;br&gt;are indented by a tab and vim does not handle that.
&lt;br&gt;When I do 'gq' on one text block, it only keeps the tab on the first
&lt;br&gt;line... So I always had to manually re-insert the tab for all the next
&lt;br&gt;lines. And the result is that the first line is always shorter than
&lt;br&gt;all the following ones (by one tab).
&lt;br&gt;&lt;br&gt;What am I missing ?
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--docs%3A-set-text-width-to-72-in-vim-directive-tp26613535p26715515.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26715357</id>
	<title>Re: [PATCH] makepkg: remove srclinks directory on error exit</title>
	<published>2009-12-09T10:41:57Z</published>
	<updated>2009-12-09T10:41:57Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">On Thu, Dec 3, 2009 at 10:43 AM, Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26715357&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; OK, your comment about the external commands being used having good error
&lt;br&gt;&amp;gt; messages has me convinced something needs done.  It just seems a strange
&lt;br&gt;&amp;gt; place for this particular clean up.  Saying that, I'm not sure what would be
&lt;br&gt;&amp;gt; a better place unless we had an error trap just for that function which
&lt;br&gt;&amp;gt; passed on to trap_exit.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Dan, Xavier, others: any comments?
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;It might look a bit strange, but I am fine with that patch anyway.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-remove-srclinks-directory-on-error-exit-tp26613542p26715357.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26678335</id>
	<title>Re: [PATCH] makepkg: improve removal of installed	dependencies</title>
	<published>2009-12-07T06:54:20Z</published>
	<updated>2009-12-07T06:54:20Z</updated>
	<author>
		<name>Cedric Staniewski</name>
	</author>
	<content type="html">On 12/03/2009 03:33 PM, Allan McRae wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Compare a list of packages on the system before and after dependency resolution
&lt;br&gt;&amp;gt; in order to get a complete list of packages to remove. &amp;nbsp;This allows makepkg to
&lt;br&gt;&amp;gt; remove packages installed due to provides.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Bail in cases where packages that were on the system originally have been
&lt;br&gt;&amp;gt; removed as there is a risk of breaking the system when removing the new
&lt;br&gt;&amp;gt; packages
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Fixes FS#15144
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Signed-off-by: Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26678335&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---
&lt;/div&gt;&lt;br&gt;I have not tested the patch yet, so just some comments on the code for now.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This moves the generation of the installed package list to directly after
&lt;br&gt;&amp;gt; the installation of deps to prevent issues if the user installs packages
&lt;br&gt;&amp;gt; while the build is occurring:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://bugs.archlinux.org/task/15144#comment53938&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bugs.archlinux.org/task/15144#comment53938&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Rebased on Cedric's run_pacman and $PACMAN patches.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;doc/makepkg.8.txt &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;6 +++---
&lt;br&gt;&amp;gt; &amp;nbsp;scripts/makepkg.sh.in | &amp;nbsp; 39 +++++++++++++++++++++------------------
&lt;br&gt;&amp;gt; &amp;nbsp;2 files changed, 24 insertions(+), 21 deletions(-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; index ad27bca..168b369 100644
&lt;br&gt;&amp;gt; --- a/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; +++ b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; @@ -166,9 +166,9 @@ Environment Variables
&lt;br&gt;&amp;gt; &amp;nbsp;---------------------
&lt;br&gt;&amp;gt; &amp;nbsp;*PACMAN*::
&lt;br&gt;&amp;gt; &amp;nbsp;	The command that will be used to check for missing dependencies and to
&lt;br&gt;&amp;gt; -	install and remove packages. Pacman's -U, -T, -S and -Rns operations
&lt;br&gt;&amp;gt; -	must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;gt; -	empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;gt; +	install and remove packages. Pacman's -Qq, -Rns, -S, -T, and -U
&lt;br&gt;&amp;gt; +	operations must be supported by this command. If the variable is not
&lt;br&gt;&amp;gt; +	set or empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;Additional Features
&lt;br&gt;&amp;gt; diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt; index c730150..5743ea4 100644
&lt;br&gt;&amp;gt; --- a/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt; +++ b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt; @@ -27,8 +27,10 @@
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;# makepkg uses quite a few external programs during its execution. You
&lt;br&gt;&amp;gt; &amp;nbsp;# need to have at least the following installed for makepkg to function:
&lt;br&gt;&amp;gt; -# &amp;nbsp; bsdtar (libarchive), bzip2, coreutils, fakeroot, find (findutils),
&lt;br&gt;&amp;gt; -# &amp;nbsp; getopt (util-linux), gettext, grep, gzip, openssl, sed, tput (ncurses)
&lt;br&gt;&amp;gt; +# &amp;nbsp; bsdtar (libarchive), bzip2, coreutils, diff (diffutils), fakeroot,
&lt;br&gt;&amp;gt; +# &amp;nbsp; find (findutils), getopt (util-linux), gettext, grep, gzip, openssl,
&lt;br&gt;&amp;gt; +# &amp;nbsp; sed, tput (ncurses)
&lt;br&gt;&amp;gt; +
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;# gettext initialization
&lt;br&gt;&amp;gt; &amp;nbsp;export TEXTDOMAIN='pacman'
&lt;br&gt;&amp;gt; @@ -343,7 +345,7 @@ download_file() {
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;run_pacman() {
&lt;br&gt;&amp;gt; &amp;nbsp;	local ret=0
&lt;br&gt;&amp;gt; -	if (( ! ASROOT )) &amp;&amp; [[ $1 != &amp;quot;-T&amp;quot; ]] &amp;&amp; sudo -l $PACMAN &amp;&amp;gt;/dev/null; then
&lt;br&gt;&amp;gt; +	if (( ! ASROOT )) &amp;&amp; [[ $1 != &amp;quot;-T&amp;quot; &amp;&amp; $1 != &amp;quot;-Qq&amp;quot; ]] &amp;&amp; sudo -l $PACMAN &amp;&amp;gt;/dev/null; then
&lt;br&gt;&amp;gt; &amp;nbsp;		sudo $PACMAN $PACMAN_OPTS &amp;quot;$@&amp;quot; || ret=$?
&lt;br&gt;&amp;gt; &amp;nbsp;	else
&lt;br&gt;&amp;gt; &amp;nbsp;		$PACMAN $PACMAN_OPTS &amp;quot;$@&amp;quot; || ret=$?
&lt;br&gt;&amp;gt; @@ -398,7 +400,6 @@ handle_deps() {
&lt;br&gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;resolve_deps() {
&lt;br&gt;&amp;gt; -	# $pkgdeps is a GLOBAL variable, used by remove_deps()
&lt;br&gt;&amp;gt; &amp;nbsp;	local R_DEPS_SATISFIED=0
&lt;br&gt;&amp;gt; &amp;nbsp;	local R_DEPS_MISSING=1
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; @@ -408,7 +409,6 @@ resolve_deps() {
&lt;br&gt;&amp;gt; &amp;nbsp;	fi
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;	if handle_deps $deplist; then
&lt;br&gt;&amp;gt; -		pkgdeps=&amp;quot;$pkgdeps $deplist&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;		# check deps again to make sure they were resolved
&lt;br&gt;&amp;gt; &amp;nbsp;		deplist=&amp;quot;$(check_deps $*)&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;		[[ -z $deplist ]] &amp;&amp; return $R_DEPS_SATISFIED
&lt;br&gt;&amp;gt; @@ -425,23 +425,25 @@ resolve_deps() {
&lt;br&gt;&amp;gt; &amp;nbsp;	return $R_DEPS_MISSING
&lt;br&gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; -# fix flyspray bug #5923
&lt;br&gt;&amp;gt; &amp;nbsp;remove_deps() {
&lt;br&gt;&amp;gt; -	# $pkgdeps is a GLOBAL variable, set by resolve_deps()
&lt;br&gt;&amp;gt; &amp;nbsp;	(( ! RMDEPS )) &amp;&amp; return
&lt;br&gt;&amp;gt; -	[[ -z $pkgdeps ]] &amp;&amp; return
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; -	local dep depstrip deplist
&lt;br&gt;&amp;gt; -	deplist=&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; -	for dep in $pkgdeps; do
&lt;br&gt;&amp;gt; -		depstrip=&amp;quot;${dep%%[&amp;lt;=&amp;gt;]*}&amp;quot;
&lt;br&gt;&amp;gt; -		deplist=&amp;quot;$deplist $depstrip&amp;quot;
&lt;br&gt;&amp;gt; -	done
&lt;br&gt;&amp;gt; +	# check for packages removed during dependency install (e.g. due to conflicts)
&lt;br&gt;&amp;gt; +	# removing all installed packages is risky in this case
&lt;br&gt;&amp;gt; +	if (( $(diff &amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${original_pkglist[@]}&amp;quot;) \
&lt;br&gt;&amp;gt; +		&amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${current_pkglist[@]}&amp;quot;) | grep &amp;quot;&amp;lt;&amp;quot; | wc -l) &amp;gt; 0 )); then
&lt;br&gt;&amp;gt; +	 &amp;nbsp;warning &amp;quot;$(gettext &amp;quot;Failed to remove installed dependencies.&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; +	 &amp;nbsp;return 0
&lt;br&gt;&amp;gt; +	fi
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;You could use comm here. The advantage would be that it do not pull in
&lt;br&gt;a new dependency as it is in coreutils too and you do not need grep to
&lt;br&gt;get the unique lines.
&lt;br&gt;&lt;br&gt;if [[ -n $(printf &amp;quot;%s\n&amp;quot; ${original_pkglist[@]} \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | comm -23 - &amp;lt;(printf &amp;quot;%s\n&amp;quot; ${current_pkglist[@]})) ]]
&lt;br&gt;&lt;br&gt;Note the code above is untested.
&lt;br&gt;&lt;br&gt;&amp;gt; -	msg &amp;quot;Removing installed dependencies...&amp;quot;
&lt;br&gt;&amp;gt; +	local deplist=($(diff &amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${original_pkglist[@]}&amp;quot;) \
&lt;br&gt;&amp;gt; +		&amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${current_pkglist[@]}&amp;quot;) | grep &amp;quot;&amp;gt;&amp;quot;))
&lt;br&gt;&amp;gt; +	deplist=(${deplist[@]#&amp;gt;})
&lt;br&gt;&lt;br&gt;local deplist=($(printf &amp;quot;%s\n&amp;quot; ${original_pkglist[@]} \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | comm -13 - &amp;lt;(printf &amp;quot;%s\n&amp;quot; ${current_pkglist[@]})))
&lt;br&gt;&lt;br&gt;&amp;gt; +	[ ${#deplist[@]} -eq 0 ] &amp;&amp; return
&lt;br&gt;&lt;br&gt;(( ${#deplist[@]} == 0 )) :)
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; +	msg &amp;quot;Removing installed dependencies...&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;	# exit cleanly on failure to remove deps as package has been built successfully
&lt;br&gt;&amp;gt; -	if ! run_pacman -Rns $deplist; then
&lt;br&gt;&amp;gt; +	if ! run_pacman -Rn ${deplist[@]}; then
&lt;br&gt;&amp;gt; &amp;nbsp;		warning &amp;quot;$(gettext &amp;quot;Failed to remove installed dependencies.&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;		return 0
&lt;br&gt;&amp;gt; &amp;nbsp;	fi
&lt;br&gt;&amp;gt; @@ -1874,14 +1876,13 @@ if (( SOURCEONLY )); then
&lt;br&gt;&amp;gt; &amp;nbsp;	exit 0
&lt;br&gt;&amp;gt; &amp;nbsp;fi
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; -# fix flyspray bug #5973
&lt;br&gt;&amp;gt; &amp;nbsp;if (( NODEPS || NOBUILD || REPKG )); then
&lt;br&gt;&amp;gt; &amp;nbsp;	# no warning message needed for nobuild, repkg
&lt;br&gt;&amp;gt; &amp;nbsp;	if (( NODEPS )); then
&lt;br&gt;&amp;gt; &amp;nbsp;		warning &amp;quot;$(gettext &amp;quot;Skipping dependency checks.&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;	fi
&lt;br&gt;&amp;gt; &amp;nbsp;elif [ $(type -p &amp;quot;${PACMAN%% *}&amp;quot;) ]; then
&lt;br&gt;&amp;gt; -	unset pkgdeps # Set by resolve_deps() and used by remove_deps()
&lt;br&gt;&amp;gt; +	original_pkglist=($(run_pacman -Qq)) &amp;nbsp; &amp;nbsp;# required by remove_deps
&lt;/div&gt;&lt;br&gt;Could be skipped if RMDEPS == 0 but I do not know how fast / slow this
&lt;br&gt;pacman operation actually is.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;	deperr=0
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;	msg &amp;quot;$(gettext &amp;quot;Checking Runtime Dependencies...&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; @@ -1890,6 +1891,8 @@ elif [ $(type -p &amp;quot;${PACMAN%% *}&amp;quot;) ]; then
&lt;br&gt;&amp;gt; &amp;nbsp;	msg &amp;quot;$(gettext &amp;quot;Checking Buildtime Dependencies...&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;	resolve_deps ${makedepends[@]} || deperr=1
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; +	current_pkglist=($(run_pacman -Qq)) &amp;nbsp; &amp;nbsp;# required by remove_deps
&lt;br&gt;&amp;gt; +
&lt;br&gt;&lt;br&gt;Same as above.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;	if (( deperr )); then
&lt;br&gt;&amp;gt; &amp;nbsp;		error &amp;quot;$(gettext &amp;quot;Could not resolve all dependencies.&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;		exit 1
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-improve-removal-of-installed-dependencies-tp26626877p26678335.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26660209</id>
	<title>[PATCH 3/3] add some more sanity check for optarg</title>
	<published>2009-12-05T14:49:07Z</published>
	<updated>2009-12-05T14:49:07Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">getopt should already ensure that optarg is not NULL when an argument is
&lt;br&gt;required, but just be extra safe and double check it before using optarg.
&lt;br&gt;&lt;br&gt;To be honest, I only did that to make clang shut up and eliminate the last
&lt;br&gt;warnings it reported.
&lt;br&gt;&lt;br&gt;Signed-off-by: Xavier Chantry &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26660209&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shiningxc@...&lt;/a&gt;&amp;gt;
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;src/pacman/pacman.c | &amp;nbsp; 16 +++++++++++++++-
&lt;br&gt;&amp;nbsp;1 files changed, 15 insertions(+), 1 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
&lt;br&gt;index 38fc560..522da1b 100644
&lt;br&gt;--- a/src/pacman/pacman.c
&lt;br&gt;+++ b/src/pacman/pacman.c
&lt;br&gt;@@ -334,6 +334,8 @@ static void setlibpaths(void)
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#define check_optarg() if(!optarg) { return(1); }
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/** Parse command-line arguments for each operation.
&lt;br&gt;&amp;nbsp; * @param argc argc
&lt;br&gt;&amp;nbsp; * @param argv argv
&lt;br&gt;@@ -408,12 +410,14 @@ static int parseargs(int argc, char *argv[])
&lt;br&gt;&amp;nbsp;			case 0: break;
&lt;br&gt;&amp;nbsp;			case OP_NOCONFIRM: config-&amp;gt;noconfirm = 1; break;
&lt;br&gt;&amp;nbsp;			case OP_CONFIG:
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				if(config-&amp;gt;configfile) {
&lt;br&gt;&amp;nbsp;					free(config-&amp;gt;configfile);
&lt;br&gt;&amp;nbsp;				}
&lt;br&gt;&amp;nbsp;				config-&amp;gt;configfile = strndup(optarg, PATH_MAX);
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case OP_IGNORE:
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				list = strsplit(optarg, ',');
&lt;br&gt;&amp;nbsp;				for(item = list; item; item = alpm_list_next(item)) {
&lt;br&gt;&amp;nbsp;					alpm_option_add_ignorepkg((char *)alpm_list_getdata(item));
&lt;br&gt;@@ -445,8 +449,13 @@ static int parseargs(int argc, char *argv[])
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case OP_NOPROGRESSBAR: config-&amp;gt;noprogressbar = 1; break;
&lt;br&gt;&amp;nbsp;			case OP_NOSCRIPTLET: config-&amp;gt;flags |= PM_TRANS_FLAG_NOSCRIPTLET; break;
&lt;br&gt;-			case OP_ASK: config-&amp;gt;noask = 1; config-&amp;gt;ask = atoi(optarg); break;
&lt;br&gt;+			case OP_ASK:
&lt;br&gt;+				check_optarg();
&lt;br&gt;+				config-&amp;gt;noask = 1;
&lt;br&gt;+				config-&amp;gt;ask = atoi(optarg);
&lt;br&gt;+				break;
&lt;br&gt;&amp;nbsp;			case OP_CACHEDIR:
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				if(alpm_option_add_cachedir(optarg) != 0) {
&lt;br&gt;&amp;nbsp;					pm_printf(PM_LOG_ERROR, _(&amp;quot;problem adding cachedir '%s' (%s)\n&amp;quot;),
&lt;br&gt;&amp;nbsp;							optarg, alpm_strerrorlast());
&lt;br&gt;@@ -457,9 +466,11 @@ static int parseargs(int argc, char *argv[])
&lt;br&gt;&amp;nbsp;				config-&amp;gt;flags |= PM_TRANS_FLAG_ALLDEPS;
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case OP_LOGFILE:
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				config-&amp;gt;logfile = strndup(optarg, PATH_MAX);
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case OP_IGNOREGROUP:
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				list = strsplit(optarg, ',');
&lt;br&gt;&amp;nbsp;				for(item = list; item; item = alpm_list_next(item)) {
&lt;br&gt;&amp;nbsp;					alpm_option_add_ignoregrp((char *)alpm_list_getdata(item));
&lt;br&gt;@@ -471,6 +482,7 @@ static int parseargs(int argc, char *argv[])
&lt;br&gt;&amp;nbsp;				config-&amp;gt;flags |= PM_TRANS_FLAG_ALLEXPLICIT;
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case OP_ARCH:
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				setarch(optarg);
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case 'Q': config-&amp;gt;op = (config-&amp;gt;op != PM_OP_MAIN ? 0 : PM_OP_QUERY); break;
&lt;br&gt;@@ -480,6 +492,7 @@ static int parseargs(int argc, char *argv[])
&lt;br&gt;&amp;nbsp;			case 'U': config-&amp;gt;op = (config-&amp;gt;op != PM_OP_MAIN ? 0 : PM_OP_UPGRADE); break;
&lt;br&gt;&amp;nbsp;			case 'V': config-&amp;gt;version = 1; break;
&lt;br&gt;&amp;nbsp;			case 'b':
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				config-&amp;gt;dbpath = strdup(optarg);
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case 'c':
&lt;br&gt;@@ -516,6 +529,7 @@ static int parseargs(int argc, char *argv[])
&lt;br&gt;&amp;nbsp;				config-&amp;gt;quiet = 1;
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case 'r':
&lt;br&gt;+				check_optarg();
&lt;br&gt;&amp;nbsp;				config-&amp;gt;rootdir = strdup(optarg);
&lt;br&gt;&amp;nbsp;				break;
&lt;br&gt;&amp;nbsp;			case 's':
&lt;br&gt;-- 
&lt;br&gt;1.6.5.4
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-3--fix-a-few-warnings-reported-by-clang-tp26660207p26660209.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26660208</id>
	<title>[PATCH 2/3] refactor _parseoptions</title>
	<published>2009-12-05T14:49:06Z</published>
	<updated>2009-12-05T14:49:06Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">This function was quite huge (~230 lines) and difficult to parse, now it is
&lt;br&gt;slightly better.
&lt;br&gt;&lt;br&gt;Signed-off-by: Xavier Chantry &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26660208&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shiningxc@...&lt;/a&gt;&amp;gt;
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;src/pacman/pacman.c | &amp;nbsp;308 ++++++++++++++++++++++++++++-----------------------
&lt;br&gt;&amp;nbsp;1 files changed, 170 insertions(+), 138 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
&lt;br&gt;index 3dccd48..38fc560 100644
&lt;br&gt;--- a/src/pacman/pacman.c
&lt;br&gt;+++ b/src/pacman/pacman.c
&lt;br&gt;@@ -713,6 +713,127 @@ cleanup:
&lt;br&gt;&amp;nbsp;	return(ret);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+static int _parse_options(char *key, char *value)
&lt;br&gt;+{
&lt;br&gt;+	if(value == NULL) {
&lt;br&gt;+		/* options without settings */
&lt;br&gt;+		if(strcmp(key, &amp;quot;UseSyslog&amp;quot;) == 0) {
&lt;br&gt;+			alpm_option_set_usesyslog(1);
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: usesyslog\n&amp;quot;);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;ILoveCandy&amp;quot;) == 0) {
&lt;br&gt;+			config-&amp;gt;chomp = 1;
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: chomp\n&amp;quot;);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;ShowSize&amp;quot;) == 0) {
&lt;br&gt;+			config-&amp;gt;showsize = 1;
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: showsize\n&amp;quot;);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;UseDelta&amp;quot;) == 0) {
&lt;br&gt;+			alpm_option_set_usedelta(1);
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: usedelta\n&amp;quot;);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;TotalDownload&amp;quot;) == 0) {
&lt;br&gt;+			config-&amp;gt;totaldownload = 1;
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: totaldownload\n&amp;quot;);
&lt;br&gt;+		} else {
&lt;br&gt;+			pm_printf(PM_LOG_ERROR, _(&amp;quot;directive '%s' without value not recognized\n&amp;quot;), key);
&lt;br&gt;+			return(1);
&lt;br&gt;+		}
&lt;br&gt;+	} else {
&lt;br&gt;+		/* options with settings */
&lt;br&gt;+		if(strcmp(key, &amp;quot;NoUpgrade&amp;quot;) == 0) {
&lt;br&gt;+			setrepeatingoption(value, &amp;quot;NoUpgrade&amp;quot;, alpm_option_add_noupgrade);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;NoExtract&amp;quot;) == 0) {
&lt;br&gt;+			setrepeatingoption(value, &amp;quot;NoExtract&amp;quot;, alpm_option_add_noextract);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;IgnorePkg&amp;quot;) == 0) {
&lt;br&gt;+			setrepeatingoption(value, &amp;quot;IgnorePkg&amp;quot;, alpm_option_add_ignorepkg);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;IgnoreGroup&amp;quot;) == 0) {
&lt;br&gt;+			setrepeatingoption(value, &amp;quot;IgnoreGroup&amp;quot;, alpm_option_add_ignoregrp);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;HoldPkg&amp;quot;) == 0) {
&lt;br&gt;+			setrepeatingoption(value, &amp;quot;HoldPkg&amp;quot;, option_add_holdpkg);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;SyncFirst&amp;quot;) == 0) {
&lt;br&gt;+			setrepeatingoption(value, &amp;quot;SyncFirst&amp;quot;, option_add_syncfirst);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;Architecture&amp;quot;) == 0) {
&lt;br&gt;+			if(!alpm_option_get_arch()) {
&lt;br&gt;+				setarch(value);
&lt;br&gt;+			}
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;DBPath&amp;quot;) == 0) {
&lt;br&gt;+			/* don't overwrite a path specified on the command line */
&lt;br&gt;+			if(!config-&amp;gt;dbpath) {
&lt;br&gt;+				config-&amp;gt;dbpath = strdup(value);
&lt;br&gt;+				pm_printf(PM_LOG_DEBUG, &amp;quot;config: dbpath: %s\n&amp;quot;, value);
&lt;br&gt;+			}
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;CacheDir&amp;quot;) == 0) {
&lt;br&gt;+			if(alpm_option_add_cachedir(value) != 0) {
&lt;br&gt;+				pm_printf(PM_LOG_ERROR, _(&amp;quot;problem adding cachedir '%s' (%s)\n&amp;quot;),
&lt;br&gt;+						value, alpm_strerrorlast());
&lt;br&gt;+				return(1);
&lt;br&gt;+			}
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: cachedir: %s\n&amp;quot;, value);
&lt;br&gt;+		} else if(strcmp(key, &amp;quot;RootDir&amp;quot;) == 0) {
&lt;br&gt;+			/* don't overwrite a path specified on the command line */
&lt;br&gt;+			if(!config-&amp;gt;rootdir) {
&lt;br&gt;+				config-&amp;gt;rootdir = strdup(value);
&lt;br&gt;+				pm_printf(PM_LOG_DEBUG, &amp;quot;config: rootdir: %s\n&amp;quot;, value);
&lt;br&gt;+			}
&lt;br&gt;+		} else if (strcmp(key, &amp;quot;LogFile&amp;quot;) == 0) {
&lt;br&gt;+			if(!config-&amp;gt;logfile) {
&lt;br&gt;+				config-&amp;gt;logfile = strdup(value);
&lt;br&gt;+				pm_printf(PM_LOG_DEBUG, &amp;quot;config: logfile: %s\n&amp;quot;, value);
&lt;br&gt;+			}
&lt;br&gt;+		} else if (strcmp(key, &amp;quot;XferCommand&amp;quot;) == 0) {
&lt;br&gt;+			config-&amp;gt;xfercommand = strdup(value);
&lt;br&gt;+			alpm_option_set_fetchcb(download_with_xfercommand);
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: xfercommand: %s\n&amp;quot;, value);
&lt;br&gt;+		} else if (strcmp(key, &amp;quot;CleanMethod&amp;quot;) == 0) {
&lt;br&gt;+			if (strcmp(value, &amp;quot;KeepInstalled&amp;quot;) == 0) {
&lt;br&gt;+				config-&amp;gt;cleanmethod = PM_CLEAN_KEEPINST;
&lt;br&gt;+			} else if (strcmp(value, &amp;quot;KeepCurrent&amp;quot;) == 0) {
&lt;br&gt;+				config-&amp;gt;cleanmethod = PM_CLEAN_KEEPCUR;
&lt;br&gt;+			} else {
&lt;br&gt;+				pm_printf(PM_LOG_ERROR, _(&amp;quot;invalid value for 'CleanMethod' : '%s'\n&amp;quot;), value);
&lt;br&gt;+				return(1);
&lt;br&gt;+			}
&lt;br&gt;+			pm_printf(PM_LOG_DEBUG, &amp;quot;config: cleanmethod: %s\n&amp;quot;, value);
&lt;br&gt;+		} else {
&lt;br&gt;+			pm_printf(PM_LOG_ERROR, _(&amp;quot;directive '%s' with a value not recognized\n&amp;quot;), key);
&lt;br&gt;+			return(1);
&lt;br&gt;+		}
&lt;br&gt;+
&lt;br&gt;+	}
&lt;br&gt;+	return(0);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+static int _add_mirror(pmdb_t *db, char *value)
&lt;br&gt;+{
&lt;br&gt;+	const char *dbname = alpm_db_get_name(db);
&lt;br&gt;+	/* let's attempt a replacement for the current repo */
&lt;br&gt;+	char *temp = strreplace(value, &amp;quot;$repo&amp;quot;, dbname);
&lt;br&gt;+	/* let's attempt a replacement for the arch */
&lt;br&gt;+	const char *arch = alpm_option_get_arch();
&lt;br&gt;+	char *server;
&lt;br&gt;+	if(arch) {
&lt;br&gt;+		server = strreplace(temp, &amp;quot;$arch&amp;quot;, arch);
&lt;br&gt;+		free(temp);
&lt;br&gt;+	} else {
&lt;br&gt;+		if(strstr(temp, &amp;quot;$arch&amp;quot;)) {
&lt;br&gt;+			free(temp);
&lt;br&gt;+			pm_printf(PM_LOG_ERROR, _(&amp;quot;The mirror '%s' contains the $arch&amp;quot;
&lt;br&gt;+						&amp;quot; variable, but no Architecture is defined.\n&amp;quot;), value);
&lt;br&gt;+			return(1);
&lt;br&gt;+		}
&lt;br&gt;+		server = temp;
&lt;br&gt;+	}
&lt;br&gt;+
&lt;br&gt;+	if(alpm_db_setserver(db, server) != 0) {
&lt;br&gt;+		/* pm_errno is set by alpm_db_setserver */
&lt;br&gt;+		pm_printf(PM_LOG_ERROR, _(&amp;quot;could not add server URL to database '%s': %s (%s)\n&amp;quot;),
&lt;br&gt;+				dbname, server, alpm_strerrorlast());
&lt;br&gt;+		free(server);
&lt;br&gt;+		return(1);
&lt;br&gt;+	}
&lt;br&gt;+
&lt;br&gt;+	free(server);
&lt;br&gt;+	return(0);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/* The real parseconfig. Called with a null section argument by the publicly
&lt;br&gt;&amp;nbsp; * visible parseconfig so we can recall from within ourself on an include */
&lt;br&gt;&amp;nbsp;static int _parseconfig(const char *file, const char *givensection,
&lt;br&gt;@@ -779,159 +900,70 @@ static int _parseconfig(const char *file, const char *givensection,
&lt;br&gt;&amp;nbsp;					goto cleanup;
&lt;br&gt;&amp;nbsp;				}
&lt;br&gt;&amp;nbsp;			}
&lt;br&gt;-		} else {
&lt;br&gt;-			/* directive */
&lt;br&gt;-			char *key;
&lt;br&gt;-			/* strsep modifies the 'line' string: 'key \0 ptr' */
&lt;br&gt;-			key = line;
&lt;br&gt;-			ptr = line;
&lt;br&gt;-			strsep(&amp;ptr, &amp;quot;=&amp;quot;);
&lt;br&gt;-			strtrim(key);
&lt;br&gt;-			strtrim(ptr);
&lt;br&gt;+			continue;
&lt;br&gt;+		}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-			if(key == NULL) {
&lt;br&gt;-				pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: syntax error in config file- missing key.\n&amp;quot;),
&lt;br&gt;-						file, linenum);
&lt;br&gt;-				ret = 1;
&lt;br&gt;-				goto cleanup;
&lt;br&gt;-			}
&lt;br&gt;-			/* For each directive, compare to the camelcase string. */
&lt;br&gt;-			if(section == NULL) {
&lt;br&gt;-				pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: All directives must belong to a section.\n&amp;quot;),
&lt;br&gt;+		/* directive */
&lt;br&gt;+		char *key, *value;
&lt;br&gt;+		/* strsep modifies the 'line' string: 'key \0 value' */
&lt;br&gt;+		key = line;
&lt;br&gt;+		value = line;
&lt;br&gt;+		strsep(&amp;value, &amp;quot;=&amp;quot;);
&lt;br&gt;+		strtrim(key);
&lt;br&gt;+		strtrim(value);
&lt;br&gt;+
&lt;br&gt;+		if(key == NULL) {
&lt;br&gt;+			pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: syntax error in config file- missing key.\n&amp;quot;),
&lt;br&gt;+					file, linenum);
&lt;br&gt;+			ret = 1;
&lt;br&gt;+			goto cleanup;
&lt;br&gt;+		}
&lt;br&gt;+		/* For each directive, compare to the camelcase string. */
&lt;br&gt;+		if(section == NULL) {
&lt;br&gt;+			pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: All directives must belong to a section.\n&amp;quot;),
&lt;br&gt;+					file, linenum);
&lt;br&gt;+			ret = 1;
&lt;br&gt;+			goto cleanup;
&lt;br&gt;+		}
&lt;br&gt;+		if(strcmp(section, &amp;quot;options&amp;quot;) == 0) {
&lt;br&gt;+			if((ret = _parse_options(key, value)) != 0) {
&lt;br&gt;+				pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: problem in options section\n&amp;quot;),
&lt;br&gt;&amp;nbsp;						file, linenum);
&lt;br&gt;&amp;nbsp;				ret = 1;
&lt;br&gt;&amp;nbsp;				goto cleanup;
&lt;br&gt;&amp;nbsp;			}
&lt;br&gt;-			if(ptr == NULL &amp;&amp; strcmp(section, &amp;quot;options&amp;quot;) == 0) {
&lt;br&gt;-				/* directives without settings, all in [options] */
&lt;br&gt;-				if(strcmp(key, &amp;quot;UseSyslog&amp;quot;) == 0) {
&lt;br&gt;-					alpm_option_set_usesyslog(1);
&lt;br&gt;-					pm_printf(PM_LOG_DEBUG, &amp;quot;config: usesyslog\n&amp;quot;);
&lt;br&gt;-				} else if(strcmp(key, &amp;quot;ILoveCandy&amp;quot;) == 0) {
&lt;br&gt;-					config-&amp;gt;chomp = 1;
&lt;br&gt;-					pm_printf(PM_LOG_DEBUG, &amp;quot;config: chomp\n&amp;quot;);
&lt;br&gt;-				} else if(strcmp(key, &amp;quot;ShowSize&amp;quot;) == 0) {
&lt;br&gt;-					config-&amp;gt;showsize = 1;
&lt;br&gt;-					pm_printf(PM_LOG_DEBUG, &amp;quot;config: showsize\n&amp;quot;);
&lt;br&gt;-				} else if(strcmp(key, &amp;quot;UseDelta&amp;quot;) == 0) {
&lt;br&gt;-					alpm_option_set_usedelta(1);
&lt;br&gt;-					pm_printf(PM_LOG_DEBUG, &amp;quot;config: usedelta\n&amp;quot;);
&lt;br&gt;-				} else if(strcmp(key, &amp;quot;TotalDownload&amp;quot;) == 0) {
&lt;br&gt;-					config-&amp;gt;totaldownload = 1;
&lt;br&gt;-					pm_printf(PM_LOG_DEBUG, &amp;quot;config: totaldownload\n&amp;quot;);
&lt;br&gt;-				} else {
&lt;br&gt;-					pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: directive '%s' not recognized.\n&amp;quot;),
&lt;br&gt;+			continue;
&lt;br&gt;+		} else {
&lt;br&gt;+			/* we are in a repo section */
&lt;br&gt;+			if(strcmp(key, &amp;quot;Include&amp;quot;) == 0) {
&lt;br&gt;+				if(value == NULL) {
&lt;br&gt;+					pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: directive %s needs a value\n&amp;quot;),
&lt;br&gt;&amp;nbsp;							file, linenum, key);
&lt;br&gt;&amp;nbsp;					ret = 1;
&lt;br&gt;&amp;nbsp;					goto cleanup;
&lt;br&gt;&amp;nbsp;				}
&lt;br&gt;-			} else {
&lt;br&gt;-				/* directives with settings */
&lt;br&gt;-				if(strcmp(key, &amp;quot;Include&amp;quot;) == 0) {
&lt;br&gt;-					pm_printf(PM_LOG_DEBUG, &amp;quot;config: including %s\n&amp;quot;, ptr);
&lt;br&gt;-					_parseconfig(ptr, section, db);
&lt;br&gt;-					/* Ignore include failures... assume non-critical */
&lt;br&gt;-				} else if(strcmp(section, &amp;quot;options&amp;quot;) == 0) {
&lt;br&gt;-					if(strcmp(key, &amp;quot;NoUpgrade&amp;quot;) == 0) {
&lt;br&gt;-						setrepeatingoption(ptr, &amp;quot;NoUpgrade&amp;quot;, alpm_option_add_noupgrade);
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;NoExtract&amp;quot;) == 0) {
&lt;br&gt;-						setrepeatingoption(ptr, &amp;quot;NoExtract&amp;quot;, alpm_option_add_noextract);
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;IgnorePkg&amp;quot;) == 0) {
&lt;br&gt;-						setrepeatingoption(ptr, &amp;quot;IgnorePkg&amp;quot;, alpm_option_add_ignorepkg);
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;IgnoreGroup&amp;quot;) == 0) {
&lt;br&gt;-						setrepeatingoption(ptr, &amp;quot;IgnoreGroup&amp;quot;, alpm_option_add_ignoregrp);
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;HoldPkg&amp;quot;) == 0) {
&lt;br&gt;-						setrepeatingoption(ptr, &amp;quot;HoldPkg&amp;quot;, option_add_holdpkg);
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;SyncFirst&amp;quot;) == 0) {
&lt;br&gt;-						setrepeatingoption(ptr, &amp;quot;SyncFirst&amp;quot;, option_add_syncfirst);
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;Architecture&amp;quot;) == 0) {
&lt;br&gt;-						if(!alpm_option_get_arch()) {
&lt;br&gt;-							setarch(ptr);
&lt;br&gt;-						}
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;DBPath&amp;quot;) == 0) {
&lt;br&gt;-						/* don't overwrite a path specified on the command line */
&lt;br&gt;-						if(!config-&amp;gt;dbpath) {
&lt;br&gt;-							config-&amp;gt;dbpath = strdup(ptr);
&lt;br&gt;-							pm_printf(PM_LOG_DEBUG, &amp;quot;config: dbpath: %s\n&amp;quot;, ptr);
&lt;br&gt;-						}
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;CacheDir&amp;quot;) == 0) {
&lt;br&gt;-						if(alpm_option_add_cachedir(ptr) != 0) {
&lt;br&gt;-							pm_printf(PM_LOG_ERROR, _(&amp;quot;problem adding cachedir '%s' (%s)\n&amp;quot;),
&lt;br&gt;-									ptr, alpm_strerrorlast());
&lt;br&gt;-							ret = 1;
&lt;br&gt;-							goto cleanup;
&lt;br&gt;-						}
&lt;br&gt;-						pm_printf(PM_LOG_DEBUG, &amp;quot;config: cachedir: %s\n&amp;quot;, ptr);
&lt;br&gt;-					} else if(strcmp(key, &amp;quot;RootDir&amp;quot;) == 0) {
&lt;br&gt;-						/* don't overwrite a path specified on the command line */
&lt;br&gt;-						if(!config-&amp;gt;rootdir) {
&lt;br&gt;-							config-&amp;gt;rootdir = strdup(ptr);
&lt;br&gt;-							pm_printf(PM_LOG_DEBUG, &amp;quot;config: rootdir: %s\n&amp;quot;, ptr);
&lt;br&gt;-						}
&lt;br&gt;-					} else if (strcmp(key, &amp;quot;LogFile&amp;quot;) == 0) {
&lt;br&gt;-						if(!config-&amp;gt;logfile) {
&lt;br&gt;-							config-&amp;gt;logfile = strdup(ptr);
&lt;br&gt;-							pm_printf(PM_LOG_DEBUG, &amp;quot;config: logfile: %s\n&amp;quot;, ptr);
&lt;br&gt;-						}
&lt;br&gt;-					} else if (strcmp(key, &amp;quot;XferCommand&amp;quot;) == 0) {
&lt;br&gt;-						config-&amp;gt;xfercommand = strdup(ptr);
&lt;br&gt;-						alpm_option_set_fetchcb(download_with_xfercommand);
&lt;br&gt;-						pm_printf(PM_LOG_DEBUG, &amp;quot;config: xfercommand: %s\n&amp;quot;, ptr);
&lt;br&gt;-					} else if (strcmp(key, &amp;quot;CleanMethod&amp;quot;) == 0) {
&lt;br&gt;-						if (strcmp(ptr, &amp;quot;KeepInstalled&amp;quot;) == 0) {
&lt;br&gt;-							config-&amp;gt;cleanmethod = PM_CLEAN_KEEPINST;
&lt;br&gt;-						} else if (strcmp(ptr, &amp;quot;KeepCurrent&amp;quot;) == 0) {
&lt;br&gt;-							config-&amp;gt;cleanmethod = PM_CLEAN_KEEPCUR;
&lt;br&gt;-						} else {
&lt;br&gt;-							pm_printf(PM_LOG_ERROR, _(&amp;quot;invalid value for 'CleanMethod' : '%s'\n&amp;quot;), ptr);
&lt;br&gt;-							ret = 1;
&lt;br&gt;-							goto cleanup;
&lt;br&gt;-						}
&lt;br&gt;-						pm_printf(PM_LOG_DEBUG, &amp;quot;config: cleanmethod: %s\n&amp;quot;, ptr);
&lt;br&gt;-					} else {
&lt;br&gt;-						pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: directive '%s' not recognized.\n&amp;quot;),
&lt;br&gt;-								file, linenum, key);
&lt;br&gt;-						ret = 1;
&lt;br&gt;-						goto cleanup;
&lt;br&gt;-					}
&lt;br&gt;-				} else if(strcmp(key, &amp;quot;Server&amp;quot;) == 0) {
&lt;br&gt;-					/* let's attempt a replacement for the current repo */
&lt;br&gt;-					char *temp = strreplace(ptr, &amp;quot;$repo&amp;quot;, section);
&lt;br&gt;-					/* let's attempt a replacement for the arch */
&lt;br&gt;-					const char *arch = alpm_option_get_arch();
&lt;br&gt;-					char *server;
&lt;br&gt;-					if(arch) {
&lt;br&gt;-						server = strreplace(temp, &amp;quot;$arch&amp;quot;, arch);
&lt;br&gt;-						free(temp);
&lt;br&gt;-					} else {
&lt;br&gt;-						if(strstr(temp, &amp;quot;$arch&amp;quot;)) {
&lt;br&gt;-							free(temp);
&lt;br&gt;-							pm_printf(PM_LOG_ERROR, _(&amp;quot;The mirror '%s' contains the $arch&amp;quot;
&lt;br&gt;-										&amp;quot; variable, but no Architecture is defined.\n&amp;quot;), ptr);
&lt;br&gt;-							ret = 1;
&lt;br&gt;-							goto cleanup;
&lt;br&gt;-						}
&lt;br&gt;-						server = temp;
&lt;br&gt;-					}
&lt;br&gt;-
&lt;br&gt;-					if(alpm_db_setserver(db, server) != 0) {
&lt;br&gt;-						/* pm_errno is set by alpm_db_setserver */
&lt;br&gt;-						pm_printf(PM_LOG_ERROR, _(&amp;quot;could not add server URL to database '%s': %s (%s)\n&amp;quot;),
&lt;br&gt;-								alpm_db_get_name(db), server, alpm_strerrorlast());
&lt;br&gt;-						free(server);
&lt;br&gt;-						ret = 1;
&lt;br&gt;-						goto cleanup;
&lt;br&gt;-					}
&lt;br&gt;-
&lt;br&gt;-					free(server);
&lt;br&gt;-				} else {
&lt;br&gt;-					pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: directive '%s' not recognized.\n&amp;quot;),
&lt;br&gt;+				pm_printf(PM_LOG_DEBUG, &amp;quot;config: including %s\n&amp;quot;, value);
&lt;br&gt;+				_parseconfig(value, section, db);
&lt;br&gt;+				/* Ignore include failures... assume non-critical */
&lt;br&gt;+			} else if(strcmp(key, &amp;quot;Server&amp;quot;) == 0) {
&lt;br&gt;+				if(value == NULL) {
&lt;br&gt;+					pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: directive %s needs a value\n&amp;quot;),
&lt;br&gt;&amp;nbsp;							file, linenum, key);
&lt;br&gt;&amp;nbsp;					ret = 1;
&lt;br&gt;&amp;nbsp;					goto cleanup;
&lt;br&gt;&amp;nbsp;				}
&lt;br&gt;+				if(_add_mirror(db, value) != 0) {
&lt;br&gt;+					ret = 1;
&lt;br&gt;+					goto cleanup;
&lt;br&gt;+				}
&lt;br&gt;+			} else {
&lt;br&gt;+				pm_printf(PM_LOG_ERROR, _(&amp;quot;config file %s, line %d: directive '%s' in repository section '%s' not recognized.\n&amp;quot;),
&lt;br&gt;+						file, linenum, key, section);
&lt;br&gt;+				ret = 1;
&lt;br&gt;+				goto cleanup;
&lt;br&gt;&amp;nbsp;			}
&lt;br&gt;&amp;nbsp;		}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;cleanup:
&lt;br&gt;-- 
&lt;br&gt;1.6.5.4
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-3--fix-a-few-warnings-reported-by-clang-tp26660207p26660208.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26660207</id>
	<title>[PATCH 1/3] fix a few warnings reported by clang</title>
	<published>2009-12-05T14:49:05Z</published>
	<updated>2009-12-05T14:49:05Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">- remove unused variables
&lt;br&gt;- some more sanity checks
&lt;br&gt;- safer printf
&lt;br&gt;&lt;br&gt;Signed-off-by: Xavier Chantry &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26660207&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shiningxc@...&lt;/a&gt;&amp;gt;
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;lib/libalpm/add.c &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 ++
&lt;br&gt;&amp;nbsp;lib/libalpm/be_files.c | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;lib/libalpm/conflict.c | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;lib/libalpm/package.c &amp;nbsp;| &amp;nbsp; &amp;nbsp;3 +--
&lt;br&gt;&amp;nbsp;src/pacman/callback.c &amp;nbsp;| &amp;nbsp; &amp;nbsp;4 +++-
&lt;br&gt;&amp;nbsp;src/pacman/pacman.c &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;src/pacman/util.c &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;7 files changed, 10 insertions(+), 7 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
&lt;br&gt;index ebcd6a5..dc565ac 100644
&lt;br&gt;--- a/lib/libalpm/add.c
&lt;br&gt;+++ b/lib/libalpm/add.c
&lt;br&gt;@@ -483,6 +483,8 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	ALPM_LOG_FUNC;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+	ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;	snprintf(scriptlet, PATH_MAX, &amp;quot;%s%s-%s/install&amp;quot;,
&lt;br&gt;&amp;nbsp;			_alpm_db_path(db), alpm_pkg_get_name(newpkg),
&lt;br&gt;&amp;nbsp;			alpm_pkg_get_version(newpkg));
&lt;br&gt;diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
&lt;br&gt;index 7fc20b8..f685019 100644
&lt;br&gt;--- a/lib/libalpm/be_files.c
&lt;br&gt;+++ b/lib/libalpm/be_files.c
&lt;br&gt;@@ -140,8 +140,8 @@ static int dirlist_from_fs(const char *syncdbpath, alpm_list_t **dirlist)
&lt;br&gt;&amp;nbsp;			entry[len+1] = '\0';
&lt;br&gt;&amp;nbsp;			*dirlist = alpm_list_add(*dirlist, entry);
&lt;br&gt;&amp;nbsp;		}
&lt;br&gt;+		closedir(dbdir);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;-	closedir(dbdir);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	*dirlist = alpm_list_msort(*dirlist, alpm_list_count(*dirlist), _alpm_str_cmp);
&lt;br&gt;&amp;nbsp;	return(0);
&lt;br&gt;diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
&lt;br&gt;index e934c01..85db83b 100644
&lt;br&gt;--- a/lib/libalpm/conflict.c
&lt;br&gt;+++ b/lib/libalpm/conflict.c
&lt;br&gt;@@ -408,7 +408,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	ALPM_LOG_FUNC;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	if(db == NULL || upgrade == NULL) {
&lt;br&gt;+	if(db == NULL || upgrade == NULL || trans == NULL) {
&lt;br&gt;&amp;nbsp;		return(NULL);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
&lt;br&gt;index 83a2fb8..10220af 100644
&lt;br&gt;--- a/lib/libalpm/package.c
&lt;br&gt;+++ b/lib/libalpm/package.c
&lt;br&gt;@@ -459,7 +459,6 @@ void SYMEXPORT *alpm_pkg_changelog_open(pmpkg_t *pkg)
&lt;br&gt;&amp;nbsp;		struct archive *archive = NULL;
&lt;br&gt;&amp;nbsp;		struct archive_entry *entry;
&lt;br&gt;&amp;nbsp;		const char *pkgfile = pkg-&amp;gt;origin_data.file;
&lt;br&gt;-		int ret = ARCHIVE_OK;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;		if((archive = archive_read_new()) == NULL) {
&lt;br&gt;&amp;nbsp;			RET_ERR(PM_ERR_LIBARCHIVE, NULL);
&lt;br&gt;@@ -473,7 +472,7 @@ void SYMEXPORT *alpm_pkg_changelog_open(pmpkg_t *pkg)
&lt;br&gt;&amp;nbsp;			RET_ERR(PM_ERR_PKG_OPEN, NULL);
&lt;br&gt;&amp;nbsp;		}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-		while((ret = archive_read_next_header(archive, &amp;entry)) == ARCHIVE_OK) {
&lt;br&gt;+		while(archive_read_next_header(archive, &amp;entry) == ARCHIVE_OK) {
&lt;br&gt;&amp;nbsp;			const char *entry_name = archive_entry_pathname(entry);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;			if(strcmp(entry_name, &amp;quot;.CHANGELOG&amp;quot;) == 0) {
&lt;br&gt;diff --git a/src/pacman/callback.c b/src/pacman/callback.c
&lt;br&gt;index 858bfdf..15f5423 100644
&lt;br&gt;--- a/src/pacman/callback.c
&lt;br&gt;+++ b/src/pacman/callback.c
&lt;br&gt;@@ -365,6 +365,8 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
&lt;br&gt;&amp;nbsp;		case PM_TRANS_PROGRESS_CONFLICTS_START:
&lt;br&gt;&amp;nbsp;			opr = _(&amp;quot;checking for file conflicts&amp;quot;);
&lt;br&gt;&amp;nbsp;			break;
&lt;br&gt;+		default:
&lt;br&gt;+			return;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	/* find # of digits in package counts to scale output */
&lt;br&gt;@@ -504,7 +506,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
&lt;br&gt;&amp;nbsp;			gettimeofday(&amp;initial_time, NULL);
&lt;br&gt;&amp;nbsp;			xfered_last = (off_t)0;
&lt;br&gt;&amp;nbsp;			rate_last = 0.0;
&lt;br&gt;-			timediff = get_update_timediff(1);
&lt;br&gt;+			get_update_timediff(1);
&lt;br&gt;&amp;nbsp;		}
&lt;br&gt;&amp;nbsp;	} else if(file_xfered == file_total) {
&lt;br&gt;&amp;nbsp;		/* compute final values */
&lt;br&gt;diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
&lt;br&gt;index ff6ef5c..3dccd48 100644
&lt;br&gt;--- a/src/pacman/pacman.c
&lt;br&gt;+++ b/src/pacman/pacman.c
&lt;br&gt;@@ -217,7 +217,7 @@ static void setarch(const char *arch)
&lt;br&gt;&amp;nbsp;static void cleanup(int ret) {
&lt;br&gt;&amp;nbsp;	/* free alpm library resources */
&lt;br&gt;&amp;nbsp;	if(alpm_release() == -1) {
&lt;br&gt;-		pm_printf(PM_LOG_ERROR, alpm_strerrorlast());
&lt;br&gt;+		pm_printf(PM_LOG_ERROR, &amp;quot;%s\n&amp;quot;, alpm_strerrorlast());
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	/* free memory */
&lt;br&gt;diff --git a/src/pacman/util.c b/src/pacman/util.c
&lt;br&gt;index 115b367..d395f3d 100644
&lt;br&gt;--- a/src/pacman/util.c
&lt;br&gt;+++ b/src/pacman/util.c
&lt;br&gt;@@ -219,7 +219,7 @@ void indentprint(const char *str, int indent)
&lt;br&gt;&amp;nbsp;	p = wcstr;
&lt;br&gt;&amp;nbsp;	cidx = indent;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	if(!p) {
&lt;br&gt;+	if(!p || !len) {
&lt;br&gt;&amp;nbsp;		return;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-- 
&lt;br&gt;1.6.5.4
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-3--fix-a-few-warnings-reported-by-clang-tp26660207p26660207.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26652993</id>
	<title>Re: [PATCH] makepkg: document environment variables PKGDEST and SRCDEST</title>
	<published>2009-12-04T20:45:12Z</published>
	<updated>2009-12-04T20:45:12Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Cedric Staniewski wrote:
&lt;br&gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26652993&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---
&lt;br&gt;&lt;br&gt;Good. &amp;nbsp;Pushed to my working branch.
&lt;br&gt;&lt;br&gt;Allan
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26652993.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26645462</id>
	<title>[PATCH] makepkg: document environment variables PKGDEST and SRCDEST</title>
	<published>2009-12-04T08:49:54Z</published>
	<updated>2009-12-04T08:49:54Z</updated>
	<author>
		<name>Cedric Staniewski</name>
	</author>
	<content type="html">Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26645462&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;doc/makepkg.8.txt | &amp;nbsp; &amp;nbsp;8 ++++++++
&lt;br&gt;&amp;nbsp;1 files changed, 8 insertions(+), 0 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;index 72206d8..63a2cf4 100644
&lt;br&gt;--- a/doc/makepkg.8.txt
&lt;br&gt;+++ b/doc/makepkg.8.txt
&lt;br&gt;@@ -170,6 +170,14 @@ Environment Variables
&lt;br&gt;&amp;nbsp;	must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;nbsp;	empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+**PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;+	Folder where the resulting packages will be stored. Overrides the
&lt;br&gt;+	corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;+
&lt;br&gt;+**SRCDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;+	Folder where the downloaded sources will be stored. Overrides the
&lt;br&gt;+	corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;Additional Features
&lt;br&gt;&amp;nbsp;-------------------
&lt;br&gt;-- 
&lt;br&gt;1.6.5.4
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26645462.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26626877</id>
	<title>[PATCH] makepkg: improve removal of installed dependencies</title>
	<published>2009-12-03T06:33:24Z</published>
	<updated>2009-12-03T06:33:24Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Compare a list of packages on the system before and after dependency resolution
&lt;br&gt;in order to get a complete list of packages to remove. &amp;nbsp;This allows makepkg to
&lt;br&gt;remove packages installed due to provides.
&lt;br&gt;&lt;br&gt;Bail in cases where packages that were on the system originally have been
&lt;br&gt;removed as there is a risk of breaking the system when removing the new
&lt;br&gt;packages
&lt;br&gt;&lt;br&gt;Fixes FS#15144
&lt;br&gt;&lt;br&gt;Signed-off-by: Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626877&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;---
&lt;br&gt;&lt;br&gt;This moves the generation of the installed package list to directly after
&lt;br&gt;the installation of deps to prevent issues if the user installs packages
&lt;br&gt;while the build is occurring:
&lt;br&gt;&lt;a href=&quot;http://bugs.archlinux.org/task/15144#comment53938&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bugs.archlinux.org/task/15144#comment53938&lt;/a&gt;&lt;br&gt;&lt;br&gt;Rebased on Cedric's run_pacman and $PACMAN patches.
&lt;br&gt;&lt;br&gt;&amp;nbsp;doc/makepkg.8.txt &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;6 +++---
&lt;br&gt;&amp;nbsp;scripts/makepkg.sh.in | &amp;nbsp; 39 +++++++++++++++++++++------------------
&lt;br&gt;&amp;nbsp;2 files changed, 24 insertions(+), 21 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;index ad27bca..168b369 100644
&lt;br&gt;--- a/doc/makepkg.8.txt
&lt;br&gt;+++ b/doc/makepkg.8.txt
&lt;br&gt;@@ -166,9 +166,9 @@ Environment Variables
&lt;br&gt;&amp;nbsp;---------------------
&lt;br&gt;&amp;nbsp;*PACMAN*::
&lt;br&gt;&amp;nbsp;	The command that will be used to check for missing dependencies and to
&lt;br&gt;-	install and remove packages. Pacman's -U, -T, -S and -Rns operations
&lt;br&gt;-	must be supported by this command. If the variable is not set or
&lt;br&gt;-	empty, makepkg will fall back to `pacman'.
&lt;br&gt;+	install and remove packages. Pacman's -Qq, -Rns, -S, -T, and -U
&lt;br&gt;+	operations must be supported by this command. If the variable is not
&lt;br&gt;+	set or empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;Additional Features
&lt;br&gt;diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
&lt;br&gt;index c730150..5743ea4 100644
&lt;br&gt;--- a/scripts/makepkg.sh.in
&lt;br&gt;+++ b/scripts/makepkg.sh.in
&lt;br&gt;@@ -27,8 +27,10 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;# makepkg uses quite a few external programs during its execution. You
&lt;br&gt;&amp;nbsp;# need to have at least the following installed for makepkg to function:
&lt;br&gt;-# &amp;nbsp; bsdtar (libarchive), bzip2, coreutils, fakeroot, find (findutils),
&lt;br&gt;-# &amp;nbsp; getopt (util-linux), gettext, grep, gzip, openssl, sed, tput (ncurses)
&lt;br&gt;+# &amp;nbsp; bsdtar (libarchive), bzip2, coreutils, diff (diffutils), fakeroot,
&lt;br&gt;+# &amp;nbsp; find (findutils), getopt (util-linux), gettext, grep, gzip, openssl,
&lt;br&gt;+# &amp;nbsp; sed, tput (ncurses)
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;# gettext initialization
&lt;br&gt;&amp;nbsp;export TEXTDOMAIN='pacman'
&lt;br&gt;@@ -343,7 +345,7 @@ download_file() {
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;run_pacman() {
&lt;br&gt;&amp;nbsp;	local ret=0
&lt;br&gt;-	if (( ! ASROOT )) &amp;&amp; [[ $1 != &amp;quot;-T&amp;quot; ]] &amp;&amp; sudo -l $PACMAN &amp;&amp;gt;/dev/null; then
&lt;br&gt;+	if (( ! ASROOT )) &amp;&amp; [[ $1 != &amp;quot;-T&amp;quot; &amp;&amp; $1 != &amp;quot;-Qq&amp;quot; ]] &amp;&amp; sudo -l $PACMAN &amp;&amp;gt;/dev/null; then
&lt;br&gt;&amp;nbsp;		sudo $PACMAN $PACMAN_OPTS &amp;quot;$@&amp;quot; || ret=$?
&lt;br&gt;&amp;nbsp;	else
&lt;br&gt;&amp;nbsp;		$PACMAN $PACMAN_OPTS &amp;quot;$@&amp;quot; || ret=$?
&lt;br&gt;@@ -398,7 +400,6 @@ handle_deps() {
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;resolve_deps() {
&lt;br&gt;-	# $pkgdeps is a GLOBAL variable, used by remove_deps()
&lt;br&gt;&amp;nbsp;	local R_DEPS_SATISFIED=0
&lt;br&gt;&amp;nbsp;	local R_DEPS_MISSING=1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -408,7 +409,6 @@ resolve_deps() {
&lt;br&gt;&amp;nbsp;	fi
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	if handle_deps $deplist; then
&lt;br&gt;-		pkgdeps=&amp;quot;$pkgdeps $deplist&amp;quot;
&lt;br&gt;&amp;nbsp;		# check deps again to make sure they were resolved
&lt;br&gt;&amp;nbsp;		deplist=&amp;quot;$(check_deps $*)&amp;quot;
&lt;br&gt;&amp;nbsp;		[[ -z $deplist ]] &amp;&amp; return $R_DEPS_SATISFIED
&lt;br&gt;@@ -425,23 +425,25 @@ resolve_deps() {
&lt;br&gt;&amp;nbsp;	return $R_DEPS_MISSING
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-# fix flyspray bug #5923
&lt;br&gt;&amp;nbsp;remove_deps() {
&lt;br&gt;-	# $pkgdeps is a GLOBAL variable, set by resolve_deps()
&lt;br&gt;&amp;nbsp;	(( ! RMDEPS )) &amp;&amp; return
&lt;br&gt;-	[[ -z $pkgdeps ]] &amp;&amp; return
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	local dep depstrip deplist
&lt;br&gt;-	deplist=&amp;quot;&amp;quot;
&lt;br&gt;-	for dep in $pkgdeps; do
&lt;br&gt;-		depstrip=&amp;quot;${dep%%[&amp;lt;=&amp;gt;]*}&amp;quot;
&lt;br&gt;-		deplist=&amp;quot;$deplist $depstrip&amp;quot;
&lt;br&gt;-	done
&lt;br&gt;+	# check for packages removed during dependency install (e.g. due to conflicts)
&lt;br&gt;+	# removing all installed packages is risky in this case
&lt;br&gt;+	if (( $(diff &amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${original_pkglist[@]}&amp;quot;) \
&lt;br&gt;+		&amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${current_pkglist[@]}&amp;quot;) | grep &amp;quot;&amp;lt;&amp;quot; | wc -l) &amp;gt; 0 )); then
&lt;br&gt;+	 &amp;nbsp;warning &amp;quot;$(gettext &amp;quot;Failed to remove installed dependencies.&amp;quot;)&amp;quot;
&lt;br&gt;+	 &amp;nbsp;return 0
&lt;br&gt;+	fi
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	msg &amp;quot;Removing installed dependencies...&amp;quot;
&lt;br&gt;+	local deplist=($(diff &amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${original_pkglist[@]}&amp;quot;) \
&lt;br&gt;+		&amp;lt;(printf &amp;quot;%s\n&amp;quot; &amp;quot;${current_pkglist[@]}&amp;quot;) | grep &amp;quot;&amp;gt;&amp;quot;))
&lt;br&gt;+	deplist=(${deplist[@]#&amp;gt;})
&lt;br&gt;+	[ ${#deplist[@]} -eq 0 ] &amp;&amp; return
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+	msg &amp;quot;Removing installed dependencies...&amp;quot;
&lt;br&gt;&amp;nbsp;	# exit cleanly on failure to remove deps as package has been built successfully
&lt;br&gt;-	if ! run_pacman -Rns $deplist; then
&lt;br&gt;+	if ! run_pacman -Rn ${deplist[@]}; then
&lt;br&gt;&amp;nbsp;		warning &amp;quot;$(gettext &amp;quot;Failed to remove installed dependencies.&amp;quot;)&amp;quot;
&lt;br&gt;&amp;nbsp;		return 0
&lt;br&gt;&amp;nbsp;	fi
&lt;br&gt;@@ -1874,14 +1876,13 @@ if (( SOURCEONLY )); then
&lt;br&gt;&amp;nbsp;	exit 0
&lt;br&gt;&amp;nbsp;fi
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-# fix flyspray bug #5973
&lt;br&gt;&amp;nbsp;if (( NODEPS || NOBUILD || REPKG )); then
&lt;br&gt;&amp;nbsp;	# no warning message needed for nobuild, repkg
&lt;br&gt;&amp;nbsp;	if (( NODEPS )); then
&lt;br&gt;&amp;nbsp;		warning &amp;quot;$(gettext &amp;quot;Skipping dependency checks.&amp;quot;)&amp;quot;
&lt;br&gt;&amp;nbsp;	fi
&lt;br&gt;&amp;nbsp;elif [ $(type -p &amp;quot;${PACMAN%% *}&amp;quot;) ]; then
&lt;br&gt;-	unset pkgdeps # Set by resolve_deps() and used by remove_deps()
&lt;br&gt;+	original_pkglist=($(run_pacman -Qq)) &amp;nbsp; &amp;nbsp;# required by remove_deps
&lt;br&gt;&amp;nbsp;	deperr=0
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	msg &amp;quot;$(gettext &amp;quot;Checking Runtime Dependencies...&amp;quot;)&amp;quot;
&lt;br&gt;@@ -1890,6 +1891,8 @@ elif [ $(type -p &amp;quot;${PACMAN%% *}&amp;quot;) ]; then
&lt;br&gt;&amp;nbsp;	msg &amp;quot;$(gettext &amp;quot;Checking Buildtime Dependencies...&amp;quot;)&amp;quot;
&lt;br&gt;&amp;nbsp;	resolve_deps ${makedepends[@]} || deperr=1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+	current_pkglist=($(run_pacman -Qq)) &amp;nbsp; &amp;nbsp;# required by remove_deps
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;	if (( deperr )); then
&lt;br&gt;&amp;nbsp;		error &amp;quot;$(gettext &amp;quot;Could not resolve all dependencies.&amp;quot;)&amp;quot;
&lt;br&gt;&amp;nbsp;		exit 1
&lt;br&gt;-- 
&lt;br&gt;1.6.5.3
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-improve-removal-of-installed-dependencies-tp26626877p26626877.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26626308</id>
	<title>Re: [PATCH 1/3] makepkg: allow to specify an	alternative pacman command</title>
	<published>2009-12-03T05:55:18Z</published>
	<updated>2009-12-03T05:55:18Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Dan McGee wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Dec 3, 2009 at 6:09 AM, Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626308&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Cedric Staniewski wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If PACMAN environment variable is set, makepkg will try to use this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; command to check for installed dependencies and to install or remove
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; packages. Otherwise, makepkg will fall back to pacman.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Implements FS#13028.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626308&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;doc/makepkg.8.txt &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;9 +++++++++
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;scripts/makepkg.sh.in | &amp;nbsp; 19 +++++++++++--------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;2 files changed, 20 insertions(+), 8 deletions(-)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; index 18ee6ed..703c1b0 100644
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --- a/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +++ b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; @@ -162,6 +162,15 @@ Options
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;useful if you are redirecting makepkg output to file.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; +Environment Variables
&lt;br&gt;&amp;gt;&amp;gt; Useful Environment Variables? &amp;nbsp;The lead in sounds better, but maybe not
&lt;br&gt;&amp;gt;&amp;gt; quite right. &amp;nbsp;Not sure here...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;Environment Variables&amp;quot; is a standard manpage header, usually found
&lt;br&gt;&amp;gt; near the bottom. I didn't look where this patch actually put it in the
&lt;br&gt;&amp;gt; manpage, but see examples like less, grep, etc.
&lt;/div&gt;&lt;br&gt;OK, fine. &amp;nbsp;It is place after OPTIONS and before ADDITIONAL FEATURES and 
&lt;br&gt;CONFIGURATION. &amp;nbsp;Seems a reasonable place.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +---------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +*PACMAN*::
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; The command which will be used to check for missing dependencies
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; install and remove packages. Pacman's -U, -T, -S and -Rns
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; operations
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;gt;&amp;gt; The command _that_ will... &amp;nbsp;The rest of the description sounds fine.
&lt;br&gt;I will change the &amp;quot;which&amp;quot; to &amp;quot;that&amp;quot; and pull to my working branch.
&lt;br&gt;&lt;br&gt;Allan
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26626308.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26626032</id>
	<title>Re: [PATCH 1/3] makepkg: allow to specify an alternative pacman command</title>
	<published>2009-12-03T05:36:06Z</published>
	<updated>2009-12-03T05:36:06Z</updated>
	<author>
		<name>Dan McGee</name>
	</author>
	<content type="html">On Thu, Dec 3, 2009 at 6:09 AM, Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626032&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Cedric Staniewski wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If PACMAN environment variable is set, makepkg will try to use this
&lt;br&gt;&amp;gt;&amp;gt; command to check for installed dependencies and to install or remove
&lt;br&gt;&amp;gt;&amp;gt; packages. Otherwise, makepkg will fall back to pacman.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Implements FS#13028.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626032&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt;  doc/makepkg.8.txt     |    9 +++++++++
&lt;br&gt;&amp;gt;&amp;gt;  scripts/makepkg.sh.in |   19 +++++++++++--------
&lt;br&gt;&amp;gt;&amp;gt;  2 files changed, 20 insertions(+), 8 deletions(-)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt; index 18ee6ed..703c1b0 100644
&lt;br&gt;&amp;gt;&amp;gt; --- a/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt; +++ b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt; @@ -162,6 +162,15 @@ Options
&lt;br&gt;&amp;gt;&amp;gt;        useful if you are redirecting makepkg output to file.
&lt;br&gt;&amp;gt;&amp;gt;   +Environment Variables
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Useful Environment Variables?  The lead in sounds better, but maybe not
&lt;br&gt;&amp;gt; quite right.  Not sure here...
&lt;/div&gt;&lt;br&gt;&amp;quot;Environment Variables&amp;quot; is a standard manpage header, usually found
&lt;br&gt;near the bottom. I didn't look where this patch actually put it in the
&lt;br&gt;manpage, but see examples like less, grep, etc.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; +---------------------
&lt;br&gt;&amp;gt;&amp;gt; +*PACMAN*::
&lt;br&gt;&amp;gt;&amp;gt; +       The command which will be used to check for missing dependencies
&lt;br&gt;&amp;gt;&amp;gt; and to
&lt;br&gt;&amp;gt;&amp;gt; +       install and remove packages. Pacman's -U, -T, -S and -Rns
&lt;br&gt;&amp;gt;&amp;gt; operations
&lt;br&gt;&amp;gt;&amp;gt; +       must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;gt;&amp;gt; +       empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The command _that_ will...  The rest of the description sounds fine.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Otherwise, the patch is good.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26626032.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26625017</id>
	<title>Re: [PATCH 1/3] makepkg: allow to specify an alternative pacman command</title>
	<published>2009-12-03T04:09:09Z</published>
	<updated>2009-12-03T04:09:09Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Cedric Staniewski wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; If PACMAN environment variable is set, makepkg will try to use this
&lt;br&gt;&amp;gt; command to check for installed dependencies and to install or remove
&lt;br&gt;&amp;gt; packages. Otherwise, makepkg will fall back to pacman.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Implements FS#13028.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26625017&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---
&lt;br&gt;&amp;gt; &amp;nbsp;doc/makepkg.8.txt &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;9 +++++++++
&lt;br&gt;&amp;gt; &amp;nbsp;scripts/makepkg.sh.in | &amp;nbsp; 19 +++++++++++--------
&lt;br&gt;&amp;gt; &amp;nbsp;2 files changed, 20 insertions(+), 8 deletions(-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; index 18ee6ed..703c1b0 100644
&lt;br&gt;&amp;gt; --- a/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; +++ b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; @@ -162,6 +162,15 @@ Options
&lt;br&gt;&amp;gt; &amp;nbsp;	useful if you are redirecting makepkg output to file.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; +Environment Variables
&lt;/div&gt;&lt;br&gt;Useful Environment Variables? &amp;nbsp;The lead in sounds better, but maybe not 
&lt;br&gt;quite right. &amp;nbsp;Not sure here...
&lt;br&gt;&lt;br&gt;&amp;gt; +---------------------
&lt;br&gt;&amp;gt; +*PACMAN*::
&lt;br&gt;&amp;gt; +	The command which will be used to check for missing dependencies and to
&lt;br&gt;&amp;gt; +	install and remove packages. Pacman's -U, -T, -S and -Rns operations
&lt;br&gt;&amp;gt; +	must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;gt; +	empty, makepkg will fall back to `pacman'.
&lt;br&gt;&lt;br&gt;The command _that_ will... &amp;nbsp;The rest of the description sounds fine.
&lt;br&gt;&lt;br&gt;Otherwise, the patch is good.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26625017.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26623304</id>
	<title>Re: [PATCH] makepkg: remove srclinks directory on	error exit</title>
	<published>2009-12-03T01:43:38Z</published>
	<updated>2009-12-03T01:43:38Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Cedric Staniewski wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 12/03/2009 05:08 AM, Allan McRae wrote:
&lt;br&gt;&amp;gt;&amp;gt; Cedric Staniewski wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; When makepkg exits in create_srcpackage(), the (temporary) srclinks
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; directory is left behind.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26623304&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;scripts/makepkg.sh.in | &amp;nbsp; &amp;nbsp;1 +
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;1 files changed, 1 insertions(+), 0 deletions(-)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; index ceaa8a6..b618881 100644
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --- a/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +++ b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; @@ -118,6 +118,7 @@ trap_exit() {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;error &amp;quot;$@&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;fi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;[[ -n $srclinks ]] &amp;&amp; rm -rf &amp;quot;$srclinks&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;exit 1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; I am not sure about this as if the source package creation fails, I
&lt;br&gt;&amp;gt;&amp;gt; would like to be able to look in the directory to track down why. &amp;nbsp;Much
&lt;br&gt;&amp;gt;&amp;gt; like how &amp;quot;-c&amp;quot; does not clear the source directory on a build failure. So
&lt;br&gt;&amp;gt;&amp;gt; my initial reaction is a -1.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; As an aside, did you actually encounter an error during source package
&lt;br&gt;&amp;gt;&amp;gt; creation or just note that could be left behind from the code?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I actually did not encounter an error but aborted via ctrl+c. Keeping
&lt;br&gt;&amp;gt; this folder is useless in my opinion as there are error messages for
&lt;br&gt;&amp;gt; pretty much everything and the three different external commands which
&lt;br&gt;&amp;gt; are used (mkdir, ln, bsdtar) usually throw meaningful error messages,
&lt;br&gt;&amp;gt; too. Aside from that this folder only contains smylinks anyway and I
&lt;br&gt;&amp;gt; doubt they are useful for tracking down errors.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Another alternative would be introducing a new cleanup function which is
&lt;br&gt;&amp;gt; only run on SIGINT and moving this line there, though.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;OK, your comment about the external commands being used having good 
&lt;br&gt;error messages has me convinced something needs done. &amp;nbsp;It just seems a 
&lt;br&gt;strange place for this particular clean up. &amp;nbsp;Saying that, I'm not sure 
&lt;br&gt;what would be a better place unless we had an error trap just for that 
&lt;br&gt;function which passed on to trap_exit.
&lt;br&gt;&lt;br&gt;Dan, Xavier, others: any comments?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-remove-srclinks-directory-on-error-exit-tp26613542p26623304.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26623019</id>
	<title>Re: [PATCH 3/3] makepkg: document environment	variables PKGDEST and SRCDEST</title>
	<published>2009-12-03T01:17:55Z</published>
	<updated>2009-12-03T01:17:55Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Cedric Staniewski wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 12/03/2009 05:19 AM, Allan McRae wrote:
&lt;br&gt;&amp;gt;&amp;gt; Cedric Staniewski wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26623019&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;doc/makepkg.8.txt | &amp;nbsp; 15 +++++++++++++++
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;1 files changed, 15 insertions(+), 0 deletions(-)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; index 703c1b0..ccb9a28 100644
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --- a/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +++ b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; @@ -170,6 +170,21 @@ Environment Variables
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +**PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;If this value is not set, packages will by default be placed in the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;current directory (location of the linkman:PKGBUILD[5]). Many people
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;like to keep all their packages in one place so this option allows
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;this behavior. A common location is ``/home/packages''.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;This environment variable will override the corresponding value
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt;&amp;gt; I do not like the repetition of makepkg.conf.5 here. &amp;nbsp;I'd prefer just
&lt;br&gt;&amp;gt;&amp;gt; **PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Overrides the corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Or something quite simple like that. &amp;nbsp;People can then look up
&lt;br&gt;&amp;gt;&amp;gt; makepkg.conf.5 to find out what the variable does.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I agree with you. How about
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; **PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt; &amp;nbsp; Folder where the resulting packages will be stored. Overrides the
&lt;br&gt;&amp;gt; corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; **SRCDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt; &amp;nbsp; Folder where the downloaded sources will be stored. Overrides the
&lt;br&gt;&amp;gt; corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Looks good to me. &amp;nbsp;I'll let Dan comment as he always picks holes in my 
&lt;br&gt;documentation! :P
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26623019.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26622527</id>
	<title>Re: [PATCH] makepkg: remove srclinks directory on	error exit</title>
	<published>2009-12-03T00:30:52Z</published>
	<updated>2009-12-03T00:30:52Z</updated>
	<author>
		<name>Cedric Staniewski</name>
	</author>
	<content type="html">On 12/03/2009 05:08 AM, Allan McRae wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Cedric Staniewski wrote:
&lt;br&gt;&amp;gt;&amp;gt; When makepkg exits in create_srcpackage(), the (temporary) srclinks
&lt;br&gt;&amp;gt;&amp;gt; directory is left behind.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26622527&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;scripts/makepkg.sh.in | &amp;nbsp; &amp;nbsp;1 +
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;1 files changed, 1 insertions(+), 0 deletions(-)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt;&amp;gt; index ceaa8a6..b618881 100644
&lt;br&gt;&amp;gt;&amp;gt; --- a/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt;&amp;gt; +++ b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt;&amp;gt; @@ -118,6 +118,7 @@ trap_exit() {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;error &amp;quot;$@&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;fi
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;[[ -n $srclinks ]] &amp;&amp; rm -rf &amp;quot;$srclinks&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;exit 1
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am not sure about this as if the source package creation fails, I
&lt;br&gt;&amp;gt; would like to be able to look in the directory to track down why. &amp;nbsp;Much
&lt;br&gt;&amp;gt; like how &amp;quot;-c&amp;quot; does not clear the source directory on a build failure. So
&lt;br&gt;&amp;gt; my initial reaction is a -1.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; As an aside, did you actually encounter an error during source package
&lt;br&gt;&amp;gt; creation or just note that could be left behind from the code?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;I actually did not encounter an error but aborted via ctrl+c. Keeping
&lt;br&gt;this folder is useless in my opinion as there are error messages for
&lt;br&gt;pretty much everything and the three different external commands which
&lt;br&gt;are used (mkdir, ln, bsdtar) usually throw meaningful error messages,
&lt;br&gt;too. Aside from that this folder only contains smylinks anyway and I
&lt;br&gt;doubt they are useful for tracking down errors.
&lt;br&gt;&lt;br&gt;Another alternative would be introducing a new cleanup function which is
&lt;br&gt;only run on SIGINT and moving this line there, though.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-remove-srclinks-directory-on-error-exit-tp26613542p26622527.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26622303</id>
	<title>Re: [PATCH 3/3] makepkg: document environment	variables PKGDEST and SRCDEST</title>
	<published>2009-12-03T00:09:29Z</published>
	<updated>2009-12-03T00:09:29Z</updated>
	<author>
		<name>Cedric Staniewski</name>
	</author>
	<content type="html">On 12/03/2009 05:19 AM, Allan McRae wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Cedric Staniewski wrote:
&lt;br&gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26622303&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;doc/makepkg.8.txt | &amp;nbsp; 15 +++++++++++++++
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;1 files changed, 15 insertions(+), 0 deletions(-)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt; index 703c1b0..ccb9a28 100644
&lt;br&gt;&amp;gt;&amp;gt; --- a/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt; +++ b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt;&amp;gt; @@ -170,6 +170,21 @@ Environment Variables
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; +**PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;If this value is not set, packages will by default be placed in the
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;current directory (location of the linkman:PKGBUILD[5]). Many people
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;like to keep all their packages in one place so this option allows
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;this behavior. A common location is ``/home/packages''.
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;This environment variable will override the corresponding value
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I do not like the repetition of makepkg.conf.5 here. &amp;nbsp;I'd prefer just
&lt;br&gt;&amp;gt; **PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Overrides the corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Or something quite simple like that. &amp;nbsp;People can then look up
&lt;br&gt;&amp;gt; makepkg.conf.5 to find out what the variable does.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;I agree with you. How about
&lt;br&gt;&lt;br&gt;**PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;nbsp; Folder where the resulting packages will be stored. Overrides the
&lt;br&gt;corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;&lt;br&gt;**SRCDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;nbsp; Folder where the downloaded sources will be stored. Overrides the
&lt;br&gt;corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; +**SRCDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;If this value is not set, downloaded source files will only be
&lt;br&gt;&amp;gt;&amp;gt; stored
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;in the current directory. Many people like to keep all source
&lt;br&gt;&amp;gt;&amp;gt; files in
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;a central location for easy cleanup, so this path can be set here.
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;This environment variable will override the corresponding value
&lt;br&gt;&amp;gt;&amp;gt; + &amp;nbsp; &amp;nbsp;defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Additional Features
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;-------------------
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26622303.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26622215</id>
	<title>Re: [PATCH] docs: set text width to 72 in vim directive</title>
	<published>2009-12-02T23:59:02Z</published>
	<updated>2009-12-02T23:59:02Z</updated>
	<author>
		<name>Cedric Staniewski</name>
	</author>
	<content type="html">On 12/03/2009 01:47 AM, Dan McGee wrote:
&lt;br&gt;&amp;gt; On Wed, Dec 2, 2009 at 12:05 PM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26622215&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; A &amp;quot;why&amp;quot; in the commit message would be awfully nice, I'm confused here. :)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26622215&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Sorry, I thought it were quite clear. The text in the man pages is
&lt;br&gt;already wrapped after a certain amount of characters and I thought is
&lt;br&gt;would be nice to add this to the vim directive or am I missing something
&lt;br&gt;here?
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--docs%3A-set-text-width-to-72-in-vim-directive-tp26613535p26622215.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26621107</id>
	<title>Re: inside PKGBUILD customizable makepkg PURGE_TARGETS</title>
	<published>2009-12-02T21:10:43Z</published>
	<updated>2009-12-02T21:10:43Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Ciprian Dorin, Craciun wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Dec 3, 2009 at 2:39 AM, Dan McGee &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26621107&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dpmcgee@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Wed, Dec 2, 2009 at 3:48 PM, Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26621107&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Ciprian Dorin, Craciun wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;Hello all!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;Again I have a proposal to enhance makepkg PURGE_TARGETS handling.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;I think that enabling customizing PURGE_TARGETS inside PKGBUILD
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; would be a benefit in the following context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Without checking, I would have thought that exporting &amp;quot;PURGE_TRAGETS=...&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; within a package function would just work. &amp;nbsp;I guess the old value would not
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; be restored afterwards though.
&lt;br&gt;&amp;gt;&amp;gt; This seems like complete overkill for makepkg to support. I'm -1 on this.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;What overkill? Really? It's a 3 or 4-line update:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ~~~~ instead of this:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &amp;quot;$(check_option purge)&amp;quot; = &amp;quot;y&amp;quot; -a -n &amp;quot;${PURGE_TARGETS[*]}&amp;quot; ]; then
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg2 &amp;quot;$(gettext &amp;quot;Purging other files...&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; ~~~~ we'll have this:
&lt;br&gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;local purge_targets=( &amp;quot;${pkg_purge_targets[@]:-${PURGE_TARGETS[@]}}&amp;quot; )
&lt;br&gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;eval 'purge_targets=(
&lt;br&gt;&amp;gt; &amp;quot;${'&amp;quot;${pkgname}&amp;quot;'_purge_targets[@]:-${purge_targets[@]}&amp;quot; )'
&lt;br&gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if [ &amp;quot;$(check_option purge)&amp;quot; = &amp;quot;y&amp;quot; -a -n &amp;quot;${purge_targets[*]}&amp;quot; ]; then
&lt;br&gt;&amp;gt; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &amp;quot;$(check_option purge)&amp;quot; = &amp;quot;y&amp;quot; -a -n &amp;quot;${PURGE_TARGETS[*]}&amp;quot; ]; then
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg2 &amp;quot;$(gettext &amp;quot;Purging other files...&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; ~~~~ and we have to replace `PURGE_TARGETS` with `purge_targets`
&lt;br&gt;&amp;gt; somewhare below in 2 places.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;As I said, defining PURGE_TARGETS in a package_foo() function already works:
&lt;br&gt;&lt;br&gt;e.g.
&lt;br&gt;&lt;br&gt;package_t1() {
&lt;br&gt;&amp;nbsp; &amp;nbsp;PURGE_TARGETS=(*.a)
&lt;br&gt;&amp;nbsp; &amp;nbsp;touch $pkgdir/foo.a
&lt;br&gt;&amp;nbsp; &amp;nbsp;touch $pkgdir/foo.doc
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;package_t2() {
&lt;br&gt;&amp;nbsp; &amp;nbsp;PURGE_TARGETS=(*.doc)
&lt;br&gt;&amp;nbsp; &amp;nbsp;touch $pkgdir/foo.a
&lt;br&gt;&amp;nbsp; &amp;nbsp;touch $pkgdir/foo.doc
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Guess which file ends up in which package...
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Guys, as developers of makepkg, you really have something against
&lt;br&gt;&amp;gt; extensions that would allow writing simpler or more versatile
&lt;br&gt;&amp;gt; PKGBUILD's...
&lt;br&gt;&lt;br&gt;No, we just do not believe any of the ideas you have shown us so far are 
&lt;br&gt;making simpler PKGBUILDs or achieving something that can not already be 
&lt;br&gt;done with makepkg using the same number of lines in the PKGBUILD
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; For example, below is one of my PKGBUILDS, that uses what I call a
&lt;br&gt;&amp;gt; &amp;quot;template&amp;quot;, which allows me to abstract away patching, calling
&lt;br&gt;&amp;gt; configure, and make. And in order to support this split of packages,
&lt;br&gt;&amp;gt; all I have to do is update my `configure+make+make-install` script to
&lt;br&gt;&amp;gt; understand this, and just put `pkgname=( isync-bin isync-doc )`.
&lt;br&gt;&amp;gt; (Unfortunately this doesn't have a lib or dev).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; My `configure+make+make-install` just implements `build` and
&lt;br&gt;&amp;gt; `package` functions that use the variables defined in the PKGBUILD,
&lt;br&gt;&amp;gt; with some sensible defaults. (I think this resembles somehow GoboLinux
&lt;br&gt;&amp;gt; recipies...)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ~~~~
&lt;br&gt;&amp;gt; . &amp;quot;${pkgbuild_tools_root}/configure+make+make-install&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; pkgname=( isync )
&lt;br&gt;&amp;gt; _pkgver=1.0.4
&lt;br&gt;&amp;gt; _pkgpatch=+1
&lt;br&gt;&amp;gt; pkgver=&amp;quot;${_pkgver}${_pkgpatch}&amp;quot;
&lt;br&gt;&amp;gt; pkgrel=1
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; depends=()
&lt;br&gt;&amp;gt; makedepends=(
&lt;br&gt;&amp;gt; 		openssl db
&lt;br&gt;&amp;gt; 		gcc binutils glibc
&lt;br&gt;&amp;gt; 		make coreutils bash
&lt;br&gt;&amp;gt; 		sed grep patch
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _declare_arch
&lt;br&gt;&amp;gt; _declare_paths
&lt;br&gt;&amp;gt; _declare_build_environment
&lt;br&gt;&amp;gt; _declare_configure_options
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _configure_options=(
&lt;br&gt;&amp;gt; 		&amp;quot;${_configure_options[@]}&amp;quot;
&lt;br&gt;&amp;gt; 		--disable-compat
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _LIBS=(
&lt;br&gt;&amp;gt; 		&amp;quot;${_LIBS[@]}&amp;quot;
&lt;br&gt;&amp;gt; 		-static
&lt;br&gt;&amp;gt; 		-ldb -lpthread
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _src_patches=(
&lt;br&gt;&amp;gt; 		imap_recursive_maildir.patch
&lt;br&gt;&amp;gt; 		imap_certificate_ignore.patch
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; source=(
&lt;br&gt;&amp;gt; 		&amp;quot;&lt;a href=&quot;http://switch.dl.sourceforge.net/project/isync/isync/$&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://switch.dl.sourceforge.net/project/isync/isync/$&lt;/a&gt;{_pkgver}/isync-${_pkgver}.tar.gz&amp;quot;
&lt;br&gt;&amp;gt; 		imap_recursive_maildir.patch
&lt;br&gt;&amp;gt; 		imap_certificate_ignore.patch
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt; md5sums=(
&lt;br&gt;&amp;gt; 		8a836a6f4b43cd38a8b8153048417616
&lt;br&gt;&amp;gt; 		fd42b61f2979d2bf2d08f1528a292ec5
&lt;br&gt;&amp;gt; 		efbe84127425024676b07c2fdef87a98
&lt;br&gt;&amp;gt; )
&lt;/div&gt;&lt;br&gt;I would not call that simpler. &amp;nbsp;I look at that and have only vague ideas 
&lt;br&gt;what the packaging would be doing, whereas a normal package I see the 
&lt;br&gt;exact commands.
&lt;br&gt;&lt;br&gt;Allan
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inside-PKGBUILD-customizable-makepkg-PURGE_TARGETS-tp26613188p26621107.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26620974</id>
	<title>Re: inside PKGBUILD customizable makepkg PURGE_TARGETS</title>
	<published>2009-12-02T20:56:05Z</published>
	<updated>2009-12-02T20:56:05Z</updated>
	<author>
		<name>Ciprian Dorin, Craciun</name>
	</author>
	<content type="html">On Thu, Dec 3, 2009 at 2:39 AM, Dan McGee &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26620974&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dpmcgee@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, Dec 2, 2009 at 3:48 PM, Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26620974&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Ciprian Dorin, Craciun wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;    Hello all!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;    Again I have a proposal to enhance makepkg PURGE_TARGETS handling.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;    I think that enabling customizing PURGE_TARGETS inside PKGBUILD
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; would be a benefit in the following context:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Without checking, I would have thought that exporting &amp;quot;PURGE_TRAGETS=...&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; within a package function would just work.  I guess the old value would not
&lt;br&gt;&amp;gt;&amp;gt; be restored afterwards though.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This seems like complete overkill for makepkg to support. I'm -1 on this.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;What overkill? Really? It's a 3 or 4-line update:
&lt;br&gt;&lt;br&gt;~~~~ instead of this:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &amp;quot;$(check_option purge)&amp;quot; = &amp;quot;y&amp;quot; -a -n &amp;quot;${PURGE_TARGETS[*]}&amp;quot; ]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg2 &amp;quot;$(gettext &amp;quot;Purging other files...&amp;quot;)&amp;quot;
&lt;br&gt;~~~~ we'll have this:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;local purge_targets=( &amp;quot;${pkg_purge_targets[@]:-${PURGE_TARGETS[@]}}&amp;quot; )
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;eval 'purge_targets=(
&lt;br&gt;&amp;quot;${'&amp;quot;${pkgname}&amp;quot;'_purge_targets[@]:-${purge_targets[@]}&amp;quot; )'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if [ &amp;quot;$(check_option purge)&amp;quot; = &amp;quot;y&amp;quot; -a -n &amp;quot;${purge_targets[*]}&amp;quot; ]; then
&lt;br&gt;&amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &amp;quot;$(check_option purge)&amp;quot; = &amp;quot;y&amp;quot; -a -n &amp;quot;${PURGE_TARGETS[*]}&amp;quot; ]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg2 &amp;quot;$(gettext &amp;quot;Purging other files...&amp;quot;)&amp;quot;
&lt;br&gt;~~~~ and we have to replace `PURGE_TARGETS` with `purge_targets`
&lt;br&gt;somewhare below in 2 places.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; If upstream builds can't get their act together and provide individual
&lt;br&gt;&amp;gt; make commands, file a issue upstream. If that doesn't work, then
&lt;br&gt;&amp;gt; PURGE_TARGETS is really no more than a
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Have I mentioned that even pacman doesn't support these make commands?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; for file in glob_exp; do
&lt;br&gt;&amp;gt;    rm -f file
&lt;br&gt;&amp;gt; done
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; which is really just a one-liner in a PKGBUILD anyway. Why complicate
&lt;br&gt;&amp;gt; the matter?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Actually it's a 3-liner per `something_package` function, in every
&lt;br&gt;PKGBUILD, instead of a true 1-liner in every function in every
&lt;br&gt;PKGBUILD.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; -Dan
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Guys, as developers of makepkg, you really have something against
&lt;br&gt;extensions that would allow writing simpler or more versatile
&lt;br&gt;PKGBUILD's...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; For example, below is one of my PKGBUILDS, that uses what I call a
&lt;br&gt;&amp;quot;template&amp;quot;, which allows me to abstract away patching, calling
&lt;br&gt;configure, and make. And in order to support this split of packages,
&lt;br&gt;all I have to do is update my `configure+make+make-install` script to
&lt;br&gt;understand this, and just put `pkgname=( isync-bin isync-doc )`.
&lt;br&gt;(Unfortunately this doesn't have a lib or dev).
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; My `configure+make+make-install` just implements `build` and
&lt;br&gt;`package` functions that use the variables defined in the PKGBUILD,
&lt;br&gt;with some sensible defaults. (I think this resembles somehow GoboLinux
&lt;br&gt;recipies...)
&lt;br&gt;&lt;br&gt;~~~~
&lt;br&gt;. &amp;quot;${pkgbuild_tools_root}/configure+make+make-install&amp;quot;
&lt;br&gt;&lt;br&gt;pkgname=( isync )
&lt;br&gt;_pkgver=1.0.4
&lt;br&gt;_pkgpatch=+1
&lt;br&gt;pkgver=&amp;quot;${_pkgver}${_pkgpatch}&amp;quot;
&lt;br&gt;pkgrel=1
&lt;br&gt;&lt;br&gt;depends=()
&lt;br&gt;makedepends=(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; openssl db
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gcc binutils glibc
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; make coreutils bash
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sed grep patch
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;_declare_arch
&lt;br&gt;_declare_paths
&lt;br&gt;_declare_build_environment
&lt;br&gt;_declare_configure_options
&lt;br&gt;&lt;br&gt;_configure_options=(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;${_configure_options[@]}&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --disable-compat
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;_LIBS=(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;${_LIBS[@]}&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -static
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -ldb -lpthread
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;_src_patches=(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imap_recursive_maildir.patch
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imap_certificate_ignore.patch
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;source=(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;&lt;a href=&quot;http://switch.dl.sourceforge.net/project/isync/isync/$&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://switch.dl.sourceforge.net/project/isync/isync/$&lt;/a&gt;{_pkgver}/isync-${_pkgver}.tar.gz&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imap_recursive_maildir.patch
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imap_certificate_ignore.patch
&lt;br&gt;)
&lt;br&gt;md5sums=(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8a836a6f4b43cd38a8b8153048417616
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fd42b61f2979d2bf2d08f1528a292ec5
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; efbe84127425024676b07c2fdef87a98
&lt;br&gt;)
&lt;br&gt;~~~~
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; But as I said, no problem, I'll just hack my own makepkg that
&lt;br&gt;understands something similar with PKGBUILDS, and extended with these
&lt;br&gt;recipies.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Thanks,
&lt;br&gt;&amp;nbsp; &amp;nbsp; Ciprian.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inside-PKGBUILD-customizable-makepkg-PURGE_TARGETS-tp26613188p26620974.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26620798</id>
	<title>Re: [PATCH 3/3] makepkg: document environment variables PKGDEST and SRCDEST</title>
	<published>2009-12-02T20:19:34Z</published>
	<updated>2009-12-02T20:19:34Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Cedric Staniewski wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26620798&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---
&lt;br&gt;&amp;gt; &amp;nbsp;doc/makepkg.8.txt | &amp;nbsp; 15 +++++++++++++++
&lt;br&gt;&amp;gt; &amp;nbsp;1 files changed, 15 insertions(+), 0 deletions(-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; index 703c1b0..ccb9a28 100644
&lt;br&gt;&amp;gt; --- a/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; +++ b/doc/makepkg.8.txt
&lt;br&gt;&amp;gt; @@ -170,6 +170,21 @@ Environment Variables
&lt;br&gt;&amp;gt; &amp;nbsp;	must be supported by this command. If the variable is not set or
&lt;br&gt;&amp;gt; &amp;nbsp;	empty, makepkg will fall back to `pacman'.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; +**PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt; +	If this value is not set, packages will by default be placed in the
&lt;br&gt;&amp;gt; +	current directory (location of the linkman:PKGBUILD[5]). Many people
&lt;br&gt;&amp;gt; +	like to keep all their packages in one place so this option allows
&lt;br&gt;&amp;gt; +	this behavior. A common location is ``/home/packages''.
&lt;br&gt;&amp;gt; +	This environment variable will override the corresponding value
&lt;br&gt;&amp;gt; +	defined in linkman:makepkg.conf[5].
&lt;/div&gt;&lt;br&gt;I do not like the repetition of makepkg.conf.5 here. &amp;nbsp;I'd prefer just
&lt;br&gt;**PKGDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Overrides the corresponding value defined in linkman:makepkg.conf[5].
&lt;br&gt;&lt;br&gt;Or something quite simple like that. &amp;nbsp;People can then look up 
&lt;br&gt;makepkg.conf.5 to find out what the variable does.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; +
&lt;br&gt;&amp;gt; +**SRCDEST=**&amp;quot;/path/to/folder&amp;quot;::
&lt;br&gt;&amp;gt; +	If this value is not set, downloaded source files will only be stored
&lt;br&gt;&amp;gt; +	in the current directory. Many people like to keep all source files in
&lt;br&gt;&amp;gt; +	a central location for easy cleanup, so this path can be set here.
&lt;br&gt;&amp;gt; +	This environment variable will override the corresponding value
&lt;br&gt;&amp;gt; +	defined in linkman:makepkg.conf[5].
&lt;br&gt;&amp;gt; +
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;Additional Features
&lt;br&gt;&amp;gt; &amp;nbsp;-------------------
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-1-2--makepkg%3A-move-pacman-calls-to-a-function-tp26237691p26620798.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26620749</id>
	<title>Re: [PATCH] makepkg: remove srclinks directory on error exit</title>
	<published>2009-12-02T20:08:50Z</published>
	<updated>2009-12-02T20:08:50Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Cedric Staniewski wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; When makepkg exits in create_srcpackage(), the (temporary) srclinks
&lt;br&gt;&amp;gt; directory is left behind.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26620749&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---
&lt;br&gt;&amp;gt; &amp;nbsp;scripts/makepkg.sh.in | &amp;nbsp; &amp;nbsp;1 +
&lt;br&gt;&amp;gt; &amp;nbsp;1 files changed, 1 insertions(+), 0 deletions(-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt; index ceaa8a6..b618881 100644
&lt;br&gt;&amp;gt; --- a/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt; +++ b/scripts/makepkg.sh.in
&lt;br&gt;&amp;gt; @@ -118,6 +118,7 @@ trap_exit() {
&lt;br&gt;&amp;gt; &amp;nbsp;		echo
&lt;br&gt;&amp;gt; &amp;nbsp;		error &amp;quot;$@&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;	fi
&lt;br&gt;&amp;gt; +	[[ -n $srclinks ]] &amp;&amp; rm -rf &amp;quot;$srclinks&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;	exit 1
&lt;br&gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;/div&gt;&lt;br&gt;I am not sure about this as if the source package creation fails, I 
&lt;br&gt;would like to be able to look in the directory to track down why. &amp;nbsp;Much 
&lt;br&gt;like how &amp;quot;-c&amp;quot; does not clear the source directory on a build failure. 
&lt;br&gt;So my initial reaction is a -1.
&lt;br&gt;&lt;br&gt;As an aside, did you actually encounter an error during source package 
&lt;br&gt;creation or just note that could be left behind from the code?
&lt;br&gt;&lt;br&gt;Allan
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-remove-srclinks-directory-on-error-exit-tp26613542p26620749.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26619576</id>
	<title>Re: [PATCH] makepkg: check for references to build	root in package</title>
	<published>2009-12-02T17:24:57Z</published>
	<updated>2009-12-02T17:24:57Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Dan McGee wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, Dec 2, 2009 at 12:17 PM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26619576&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; On 10/28/2009 10:07 PM, Jeff wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Mon, Oct 26, 2009 at 09:08:21AM +1000, Allan McRae wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I have adjusted the patch to use Cedric's syntax now that it is working
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; for me.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; FWIW, you can also make the line a tad shorter by using grep's -q
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; instead of &amp;&amp;gt;/dev/null.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I noticed this patch (latest revision[1]) has not made it into master yet...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [1]
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://projects.archlinux.org/users/allan/pacman.git/commit/?id=ce40da51611bf6dc236d814894fc90bd624bdc2f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://projects.archlinux.org/users/allan/pacman.git/commit/?id=ce40da51611bf6dc236d814894fc90bd624bdc2f&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm not convinced on this one as it has to scan the entire pkg/
&lt;br&gt;&amp;gt; directory, which for some things, could be gigantic (icc,
&lt;br&gt;&amp;gt; go-openoffice, etc.). Am I being over-performance crazy? I guess the
&lt;br&gt;&amp;gt; zip is going to do it too...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; To me this seems way outside the realm of makepkg and belongs in namcap.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;/div&gt;&lt;br&gt;The problem with this is that namcap does not know anything about 
&lt;br&gt;$srcdir (and how can it) so cannot check for references to it. &amp;nbsp;This is 
&lt;br&gt;unlike the check for missing backup files that is already in 
&lt;br&gt;check_package() which should probably be in namcap...
&lt;br&gt;&lt;br&gt;I also tested this in large packages (e.g. openoffice) and on my system 
&lt;br&gt;(2GHz) it takes ~10sec which is a very small fraction of the build time.
&lt;br&gt;&lt;br&gt;As an aside, extracting and grepping through the entire core+extra+some 
&lt;br&gt;of community takes me ~10min. &amp;nbsp;Per package this is a tiny amount of time 
&lt;br&gt;and includes extraction of tarball and not having files in the cache.
&lt;br&gt;&lt;br&gt;Allan
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-check-for-references-to-build-root-in-package-tp26039741p26619576.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26619312</id>
	<title>Re: [PATCH] makepkg: check for references to build root in package</title>
	<published>2009-12-02T16:50:17Z</published>
	<updated>2009-12-02T16:50:17Z</updated>
	<author>
		<name>Dan McGee</name>
	</author>
	<content type="html">On Wed, Dec 2, 2009 at 12:17 PM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26619312&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 10/28/2009 10:07 PM, Jeff wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Oct 26, 2009 at 09:08:21AM +1000, Allan McRae wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have adjusted the patch to use Cedric's syntax now that it is working
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; for me.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; FWIW, you can also make the line a tad shorter by using grep's -q
&lt;br&gt;&amp;gt;&amp;gt; instead of &amp;&amp;gt;/dev/null.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I noticed this patch (latest revision[1]) has not made it into master yet...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [1]
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://projects.archlinux.org/users/allan/pacman.git/commit/?id=ce40da51611bf6dc236d814894fc90bd624bdc2f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://projects.archlinux.org/users/allan/pacman.git/commit/?id=ce40da51611bf6dc236d814894fc90bd624bdc2f&lt;/a&gt;&lt;/div&gt;&lt;br&gt;I'm not convinced on this one as it has to scan the entire pkg/
&lt;br&gt;directory, which for some things, could be gigantic (icc,
&lt;br&gt;go-openoffice, etc.). Am I being over-performance crazy? I guess the
&lt;br&gt;zip is going to do it too...
&lt;br&gt;&lt;br&gt;To me this seems way outside the realm of makepkg and belongs in namcap.
&lt;br&gt;&lt;br&gt;-Dan
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--makepkg%3A-check-for-references-to-build-root-in-package-tp26039741p26619312.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26619298</id>
	<title>Re: [PATCH] docs: set text width to 72 in vim directive</title>
	<published>2009-12-02T16:47:41Z</published>
	<updated>2009-12-02T16:47:41Z</updated>
	<author>
		<name>Dan McGee</name>
	</author>
	<content type="html">On Wed, Dec 2, 2009 at 12:05 PM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26619298&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;A &amp;quot;why&amp;quot; in the commit message would be awfully nice, I'm confused here. :)
&lt;br&gt;&lt;br&gt;&amp;gt; Signed-off-by: Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26619298&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--docs%3A-set-text-width-to-72-in-vim-directive-tp26613535p26619298.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26619252</id>
	<title>Re: makepkg in a constrained environment</title>
	<published>2009-12-02T16:41:51Z</published>
	<updated>2009-12-02T16:41:51Z</updated>
	<author>
		<name>Dan McGee</name>
	</author>
	<content type="html">On Wed, Dec 2, 2009 at 2:47 PM, Ciprian Dorin, Craciun
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26619252&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ciprian.craciun@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;    Looking closer at what the mentioned patch introduced:
&lt;br&gt;&amp;gt; ~~~~
&lt;br&gt;&amp;gt; - local sum=&amp;quot;$(${integ}sum &amp;quot;$file&amp;quot; | cut -d ' ' -f 1)&amp;quot;
&lt;br&gt;&amp;gt; + local sum=&amp;quot;$(openssl dgst -${integ} &amp;quot;$file&amp;quot; | awk '{print $NF}')&amp;quot;
&lt;br&gt;&amp;gt; ~~~~
&lt;br&gt;&amp;gt;    I'm proposing not to get back to what it has been (which assumed
&lt;br&gt;&amp;gt; that there was a md5sum sha128sum, &amp;lt;something-else&amp;gt;sum), but I'm
&lt;br&gt;&amp;gt; proposing that for md5 we should use md5sum, which I'm sure it exists
&lt;br&gt;&amp;gt; on any UNIX. Or better even, try to see if openssl exists, if not
&lt;br&gt;&amp;gt; falling back to md5sum, at least for md5sums...
&lt;/div&gt;&lt;br&gt;As a side note, it doesn't exist on all UNIX-y systems, for example on
&lt;br&gt;Mac OS X- there is a /sbin/md5, but not an md5sum command.
&lt;br&gt;&lt;br&gt;-Dan
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/makepkg-in-a-constrained-environment-tp26607106p26619252.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26619233</id>
	<title>Re: inside PKGBUILD customizable makepkg PURGE_TARGETS</title>
	<published>2009-12-02T16:39:29Z</published>
	<updated>2009-12-02T16:39:29Z</updated>
	<author>
		<name>Dan McGee</name>
	</author>
	<content type="html">On Wed, Dec 2, 2009 at 3:48 PM, Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26619233&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Ciprian Dorin, Craciun wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    Hello all!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    Again I have a proposal to enhance makepkg PURGE_TARGETS handling.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    I think that enabling customizing PURGE_TARGETS inside PKGBUILD
&lt;br&gt;&amp;gt;&amp;gt; would be a benefit in the following context:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Without checking, I would have thought that exporting &amp;quot;PURGE_TRAGETS=...&amp;quot;
&lt;br&gt;&amp;gt; within a package function would just work.  I guess the old value would not
&lt;br&gt;&amp;gt; be restored afterwards though.
&lt;/div&gt;&lt;br&gt;This seems like complete overkill for makepkg to support. I'm -1 on this.
&lt;br&gt;&lt;br&gt;If upstream builds can't get their act together and provide individual
&lt;br&gt;make commands, file a issue upstream. If that doesn't work, then
&lt;br&gt;PURGE_TARGETS is really no more than a
&lt;br&gt;&lt;br&gt;for file in glob_exp; do
&lt;br&gt;&amp;nbsp; &amp;nbsp; rm -f file
&lt;br&gt;done
&lt;br&gt;&lt;br&gt;which is really just a one-liner in a PKGBUILD anyway. Why complicate
&lt;br&gt;the matter?
&lt;br&gt;&lt;br&gt;-Dan
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inside-PKGBUILD-customizable-makepkg-PURGE_TARGETS-tp26613188p26619233.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26617512</id>
	<title>Re: inside PKGBUILD customizable makepkg PURGE_TARGETS</title>
	<published>2009-12-02T14:17:23Z</published>
	<updated>2009-12-02T14:17:23Z</updated>
	<author>
		<name>Ciprian Dorin, Craciun</name>
	</author>
	<content type="html">On Wed, Dec 2, 2009 at 11:48 PM, Allan McRae &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26617512&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allan@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Ciprian Dorin, Craciun wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    Hello all!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    Again I have a proposal to enhance makepkg PURGE_TARGETS handling.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    I think that enabling customizing PURGE_TARGETS inside PKGBUILD
&lt;br&gt;&amp;gt;&amp;gt; would be a benefit in the following context:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Without checking, I would have thought that exporting &amp;quot;PURGE_TRAGETS=...&amp;quot;
&lt;br&gt;&amp;gt; within a package function would just work.  I guess the old value would not
&lt;br&gt;&amp;gt; be restored afterwards though.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    * I have a software package that contains: an application, a
&lt;br&gt;&amp;gt;&amp;gt; static library, a dynamic library, and some development files;
&lt;br&gt;&amp;gt;&amp;gt;    * I want to create separate packages: something-bin, something-lib
&lt;br&gt;&amp;gt;&amp;gt; (shared library), something-dev (include and static library), and
&lt;br&gt;&amp;gt;&amp;gt; maybe something-doc;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;    What I have to do today (maybe there is a different way, please
&lt;br&gt;&amp;gt;&amp;gt; correct me): I create a `something-lib_package` function in which I
&lt;br&gt;&amp;gt;&amp;gt; make a normal install, but then I delete all unneeded files.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Given this is a fairly common thing to do in the Linux world, most software
&lt;br&gt;&amp;gt; supports this in the Makefiles. &amp;quot;make install-libs&amp;quot; &amp;quot;make install-docs&amp;quot; etc.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Unfortunately not all open source software behaves as nice as
&lt;br&gt;this... (Actually my experience is on the contrary.)
&lt;br&gt;&amp;nbsp; &amp;nbsp; :) As trivia, even pacman doesn't support install-docs, or
&lt;br&gt;install-libs target.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; So a simple solution to this problem, that can be applied as a
&lt;br&gt;recipe for most packages, would be: just let the package install as it
&lt;br&gt;wants, and then we'll trim off what we don't want.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Ciprian.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inside-PKGBUILD-customizable-makepkg-PURGE_TARGETS-tp26613188p26617512.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26617056</id>
	<title>Re: inside PKGBUILD customizable makepkg PURGE_TARGETS</title>
	<published>2009-12-02T13:48:05Z</published>
	<updated>2009-12-02T13:48:05Z</updated>
	<author>
		<name>Allan McRae-3</name>
	</author>
	<content type="html">Ciprian Dorin, Craciun wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Hello all!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Again I have a proposal to enhance makepkg PURGE_TARGETS handling.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I think that enabling customizing PURGE_TARGETS inside PKGBUILD
&lt;br&gt;&amp;gt; would be a benefit in the following context:
&lt;br&gt;&lt;br&gt;Without checking, I would have thought that exporting 
&lt;br&gt;&amp;quot;PURGE_TRAGETS=...&amp;quot; within a package function would just work. &amp;nbsp;I guess 
&lt;br&gt;the old value would not be restored afterwards though.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; * I have a software package that contains: an application, a
&lt;br&gt;&amp;gt; static library, a dynamic library, and some development files;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; * I want to create separate packages: something-bin, something-lib
&lt;br&gt;&amp;gt; (shared library), something-dev (include and static library), and
&lt;br&gt;&amp;gt; maybe something-doc;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; What I have to do today (maybe there is a different way, please
&lt;br&gt;&amp;gt; correct me): I create a `something-lib_package` function in which I
&lt;br&gt;&amp;gt; make a normal install, but then I delete all unneeded files.
&lt;br&gt;&lt;br&gt;Given this is a fairly common thing to do in the Linux world, most 
&lt;br&gt;software supports this in the Makefiles. &amp;quot;make install-libs&amp;quot; &amp;quot;make 
&lt;br&gt;install-docs&amp;quot; etc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inside-PKGBUILD-customizable-makepkg-PURGE_TARGETS-tp26613188p26617056.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26616817</id>
	<title>Re: makepkg in a constrained environment</title>
	<published>2009-12-02T13:30:36Z</published>
	<updated>2009-12-02T13:30:36Z</updated>
	<author>
		<name>Ciprian Dorin, Craciun</name>
	</author>
	<content type="html">On Wed, Dec 2, 2009 at 11:16 PM, Xavier &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26616817&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shiningxc@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, Dec 2, 2009 at 3:58 PM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26616817&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I do not agree with your definition of &amp;quot;portable&amp;quot; here. All of makepkgs
&lt;br&gt;&amp;gt;&amp;gt; dependencies are available for (mostly?) every system pacman can run on,
&lt;br&gt;&amp;gt;&amp;gt; so it is already &amp;quot;portable&amp;quot;. Adding fallbacks only may make it easier to
&lt;br&gt;&amp;gt;&amp;gt; install/run makepkg in a specific setup.
&lt;br&gt;&amp;gt;&amp;gt; A setup where you cannot install all of makepkg's dependencies with a
&lt;br&gt;&amp;gt;&amp;gt; reasonable effort seems rather exotic to me and does not justify such an
&lt;br&gt;&amp;gt;&amp;gt; inappropriate increase in complexity of makepkg in my opinion.
&lt;br&gt;&amp;gt;&amp;gt; Why do you not write bash wrappers which provide the functionality of
&lt;br&gt;&amp;gt;&amp;gt; bsdtar/openssl/... and add these to your path?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I often agree with Cedric.. this is just another occurence :)
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; :) Ok. Got it: makepkg should make all assumptions possible that
&lt;br&gt;it's working on a fat Linux...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; For the moment, I think that my best option is to write my own makepkg.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Of course I'll write it in any other programming language than
&lt;br&gt;Bash... :) For example I think I'll try rc (Plan9 shell), because it
&lt;br&gt;seems the most sane shell I've ever seen...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Thanks,
&lt;br&gt;&amp;nbsp; &amp;nbsp; Ciprian.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/makepkg-in-a-constrained-environment-tp26607106p26616817.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26616600</id>
	<title>Re: makepkg in a constrained environment</title>
	<published>2009-12-02T13:16:13Z</published>
	<updated>2009-12-02T13:16:13Z</updated>
	<author>
		<name>Xavier Chantry-2</name>
	</author>
	<content type="html">On Wed, Dec 2, 2009 at 3:58 PM, Cedric Staniewski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26616600&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cedric@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I do not agree with your definition of &amp;quot;portable&amp;quot; here. All of makepkgs
&lt;br&gt;&amp;gt; dependencies are available for (mostly?) every system pacman can run on,
&lt;br&gt;&amp;gt; so it is already &amp;quot;portable&amp;quot;. Adding fallbacks only may make it easier to
&lt;br&gt;&amp;gt; install/run makepkg in a specific setup.
&lt;br&gt;&amp;gt; A setup where you cannot install all of makepkg's dependencies with a
&lt;br&gt;&amp;gt; reasonable effort seems rather exotic to me and does not justify such an
&lt;br&gt;&amp;gt; inappropriate increase in complexity of makepkg in my opinion.
&lt;br&gt;&amp;gt; Why do you not write bash wrappers which provide the functionality of
&lt;br&gt;&amp;gt; bsdtar/openssl/... and add these to your path?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;I often agree with Cedric.. this is just another occurence :)
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/makepkg-in-a-constrained-environment-tp26607106p26616600.html" />
</entry>

</feed>
