Re: [pacman-dev] makepkg -i should fail when packages cannot be installed
Pierre Schmitz wrote:
Hi,
I would file a bug report but somehow...
It seems makepkg -i just throws a warning if it cannot install the package after build. I would prefer if it would at least return something different from 0.
My scripts assume that everything is fine if makepkg retuns 0 and an inter package file conflict wasn't noticed due to the behaviour that makepkg did return 0 even if something went wrong.
Hmmm... there was a bug report that was the opposite. The reasoning here is that makepkg did not fail, rather pacman failed to install the successfully built package. The same occurs when pacman fails to remove deps as asked by makepkg. Allan _________________________________________________________________ Use Hotmail to send and receive mail from your different email accounts. http://clk.atdmt.com/UKM/go/167688463/direct/01/
Am Mittwoch 02 September 2009 01:05:04 schrieb Allan McRae:
Pierre Schmitz wrote:
Hi,
I would file a bug report but somehow...
It seems makepkg -i just throws a warning if it cannot install the package after build. I would prefer if it would at least return something different from 0.
My scripts assume that everything is fine if makepkg retuns 0 and an inter package file conflict wasn't noticed due to the behaviour that makepkg did return 0 even if something went wrong.
Hmmm... there was a bug report that was the opposite.
The reasoning here is that makepkg did not fail, rather pacman failed to install the successfully built package. The same occurs when pacman fails to remove deps as asked by makepkg.
Allan
Well, makepkg -i is makepkg+pacman and one of those fails the whole thing should fail, too. I only ask for the correct return value; makepkg does not need to abort etc.. The point is that the current implementation makes the -i useless for scripting because you cannot check if the install failed or not. -- Pierre Schmitz, http://users.archlinux.de/~pierre
On Wednesday, September 2, 2009, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Mittwoch 02 September 2009 01:05:04 schrieb Allan McRae:
Pierre Schmitz wrote:
Hi,
I would file a bug report but somehow...
It seems makepkg -i just throws a warning if it cannot install the package after build. I would prefer if it would at least return something different from 0.
My scripts assume that everything is fine if makepkg retuns 0 and an inter package file conflict wasn't noticed due to the behaviour that makepkg did return 0 even if something went wrong.
Hmmm... there was a bug report that was the opposite.
The reasoning here is that makepkg did not fail, rather pacman failed to install the successfully built package. The same occurs when pacman fails to remove deps as asked by makepkg.
Allan
Well, makepkg -i is makepkg+pacman and one of those fails the whole thing should fail, too. I only ask for the correct return value; makepkg does not need to abort etc.. The point is that the current implementation makes the -i useless for scripting because you cannot check if the install failed or not.
--
Pierre Schmitz, http://users.archlinux.de/~pierre
Why use -i at all then? Since you want to check the install, shouldn't that be a seperate step in your script? E.g. Run makepkg, check for a 0 return, then run pacman and check for a 0 return. -Dan
Am Donnerstag 03 September 2009 00:02:03 schrieb Dan McGee:
Why use -i at all then? Since you want to check the install, shouldn't that be a seperate step in your script? E.g. Run makepkg, check for a 0 return, then run pacman and check for a 0 return.
Sure, that simple to implement, that's not my point. I just thought this might not be right in makepkg. -- Pierre Schmitz, http://users.archlinux.de/~pierre
On Wed, Sep 2, 2009 at 5:11 PM, Pierre Schmitz<pierre@archlinux.de> wrote:
Am Donnerstag 03 September 2009 00:02:03 schrieb Dan McGee:
Why use -i at all then? Since you want to check the install, shouldn't that be a seperate step in your script? E.g. Run makepkg, check for a 0 return, then run pacman and check for a 0 return.
Sure, that simple to implement, that's not my point. I just thought this might not be right in makepkg.
I can see both sides here, so I have nothing to add, really. The return of makepkg, to me, indicates that "makepkg failed", not "something failed". However, if installation of the package actually fails, it _might_ be synonymous with "this package is borked" which would, in turn, indicate a makepkg issue.
Aaron Griffin wrote:
On Wed, Sep 2, 2009 at 5:11 PM, Pierre Schmitz<pierre@archlinux.de> wrote:
Am Donnerstag 03 September 2009 00:02:03 schrieb Dan McGee:
Why use -i at all then? Since you want to check the install, shouldn't that be a seperate step in your script? E.g. Run makepkg, check for a 0 return, then run pacman and check for a 0 return.
Sure, that simple to implement, that's not my point. I just thought this might not be right in makepkg.
I can see both sides here, so I have nothing to add, really. The return of makepkg, to me, indicates that "makepkg failed", not "something failed". However, if installation of the package actually fails, it _might_ be synonymous with "this package is borked" which would, in turn, indicate a makepkg issue.
There is a whole heap of notes in makepkg in the form "TODO: error code". When someone gets around to implementing those, I guess we can add error codes for things like -i. At the moment every error returns 1, so "good" and "bad" errors are hard to distinguish. So, this can be revisited in the future... Allan
participants (5)
-
Aaron Griffin
-
Allan McRae
-
Allan McRae
-
Dan McGee
-
Pierre Schmitz