FS#7189 - return code incorrect for removing missing packages
Attached to Project:
Pacman
Opened by james meyer (jams) - Thursday, 17 May 2007, 16:39 GMT
Last edited by Dan McGee (toofishes) - Thursday, 31 May 2007, 05:25 GMT
Opened by james meyer (jams) - Thursday, 17 May 2007, 16:39 GMT
Last edited by Dan McGee (toofishes) - Thursday, 31 May 2007, 05:25 GMT
|
Details
Summary and Info:
With pacman 2.9.8 an attempt to remove a package that is not on the system would give a return value of non 0. Pacman 3.0.4 will give an return code of 0. #####pacman 2.9.8 [root@fireball ~]# pacman -Q mysql-clientsa Package "mysql-clientsa" was not found. [root@fireball ~]# echo $? 2 ######pacman 3.0.4 [root@Gluttony ~]# pacman -Q mysql-clientsa error: package "mysql-clientsa" not found [root@Gluttony ~]# echo $? 0 Steps to Reproduce: |
This task depends upon
Closed by Dan McGee (toofishes)
Thursday, 31 May 2007, 05:25 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in GIT
Thursday, 31 May 2007, 05:25 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in GIT
Part of my script does a query to see if the package is installed before it attempts to remove it. Apparently i was thinking of the end result vs the actually problem.
"pacman -Q existingA existingB nonexistent existingC"
would output the first two, then fail, and never output the third. What should be the return code in this case? return non-0 is ANY failed? Does that seem right?