From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-706312-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id E8BC813877A
	for <garchives@archives.gentoo.org>; Mon, 23 Jun 2014 22:06:46 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A1E4FE09CB;
	Mon, 23 Jun 2014 22:06:45 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id CDB93E09C1
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 Jun 2014 22:06:44 +0000 (UTC)
Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 04E9833FFA8
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 Jun 2014 22:06:44 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by spoonbill.gentoo.org (Postfix) with ESMTP id C577419064
	for <gentoo-commits@lists.gentoo.org>; Mon, 23 Jun 2014 22:06:42 +0000 (UTC)
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org>
Message-ID: <1403561118.96dc776787d23238a4e8dfedc4514911a3d84c37.robbat2@gentoo>
Subject: [gentoo-commits] proj/genkernel:master commit in: /
X-VCS-Repository: proj/genkernel
X-VCS-Files: gen_cmdline.sh
X-VCS-Directories: /
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: 96dc776787d23238a4e8dfedc4514911a3d84c37
X-VCS-Branch: master
Date: Mon, 23 Jun 2014 22:06:42 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: c7a7b4e5-4ea5-4b6a-b4fb-9e80b2033045
X-Archives-Hash: 1361022a2e772cb0077500a5dd68b402

commit:     96dc776787d23238a4e8dfedc4514911a3d84c37
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 23 21:56:17 2014 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Jun 23 22:05:18 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=96dc7767

gen_cmdline: fix pkg path getting stuff deleted

If you pass --minkernpackage=X, --modulespackage=X or --kerncache=X with
a relative path, then it's creates the output file in a temporary
working dir that is later removed during cleanup.

Resolve the paths during argument parsing to prevent this.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

---
 gen_cmdline.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index ca6cbcf..6ef6ae0 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -501,14 +501,17 @@ parse_cmdline() {
 			;;
 		--minkernpackage=*)
 			CMD_MINKERNPACKAGE=`parse_opt "$*"`
+			[ ${CMD_MINKERNPACKAGE:0:1} != / ] && CMD_MINKERNPACKAGE=$PWD/$CMD_MINKERNPACKAGE
 			print_info 2 "MINKERNPACKAGE: ${CMD_MINKERNPACKAGE}"
 			;;
 		--modulespackage=*)
 			CMD_MODULESPACKAGE=`parse_opt "$*"`
+			[ ${CMD_MODULESPACKAGE:0:1} != / ] && CMD_MODULESPACKAGE=$PWD/$CMD_MODULESPACKAGE
 			print_info 2 "MODULESPACKAGE: ${CMD_MODULESPACKAGE}"
 			;;
 		--kerncache=*)
 			CMD_KERNCACHE=`parse_opt "$*"`
+			[ ${CMD_KERNCACHE:0:1} != / ] && CMD_KERNCACHE=$PWD/$CMD_KERNCACHE
 			print_info 2 "KERNCACHE: ${CMD_KERNCACHE}"
 			;;
 		--kernname=*)