osmith has submitted this change. (
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36937?usp=email )
Change subject: scripts/osmotestconfig: copy_config: no copytree
......................................................................
scripts/osmotestconfig: copy_config: no copytree
In Osmocom git repositories, we have doc/example directories (possibly
with subdirectories), which contain nothing but *.cfg files.
For these directories, the code I'm removing had no effect: it would
copy the whole directory tree of a directory containaing *.cfg files,
but for some reason ignore the *.cfg files. I guess we had a previous
directory structure before, where this made more sense. So essential it
is a mkdir, but this is also not needed since we do a mkdir just below
this.
Furthermore this code caused problems for the related osmo-sgsn patch,
where a *.cfg file is stored in the tests/ dir, because it has to be
slightly different than the file from doc/example. In this case, the
code would actually copy various files, such as Makefile.am, from the
tests directory. This causes problems in "make distcheck", because then
the file permissions are set so that these files cannot removed without
first changing the permissions again. So osmotestconfig.py fails when it
runs copy_config for the second time, trying to remove the temporary
directory.
Related: osmo-sgsn I309807ff0bc125d4653222b2b4ba69ded3bbff70
Change-Id: Ic312d546da1c21f68a80b6a188616ef9bc84f4c6
---
M scripts/osmotestconfig.py
1 file changed, 30 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py
index 6580fc7..d2d1f03 100755
--- a/scripts/osmotestconfig.py
+++ b/scripts/osmotestconfig.py
@@ -70,9 +70,6 @@
def copy_config(dirname, config):
if os.path.exists(dirname):
shutil.rmtree(dirname)
- ign = shutil.ignore_patterns('*.cfg')
- shutil.copytree(os.path.dirname(config), dirname, ignore=ign)
- os.chmod(dirname, stat.S_IRWXU)
try:
os.stat(dirname)
--
To view, visit
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36937?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: Ic312d546da1c21f68a80b6a188616ef9bc84f4c6
Gerrit-Change-Number: 36937
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged