Hi, Yann Dirson wrote: > Subject: dh_install: no way to rename files while installing
Yep, that's a little bit annoying, so I herewith second this wishlist bug report. :-) > When files have to be installed with another name than the source one, > dh_install is not sufficient, one has to rename the files afterwards. Yeah, either that or go back to "install ...". > What about, for v5 compat level, changing the semantics of the .install > files, to interpret the 2nd member of each clause as a dir only when it has > a trailing slash, and interpret entries with no trailing slash as full > filenames ? That sounds sane, but that'll also mean that all present debian/install files will have a different semantic in the future. > I also thought about using some more heuristics instead, such as "when the > 2nd component has the same suffix as the 1st one, it's not a dir, it's a > renaming". That one should be sufficient in many cases, and would make > transition from v4 to v5 require less work, but I feel it's somewhat DWIM > and may cause problems: files without a suffix could not be renamed that > way, for example. Yep. I had another heuristic in mind: If all but the last component in the target exist and are directories, treat the tail of the target as file. Not sure how many trouble that will cause for a migration. Maybe, it's better to add a new dh_ helper tool named dh_rename, dh_installrename or dh_renameinstall, which looks for a file list named debian/rename. This file will have a similar semantic like debian/install, except that will treat the trailing path component of the second argument as the same type (file or directory) as the given first component. No wildcards allowed -- unless you want reimplement mmv. :-) Typical, slightly generalized examples where I ran into the missing of such a feature: blafasel.conf.example etc/blafasel.conf example.conf etc/package.conf somesh7 bin/somesh foobar.sh usr/bin/foobar Regards, Axel -- ,''`. | Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org