I think I've implemented this feature here: https://salsa.debian.org/debian/devscripts/-/merge_requests/189
AFAIUI it needs someone to approve and merge it. -rt On Wed, Jul 22, 2020 at 12:15 AM Olek Wojnar <o...@debian.org> wrote: > Hi mentors, > > I'm not the best with Perl and although I've looked through the source > code of mk-origtargz [1] I can't figure out how (if) it is possible to do > what I'm trying to accomplish. > > I think we're all familiar with the mk-origtargz function where one can > specify "Files-Excluded:" from the source tarball for various reasons. > Excluding a single file or a directory is trivial. Excluding a pattern of > files (e.g. *.jar) is just as easy. However, I can't figure out how to > exclude *all* of the files in a directory *except* for one or two that are > needed. > > Use case example: Upstream for Package A includes source/binaries for > Package B which is already packaged in Debian. The maintainer wants to > exclude Package B files from the processed tarball. However, upstream also > includes a configuration file or two required for Package A in a directory > containing several dozen Package B files. It would be much simpler to be > able to tell mk-origtargz to exclude the whole directory but leave the one > or two files that are needed. Otherwise, the maintainer would need to add > several dozen lines into the "Files-Excluded:" section which is more work > and more chance of making a mistake. > > So, is this currently possible? If not, is this something that's worth > filing a feature request bug for? > > Thanks in advance! > > -Olek > > [1] > https://salsa.debian.org/debian/devscripts/-/blob/master/lib/Devscripts/MkOrigtargz.pm > -- regards, Reinhard