public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: repoman/
Date: Tue, 14 Nov 2017 21:46:43 +0000 (UTC)	[thread overview]
Message-ID: <1510694053.4c4559f45b653a6b816ae66b1a6c4e7dd2ef7e8c.zmedico@gentoo> (raw)

commit:     4c4559f45b653a6b816ae66b1a6c4e7dd2ef7e8c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 14 21:11:22 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov 14 21:14:13 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4c4559f4

repoman/setup.py: create pym -> lib symlink for unit tests (bug 637460)

Various code involving the .repoman_not_installed file assumes
that the 'pym' directory should be added to sys.path, therefore
create a pym -> lib symlink during unit tests.

Bug: https://bugs.gentoo.org/637460

 repoman/setup.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/repoman/setup.py b/repoman/setup.py
index 6411231e0..ce0bc493a 100755
--- a/repoman/setup.py
+++ b/repoman/setup.py
@@ -147,6 +147,11 @@ class x_clean(clean):
 			print('removing %s symlink' % repr(conf_dir))
 			os.unlink(conf_dir)
 
+		pym_dir = os.path.join(top_dir, 'pym')
+		if os.path.islink(pym_dir):
+			print('removing %s sylink' % repr(pym_dir))
+			os.unlink(pym_dir)
+
 		pni_file = os.path.join(top_dir, '.repoman_not_installed')
 		if os.path.exists(pni_file):
 			print('removing %s' % repr(pni_file))
@@ -393,6 +398,17 @@ class build_tests(x_build_scripts_custom):
 		print('Symlinking %s -> %s' % (conf_dir, conf_src))
 		os.symlink(conf_src, conf_dir)
 
+		# symlink 'pym' directory
+		pym_dir = os.path.join(self.top_dir, 'pym')
+		if os.path.exists(pym_dir):
+			if not os.path.islink(pym_dir):
+				raise SystemError('%s exists and is not a symlink (collision)'
+					% repr(pym_dir))
+			os.unlink(pym_dir)
+		pym_src = 'lib'
+		print('Symlinking %s -> %s' % (pym_dir, pym_src))
+		os.symlink(pym_src, pym_dir)
+
 		# create $build_lib/../.repoman_not_installed
 		# to enable proper paths in tests
 		with open(os.path.join(self.top_dir, '.repoman_not_installed'), 'w'):


             reply	other threads:[~2017-11-14 21:46 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 21:46 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-05 21:08 [gentoo-commits] proj/portage:master commit in: repoman/ Zac Medico
2021-04-19  8:13 Zac Medico
2021-03-29  7:54 Zac Medico
2020-10-18  8:29 Zac Medico
2020-08-19  5:43 Zac Medico
2020-08-17  6:13 Zac Medico
2020-06-23  5:00 Zac Medico
2020-03-25 20:57 Zac Medico
2020-03-15  2:09 Zac Medico
2019-12-06  7:55 Zac Medico
2019-11-27  4:21 Zac Medico
2019-11-09  6:01 Zac Medico
2019-08-05  6:22 Zac Medico
2019-06-23 18:20 Zac Medico
2019-06-20  1:18 Zac Medico
2019-06-03 22:24 Zac Medico
2019-05-26  7:56 Zac Medico
2018-11-04  3:42 Zac Medico
2018-09-22  9:44 Zac Medico
2018-07-16  7:14 Zac Medico
2018-03-30  7:00 Zac Medico
2018-03-30  5:20 [gentoo-commits] proj/portage:repoman " Zac Medico
2018-03-30  4:23 ` [gentoo-commits] proj/portage:master " Zac Medico
2018-03-30  4:23 Zac Medico
2018-03-28  7:52 Zac Medico
2017-11-14 21:51 Zac Medico
2017-11-14  5:02 Zac Medico
2017-11-14  5:02 Zac Medico
2017-10-23 22:37 Brian Dolbec
2017-07-18 23:08 Brian Dolbec
2017-03-01 22:45 Brian Dolbec
2017-03-01 22:18 Zac Medico
2016-12-12  1:30 Brian Dolbec
2016-12-06  3:54 Brian Dolbec
2016-06-23 18:01 Brian Dolbec
2016-05-15 23:51 Brian Dolbec
2016-05-15 18:34 [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-05-15 23:51 ` [gentoo-commits] proj/portage:master " Brian Dolbec
2016-05-14 20:23 [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-05-15 23:51 ` [gentoo-commits] proj/portage:master " Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1510694053.4c4559f45b653a6b816ae66b1a6c4e7dd2ef7e8c.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox