softwarefactory-project / DLRN

DO NOT send Pull Requests here, send reviews to
https://softwarefactory-project.io/r/#/q/project:DLRN
Apache License 2.0
28 stars 24 forks source link

IOError: [Errno 2] No such file or directory: './data/repos/styles.css' #10

Closed dmsimard closed 5 years ago

dmsimard commented 9 years ago

This error is somewhat related to a previous fix done in this commit: https://github.com/openstack-packages/delorean/commit/c8019fa466a44b83eb526b179fde582a05f78576

This error is reproduced by running a build with delorean, deleting the data folder and running a build again. The complete stack trace:

$ delorean --config-file projects.ini --local --package-name python-openstackclient
INFO:delorean:Getting git://github.com/openstack-packages/python-openstackclient to ./data/python-openstackclient_distro
INFO:delorean:Getting git://git.openstack.org/openstack/python-openstackclient to ./data/python-openstackclient
Traceback (most recent call last):
  File "/home/dmsimard/dev/openstack/bin/delorean", line 10, in <module>
    sys.exit(main())
  File "/home/dmsimard/dev/delorean/delorean/shell.py", line 272, in main
    genreports(cp, package_info, options)
  File "/home/dmsimard/dev/delorean/delorean/shell.py", line 641, in genreports
    "repos", "styles.css"))
  File "/usr/lib64/python2.7/shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "/usr/lib64/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: './data/repos/styles.css'

This issue occurs because genreports attempts to create the css and report files without first making sure that the "repos" folder exists. The "repos" folder would normally be created when the rpmbuild.log file is generated.

There is another issue involved where delorean quits without generating that rpmbuild.log file and without any output - this is reported in https://github.com/openstack-packages/delorean/issues/11.

dtantsur commented 9 years ago

This happened to me IIRC when I tried to build a non-existing package.

javierpena commented 5 years ago

Fixed some time ago.