public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH 1/2] quickpkg: revert accidental changes to "protect" function (bug 628010)
@ 2017-08-16 22:19 Zac Medico
  2017-08-16 22:19 ` [gentoo-portage-dev] [PATCH 2/2] quickpkg: revert premature return from quickpkg_atom (bug 628060) Zac Medico
  0 siblings, 1 reply; 2+ messages in thread
From: Zac Medico @ 2017-08-16 22:19 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

Revert accidental changes to the "protect" function's return value
that were mixed in with changes to the "quickpkg_atom" function's
return value.

Fixes: cff2c0149142 ("Support different compressors for binary packages")
X-Gentoo-bug: 628010
X-Gentoo-bug-url: https://bugs.gentoo.org/628010
---
 bin/quickpkg | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/quickpkg b/bin/quickpkg
index 392e9da22..3094dd0ae 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -111,16 +111,16 @@ def quickpkg_atom(options, infos, arg, eout):
 					in settings.features))
 				def protect(filename):
 					if not confprot.isprotected(filename):
-						return 1
+						return False
 					if include_unmodified_config:
 						file_data = contents[filename]
 						if file_data[0] == "obj":
 							orig_md5 = file_data[2].lower()
 							cur_md5 = perform_md5(filename, calc_prelink=1)
 							if orig_md5 == cur_md5:
-								return 1
+								return False
 					excluded_config_files.append(filename)
-					return os.EX_OK
+					return True
 			existing_metadata = dict(zip(fix_metadata_keys,
 				vardb.aux_get(cpv, fix_metadata_keys)))
 			category, pf = portage.catsplit(cpv)
-- 
2.13.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-portage-dev] [PATCH 2/2] quickpkg: revert premature return from quickpkg_atom (bug 628060)
  2017-08-16 22:19 [gentoo-portage-dev] [PATCH 1/2] quickpkg: revert accidental changes to "protect" function (bug 628010) Zac Medico
@ 2017-08-16 22:19 ` Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2017-08-16 22:19 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

Revert premature return from the quickpkg_atom function for atoms
that match multiple slots. This fixes it to create packages for
all matched slots, rather than just the lowest version.

Fixes: cff2c0149142 ("Support different compressors for binary packages")
X-Gentoo-bug: 628060
X-Gentoo-bug-url: https://bugs.gentoo.org/628060
---
 bin/quickpkg | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/quickpkg b/bin/quickpkg
index 3094dd0ae..81d6afa08 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -66,6 +66,7 @@ def quickpkg_atom(options, infos, arg, eout):
 
 	matches = vardb.match(atom)
 	pkgs_for_arg = 0
+	retval = 0
 	for cpv in matches:
 		excluded_config_files = []
 		dblnk = vardb._dblink(cpv)
@@ -177,20 +178,19 @@ def quickpkg_atom(options, infos, arg, eout):
 			eout.eerror(str(e))
 			del e
 			eout.eerror("Failed to create package: '%s'" % binpkg_path)
-			return 1
+			retval |= 1
 		else:
 			eout.eend(0)
 			infos["successes"].append((cpv, s.st_size))
 			infos["config_files_excluded"] += len(excluded_config_files)
 			for filename in excluded_config_files:
 				eout.ewarn("Excluded config: '%s'" % filename)
-			return os.EX_OK
 	if not pkgs_for_arg:
 		eout.eerror("Could not find anything " + \
 			"to match '%s'; skipping" % arg)
 		infos["missing"].append(arg)
-		return 1
-	return os.EX_OK
+		retval |= 1
+	return retval
 
 def quickpkg_set(options, infos, arg, eout):
 	eroot = portage.settings['EROOT']
-- 
2.13.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-16 22:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 22:19 [gentoo-portage-dev] [PATCH 1/2] quickpkg: revert accidental changes to "protect" function (bug 628010) Zac Medico
2017-08-16 22:19 ` [gentoo-portage-dev] [PATCH 2/2] quickpkg: revert premature return from quickpkg_atom (bug 628060) Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox