Re: [pacman-dev] ldconfig runs twice in case of replaces

2008-07-21 Thread Xavier
Nagy Gabor wrote:
 Hi!
 
 I've just discovered that ldconfig runs twice, if the sync transaction
 creates a remove transaction too (%REPLACES%, conflict resolving).
 
 IMHO we should move ldconfig call to trans.c to alpm_trans_commit.
 Opinions?
 

I guess that's fine.

___
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


Re: [pacman-dev] vercmp discussion (was: String freeze for 3.2 release)

2008-07-21 Thread Xavier
On Mon, Jul 21, 2008 at 12:01 PM, Xavier [EMAIL PROTECTED] wrote:
 On Mon, Jul 21, 2008 at 11:25 AM, Xavier [EMAIL PROTECTED] wrote:

 Apparently the static strings were a show stopper to Dan.
 I don't have a problem with static strings, since it removes the
 malloc/free overhead and also simplifies the code.
 As always with dynamic strings, we have the choice between duplicating
 all free calls, or using goto.

 But anyway, here is a new patch using strdup/free instead of static arrays.


 This breaks sync1000, sync1003 and upgrade075 pactest, but I have not
 yet been able to figure out why.


Well I found a fix, which looks correct to me, but I am still highly
confused about why the old vercmp function with static strings worked
fine.
Also, my vercmp function had problems when being called from checkdeps
(which is why it broke the 3 pactests above), and probably the two
arguments of vercmp in this case are dynamic strings.
But it didn't have any problems when being called from the vercmp tool
(src/util/vercmp) which use static strings, because all tests in
pactest/vercmptest still passed fine.

Anyway, after the fix, the calls from checkdeps and vercmp tool both work fine.

diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index d0ca58a..8a36e56 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -593,12 +593,12 @@ int SYMEXPORT alpm_pkg_vercmp(const char *a,
const char *b)

/* lose the release number */
for(one = str1; *one  *one != '-'; one++);
-   if(one) {
+   if(*one) {
*one = '\0';
rel1 = ++one;
}
for(two = str2; *two  *two != '-'; two++);
-   if(two) {
+   if(*two) {
*two = '\0';
rel2 = ++two;
}


0001-Revert-vercmp-code-to-the-old-version.patch
Description: application/mbox
___
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


[pacman-dev] [PATCH] Re-enable --debug with -Sw and -Sp

2008-07-21 Thread Nagy Gabor
From c533684914d28407a0a7399e3026c747987d5de3 Mon Sep 17 00:00:00 2001
From: Nagy Gabor [EMAIL PROTECTED]
Date: Mon, 21 Jul 2008 13:57:02 +0200
Subject: [PATCH] Re-enable --debug with -Sw and -Sp

Commit 874190827676e3a974e8c5fef6c51b9e9d6b60fa disabled --debug in these
cases. We just clear PM_LOG_WARNING flag now.

Signed-off-by: Nagy Gabor [EMAIL PROTECTED]
---
 src/pacman/sync.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index b154b91..20daada 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -740,7 +740,7 @@ int pacman_sync(alpm_list_t *targets)
 
/* Display only errors with -Sp and -Sw operations */
if(config-flags  (PM_TRANS_FLAG_DOWNLOADONLY | 
PM_TRANS_FLAG_PRINTURIS)) {
-   config-logmask = PM_LOG_ERROR;
+   config-logmask = config-logmask  ~PM_LOG_WARNING;
}
 
/* clean the cache */
-- 
1.5.6.3


___
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


Re: [pacman-dev] [translation] Updated Portuguese (Brazil) translation

2008-07-21 Thread Xavier
2008/7/21 Hugo Doria [EMAIL PROTECTED]:
 Updated Portuguese (Brazil) translation.


Ok thanks, I didn't find any problems.
Well, except the [Y/n] question in makepkg that shouldn't be
translated, but I had to fix that in almost every translations anyway
:)
Attaching the corresponding git patch.

This was the only missing translation, so nice job to every
translators for being able to update all languages we had in one week!


0001-Updated-Portuguese-Brazil-translation.patch.gz
Description: GNU Zip compressed data
___
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


Re: [pacman-dev] [PATCH] Re-enable --debug with -Sw and -Sp

2008-07-21 Thread Xavier
On Mon, Jul 21, 2008 at 2:03 PM, Nagy Gabor [EMAIL PROTECTED] wrote:
 From c533684914d28407a0a7399e3026c747987d5de3 Mon Sep 17 00:00:00 2001
 From: Nagy Gabor [EMAIL PROTECTED]
 Date: Mon, 21 Jul 2008 13:57:02 +0200
 Subject: [PATCH] Re-enable --debug with -Sw and -Sp

 Commit 874190827676e3a974e8c5fef6c51b9e9d6b60fa disabled --debug in these
 cases. We just clear PM_LOG_WARNING flag now.

 Signed-off-by: Nagy Gabor [EMAIL PROTECTED]
 ---
  src/pacman/sync.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/src/pacman/sync.c b/src/pacman/sync.c
 index b154b91..20daada 100644
 --- a/src/pacman/sync.c
 +++ b/src/pacman/sync.c
 @@ -740,7 +740,7 @@ int pacman_sync(alpm_list_t *targets)

/* Display only errors with -Sp and -Sw operations */
if(config-flags  (PM_TRANS_FLAG_DOWNLOADONLY | 
 PM_TRANS_FLAG_PRINTURIS)) {
 -   config-logmask = PM_LOG_ERROR;
 +   config-logmask = config-logmask  ~PM_LOG_WARNING;
}

/* clean the cache */
 --
 1.5.6.3



Ooops, debug levels are applied before that code indeed, good catch.

___
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


Re: [pacman-dev] ldconfig runs twice in case of replaces

2008-07-21 Thread Xavier
On Mon, Jul 21, 2008 at 2:05 PM, Nagy Gabor [EMAIL PROTECTED] wrote:
 Nagy Gabor wrote:
  Hi!
 
  I've just discovered that ldconfig runs twice, if the sync
  transaction creates a remove transaction too (%REPLACES%, conflict
  resolving).
 
  IMHO we should move ldconfig call to trans.c to alpm_trans_commit.
  Opinions?
 

 I guess that's fine.


 Hm. This is not so easy... -Sw, -Sp :-/


Congratulations to -Sw and -Sp implementations for causing the biggest
number of annoyances in pacman code.

___
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


Re: [pacman-dev] [PATCH] Re-enable --debug with -Sw and -Sp

2008-07-21 Thread Miklos Vajna
On Mon, Jul 21, 2008 at 02:03:57PM +0200, Nagy Gabor [EMAIL PROTECTED] wrote:
 @@ -740,7 +740,7 @@ int pacman_sync(alpm_list_t *targets)
  
   /* Display only errors with -Sp and -Sw operations */
   if(config-flags  (PM_TRANS_FLAG_DOWNLOADONLY | 
 PM_TRANS_FLAG_PRINTURIS)) {
 - config-logmask = PM_LOG_ERROR;
 + config-logmask = config-logmask  ~PM_LOG_WARNING;
   }
  
   /* clean the cache */

Minor nit: why not using =?


pgpOTpmpqgiG7.pgp
Description: PGP signature
___
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev