Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a package I'm maintaining. When I issue "fakeroot debian/rules binary" I get this error:

dh_install --sourcedir=debian/tmp 
cp: cannot stat `debian/tmp/usr/share/prg/1.svg': No such file or directory 
dh_install: cp -a debian/tmp/usr/share/prg/1.svg debian/prg//usr/share/prg/ returned exit code 1 
make: * [install-arch] Error 2

I am unable to rectify this error. I can issue "cd debian/tmp/usr/share/prg" then "ls" and voila the 1.svg actually does exist.

In my makefile:

dist_pkgdata_DATA = 1.svg

And in my prg.install file:

usr/share/prg/1.svg
etc/config.ini

The config.ini file has no issue installing.

Any suggestions would be greatly appreciated. Thank you

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

The error is being thrown by dh_install, as invoked by your debian/rules file. It's most likely the destination that is missing, not the source file. In this case, does debian/prg//usr/share/prg exist? I'd wager not. Conventionally, the files for a package are built up either in debian/tmp (typical for 1:1 source:binary packages) or debian/binary-package-name (better for 1:n source:binary packages), so trying to copy from one convention to another suggests an error.

Check your debian/*install file(s). see also the dh_install(1) manpage. In particular,

debian/package.install

List the files to install into each package and the directory they should be installed to. The format is a set of lines, where each line lists a file or files to install, and at the end of the line tells the directory it should be installed in. The name of the files (or directories) to install should be given relative to the current directory, while the installation directory is given relative to the package build directory. You may use wildcards in the names of the files to install (in v3 mode and above).

If you really want debian/prg/usr/share/prg to exist, you must instruct dh_installdirs to create the directories. Create debian/package.dirs for your package, listing the names of directories to create, relative to the build directory, e.g.

usr/share/man/man6
usr/lib
usr/share/prg
share|improve this answer
    
debian/prg//usr/share/prg does exist. But debian/prg//usr/share/prg/1.svg doesn't exist... I tried to instruct dh_installdirs to create the directories, but still the same error. –  ldg Jun 10 '11 at 15:28
    
Ok I got it thank you for the help jmtd. –  ldg Jun 10 '11 at 18:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.