G. Branden Robinson: > Hi folks, > > It's been a while since I've done any packaging. I was baffled when > presented with the following. > > dh_clean > cp: cannot stat > 'debian/.debhelper/bucket/files/19c12bb2ca19e68724c2854ed0512469518df19b0710cc2011a5ca540810979c': > No such file or directory > dh_clean: error: cp -an --reflink=auto > debian/.debhelper/bucket/files/19c12bb2ca19e68724c2854ed0512469518df19b0710cc2011a5ca540810979c > > debian/.debhelper/bucket/files/19c12bb2ca19e68724c2854ed0512469518df19b0710cc2011a5ca540810979c.tmp > returned exit code 1 > make: *** [debian/rules:3: clean] Error 25 > > 1. What is the debhelper "bucket"? A web search turns up no > documentation of this architectural feature, one evidently important > enough that its identification is permitted to leak into diagnostic > messages.
The "bucket" is an implementation detail of debhelper used by the feature explained below. > 2. Why is dh_clean trying to copy files around at all? Nothing about > this is disclosed in dh_clean(1). 1-2 debhelper tools mark certain files as "restore on clean" and then replace them (such files are saved in the "bucket"). The most notorious example is dh_update_autotools_config which does this for config.sub and config.guess files. What you are seeing here is dh_clean failing to restore those files on clean. This case looks like something improperly messed around in debhelper's implementation details and left it in an invalid state. When dh_clean handles this removal, it does so in a way that ensures that error cannot occur even if dh_clean is interrupted half-way through. You can remove debian/.debhelper/bucket (and everything inside it) and that will reset debhelper's own state to avoid that error. It will not restore the affected files - but then, they can be restored from git or the orig source as needed. You can see the list of files in debian/.debhelper/bucket/index (mind the order of operations here). The index file also contains a SHA256 checksum of the file, so you can ensure you have found the original. > 3. Why is dh_clean's own diagnostic message pretty much a > recapitulation of the one before? [...] That is standard for debhelper error messages that involves external programs. Except for a few places inside dh_auto_*, which have been enriched to dump related log files from upstream build systems), then this is what you get from debhelper. > 4. The exit status "25" is fairly unusual, suggesting that it has > significant semantics. Yet I find no documentation of such > significance in dh_clean's own man page nor in debhelper(7). Why? > "Exit status" is a common and well-known section heading. > That is probably caused by the very "fun" feature in perl . The exit code from perl will be set to errno if there is a non-zero errno value and the program did not explicit set an exit value due to an uncaught exception. That errno can be completely unrelated to the actual problem (perl does not know when errno was set when perl pulls this stunt). > Can someone shed some light on these matters? > > Please CC me on replies--many years ago I kept up obsessively with > debian-devel traffic, but not any more, I'm sorry to say. > > Thank you in advance. > > Regards, > Branden > > [...] > Done and done. In summary: * Ensure you do not have anything messing around with debhelper's internals inside debian/.debhelper. You can break plenty of features by deleting or changing random files inside that directory. * Restore affected fines manually (read debian/.debhelper/bucket/index for a list of files) * Run 'rm -fr debian/.debhelper/bucket' to get dh_clean "unstuck". * Complete a clean of the package. * Continue what you were doing. Thanks, ~Niels