1 |
commit: 3b44feaf636c5c72b841d03bcf179968421fc35d |
2 |
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 30 23:20:38 2016 +0000 |
4 |
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 30 23:20:38 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b44feaf |
7 |
|
8 |
Adds patch to check for the existence of repos.conf file, bug #574188 |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
|
12 |
.../layman/files/layman-2.3.0-dir_check.patch | 31 ++++++++++++++++++++++ |
13 |
app-portage/layman/layman-2.3.0-r1.ebuild | 1 + |
14 |
2 files changed, 32 insertions(+) |
15 |
|
16 |
diff --git a/app-portage/layman/files/layman-2.3.0-dir_check.patch b/app-portage/layman/files/layman-2.3.0-dir_check.patch |
17 |
new file mode 100644 |
18 |
index 0000000..af5ec4a |
19 |
--- /dev/null |
20 |
+++ b/app-portage/layman/files/layman-2.3.0-dir_check.patch |
21 |
@@ -0,0 +1,31 @@ |
22 |
+From: Devan Franchini <twitch153@g.o> |
23 |
+Date: Sat, 30 Apr 2016 18:54:39 -0400 |
24 |
+Subject: [PATCH] Adds dir check for repos.conf rebuilding |
25 |
+ |
26 |
+--- a/layman/updater.py 2015-02-07 22:38:49.000000000 -0500 |
27 |
++++ b/layman/updater.py 2016-04-30 18:54:39.103894343 -0400 |
28 |
+@@ -182,6 +182,24 @@ |
29 |
+ |
30 |
+ def create_repos_conf(self): |
31 |
+ self.output.info(" Creating layman's repos.conf file") |
32 |
++ |
33 |
++ if os.path.isdir(self.config['repos_conf']): |
34 |
++ msg = ' create_repos_conf() error: %s is a directory and will\n'\ |
35 |
++ ' not be written to.' % self.config['repos_conf'] |
36 |
++ self.output.error(msg) |
37 |
++ return None |
38 |
++ |
39 |
++ conf_dir = os.path.dirname(self.config['repos_conf']) |
40 |
++ |
41 |
++ if not os.path.isdir(conf_dir): |
42 |
++ try: |
43 |
++ os.mkdir(conf_dir) |
44 |
++ except OSError as e: |
45 |
++ self.output.error(' create_repos_conf() error creating: %s: '\ |
46 |
++ % conf_dir) |
47 |
++ self.output.error(' "%s"' % e) |
48 |
++ return None |
49 |
++ |
50 |
+ layman_inst = LaymanAPI(config=self.config) |
51 |
+ overlays = {} |
52 |
+ for ovl in layman_inst.get_installed(): |
53 |
|
54 |
diff --git a/app-portage/layman/layman-2.3.0-r1.ebuild b/app-portage/layman/layman-2.3.0-r1.ebuild |
55 |
index 090a8ff..d3a9a16 100644 |
56 |
--- a/app-portage/layman/layman-2.3.0-r1.ebuild |
57 |
+++ b/app-portage/layman/layman-2.3.0-r1.ebuild |
58 |
@@ -61,6 +61,7 @@ python_prepare_all() { |
59 |
esetup.py setup_plugins |
60 |
distutils-r1_python_prepare_all |
61 |
#rm "${S}"/"${PN}"/tests/dtest.py |
62 |
+ epatch "${FILESDIR}"/${P}-dir_check.patch |
63 |
eprefixify etc/layman.cfg layman/config.py |
64 |
} |