doebuild: always return success for listonly mode
authorZac Medico <zmedico@gentoo.org>
Tue, 1 Feb 2011 09:54:01 +0000 (01:54 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 1 Feb 2011 09:54:01 +0000 (01:54 -0800)
This compensates for changed fetch() return value in commit
394cd4a00d37fd078f8dd40f89f8c810355d7816, which serves to
trigger the pkg_nofetch phase inside doebuild().

pym/portage/package/ebuild/doebuild.py

index 6fc7489aa7317a38de17091f976b1b8a3bc6a0a6..bbc3a4a128eb737beb970e4d0c8c94c9ea243f07 100644 (file)
@@ -737,6 +737,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                        if not fetch(fetchme, mysettings, listonly=listonly,
                                fetchonly=fetchonly):
                                spawn_nofetch(mydbapi, myebuild, settings=mysettings)
+                               if listonly:
+                                       # The convention for listonly mode is to report
+                                       # success in any case, even though fetch() may
+                                       # return unsuccessfully in order to trigger the
+                                       # nofetch phase.
+                                       return 0
                                return 1
 
                if mydo == "fetch":