summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2016-04-30 19:20:38 -0400
committerDevan Franchini <twitch153@gentoo.org>2016-04-30 19:20:38 -0400
commit3b44feaf636c5c72b841d03bcf179968421fc35d (patch)
treec5d5ec1ad229ca6297d1d0405c6dd70881c4736a /app-portage
parentprofiles: unmask =net-misc/tinc-1.1_pre* (diff)
downloadgentoo-3b44feaf636c5c72b841d03bcf179968421fc35d.tar.gz
gentoo-3b44feaf636c5c72b841d03bcf179968421fc35d.tar.bz2
gentoo-3b44feaf636c5c72b841d03bcf179968421fc35d.zip
Adds patch to check for the existence of repos.conf file, bug #574188
Package-Manager: portage-2.2.27
Diffstat (limited to 'app-portage')
-rw-r--r--app-portage/layman/files/layman-2.3.0-dir_check.patch31
-rw-r--r--app-portage/layman/layman-2.3.0-r1.ebuild1
2 files changed, 32 insertions, 0 deletions
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
new file mode 100644
index 000000000000..af5ec4a2e632
--- /dev/null
+++ b/app-portage/layman/files/layman-2.3.0-dir_check.patch
@@ -0,0 +1,31 @@
+From: Devan Franchini <twitch153@gentoo.org>
+Date: Sat, 30 Apr 2016 18:54:39 -0400
+Subject: [PATCH] Adds dir check for repos.conf rebuilding
+
+--- a/layman/updater.py 2015-02-07 22:38:49.000000000 -0500
++++ b/layman/updater.py 2016-04-30 18:54:39.103894343 -0400
+@@ -182,6 +182,24 @@
+
+ def create_repos_conf(self):
+ self.output.info(" Creating layman's repos.conf file")
++
++ if os.path.isdir(self.config['repos_conf']):
++ msg = ' create_repos_conf() error: %s is a directory and will\n'\
++ ' not be written to.' % self.config['repos_conf']
++ self.output.error(msg)
++ return None
++
++ conf_dir = os.path.dirname(self.config['repos_conf'])
++
++ if not os.path.isdir(conf_dir):
++ try:
++ os.mkdir(conf_dir)
++ except OSError as e:
++ self.output.error(' create_repos_conf() error creating: %s: '\
++ % conf_dir)
++ self.output.error(' "%s"' % e)
++ return None
++
+ layman_inst = LaymanAPI(config=self.config)
+ overlays = {}
+ for ovl in layman_inst.get_installed():
diff --git a/app-portage/layman/layman-2.3.0-r1.ebuild b/app-portage/layman/layman-2.3.0-r1.ebuild
index 090a8ff55cbb..d3a9a16c6410 100644
--- a/app-portage/layman/layman-2.3.0-r1.ebuild
+++ b/app-portage/layman/layman-2.3.0-r1.ebuild
@@ -61,6 +61,7 @@ python_prepare_all() {
esetup.py setup_plugins
distutils-r1_python_prepare_all
#rm "${S}"/"${PN}"/tests/dtest.py
+ epatch "${FILESDIR}"/${P}-dir_check.patch
eprefixify etc/layman.cfg layman/config.py
}