Bug #1166
"Make install" cannot stat `data/dvb-scan/*'
100%
Description
DS112j> make install install -D ./build.linux/tvheadend /opt/tvheadend/testbuild/bin/tvheadend install -D man/tvheadend.1 /opt/tvheadend/testbuild/share/man/tvheadend.1 for bundle in docs/html docs/docresources src/webui/static data/conf data/dvb-scan; do \ mkdir -p /opt/tvheadend/testbuild/share/tvheadend/$bundle ;\ cp -r $bundle/* /opt/tvheadend/testbuild/share/tvheadend/$bundle ;\ done cp: cannot stat `data/dvb-scan/*': No such file or directory make: *** [install] Error 1
folder data does not contain a folder called "dvb-scan"
Files
History
Updated by Adam Sutton about 12 years ago
Damn thought I'd fixed that. Will try and take a look tonight.
Adam
Updated by Adam Sutton about 12 years ago
One thing I've noticed is if it fails to download the scan data it doesn't disable it in the install. Also if you deleted the files manually it would fail .
Updated by Rene Herbrich about 12 years ago
No, I deleted no files. When does it download the scan data?
Updated by Johan Abbors about 12 years ago
I noticed that the scan data files are downloaded with curl, but curl is not defined as a build dependency in debian/control.
Updated by Adam Sutton about 12 years ago
Indeed, stupid mistake, I'd completely forgotten getmuxlist was even a shelll script.
I'll try and improve this whole setup.
Adam
Updated by Adam Sutton about 12 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:36849d83d59768dbc92b8788120e6c0e2133f369.
Updated by Rene Herbrich about 12 years ago
I'm still experiencing errors:
Fetching dvb-scan files... ERROR: Failed to fetch dvb-scan files (use --disable-dvbscan to skip)
If I run the script manually:
DS112j> python /opt/src/tvheadend_beta/support/getmuxlist Traceback (most recent call last): File "/opt/src/tvheadend_beta/support/getmuxlist", line 27, in <module> shutil.move(d, out) File "/opt/lib/python2.5/shutil.py", line 202, in move copytree(src, dst, symlinks=True) File "/opt/lib/python2.5/shutil.py", line 115, in copytree os.makedirs(dst) File "/opt/lib/python2.5/os.py", line 171, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/opt/src/tvheadend_beta/data/dvb-scan'
(I've deleted '/opt/src/tvheadend_beta/data/dvb-scan' before executing)
Updated by Adam Sutton about 12 years ago
try applying the attached patch to get some debug out of the script to see what its doing. I can't repeat this on my machine, it correctly removes the old copy and replaces it with the newly downloaded one.
Adam
Updated by Rene Herbrich about 12 years ago
DS112j> python /opt/src/tvheadend_beta/support/getmuxlist created tmp directory downloading http://linuxtv.org/hg/dvb-apps/archive/tip.tar.bz2 to /tmp/getmuxlist.17596/dvb-apps.tar.bz2 extracting to /tmp/getmuxlist.17596 creating directory /opt/src/tvheadend_beta/data/dvb-scan moving /tmp/getmuxlist.17596/dvb-apps-96025655e6e8/util/scan/dvb-t to /opt/src/tvheadend_beta/data/dvb-scan Traceback (most recent call last): File "/opt/src/tvheadend_beta/support/getmuxlist", line 34, in <module> shutil.move(d, out) File "/opt/lib/python2.5/shutil.py", line 202, in move copytree(src, dst, symlinks=True) File "/opt/lib/python2.5/shutil.py", line 115, in copytree os.makedirs(dst) File "/opt/lib/python2.5/os.py", line 171, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/opt/src/tvheadend_beta/data/dvb-scan'
That's really strange, as
mv /tmp/getmuxlist.17596/dvb-apps-96025655e6e8/util/scan/* /opt/src/tvheadend_beta/data/dvb-scan
runs without a problem.
Updated by Rene Herbrich about 12 years ago
I'm a bit confused, as the shutil documentation sais:
The destination directory must not already exist.
As a result of this, I removed the line from your script, where you create the "dvb-scan" folder. The first move operation is fine then and of course the second one fails again, because "dvb-scan" gets created. But that way of implementing a move operation does not make any sense?
Updated by Adam Sutton about 12 years ago
There is nothing wrong with the move, it's moving one directory (dvb-s, etc...) into another (dvb-scan/). The only thing I can think is that there is some strange variation in your python implementation which means that it will not allow that mode of operation, and instead should be treated more like a rename.
In other words I need to append the directory name (dvb-s etc..) to the destination so dvb-scan/dvb-s, but I'm not sure that will work or not.
Adam
P.S.
What OS you building on and what version of python does it report?
Updated by Adam Sutton about 12 years ago
Try changing:
shutil.move(d, out)
to:
shutil.move(d, os.path.join(out, os.path.basename(d)))
Updated by Rene Herbrich about 12 years ago
Adam Sutton wrote:
Try changing:
shutil.move(d, out)to:
shutil.move(d, os.path.join(out, os.path.basename(d)))
yes, that fixed it. What's the difference?
I'm using a Synology NAS with the newest firmware. It's some kind of linux. Kernel: 2.6.32.12, Python: Python 2.5.6
DS112j> python /opt/src/tvheadend_beta/support/getmuxlist created tmp directory downloading http://linuxtv.org/hg/dvb-apps/archive/tip.tar.bz2 to /tmp/getmuxlist.11447/dvb-apps.tar.bz2 extracting to /tmp/getmuxlist.11447 remove existing files creating directory /opt/src/tvheadend_beta/data/dvb-scan moving /tmp/getmuxlist.11447/dvb-apps-96025655e6e8/util/scan/dvb-t to /opt/src/tvheadend_beta/data/dvb-scan moving /tmp/getmuxlist.11447/dvb-apps-96025655e6e8/util/scan/dvb-s to /opt/src/tvheadend_beta/data/dvb-scan moving /tmp/getmuxlist.11447/dvb-apps-96025655e6e8/util/scan/dvb-c to /opt/src/tvheadend_beta/data/dvb-scan moving /tmp/getmuxlist.11447/dvb-apps-96025655e6e8/util/scan/atsc to /opt/src/tvheadend_beta/data/dvb-scan cleaning tmp
Updated by Adam Sutton about 12 years ago
- Status changed from Need feedback to Fixed
And about turn has been done, and we're back to my old bash script. I've made python less of a dep for build to keep people happy (I hope). Though its still required if your building with --enable-bundle.
Adam
Updated by Rene Herbrich about 12 years ago
For people who own a Synology NAS, want to compile tvheadend on it and get this error:
create a symbolic link from /opt/bin/bash to /bin/bash
ln -s /opt/bin/bash /bin/bash
bash is not installed per default and is available through ipkg, hence it's located in /opt/bin/bash
Updated by Rene Herbrich about 12 years ago
explanation: the configure and getmuxlist scripts have to be run with bash. The manuals out here for compiling tvheadend on a Synology NAS advise to start configure like that:
bash configure \ --host=armle-unknown-linux \ --target=armle-unknown-linux \ --build=i686-pc-linux \ --disable-avahi \ --release \ --openssl=/opt/lib \ --prefix=/opt/tvheadend
As a result of this, the configure script itself runs without a problem. But getmuxlist not, as it's called within configure without "bash".
Another solution would be to edit the first line of the scripts to:
#!/opt/bin/bash
But I think it's easier to create a symbolic link one time