[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#907727: Empty directory is already present in orig tarball



Apologies for the long delay in getting back to this bug.  To recap
history briefly since it's been a few months, the original request was to
suppress the tag source-contains-empty-directory if the Debian patch set
explicitly adds a file to that directory, and the example package affected
by this is xfonts-jmk.

Felix Lechner <felix.lechner@lease-up.com> writes:
> On Sat, Aug 10, 2019 at 4:51 PM Russ Allbery <rra@debian.org> wrote:

>> I don't think there was anything specific to git-buildpackage there.

> Isn't the whole problem specific to git-buildpackage?

No, the root problem, and the reason why the Lintian tag exists at all, is
that Git cannot represent empty directories and therefore will drop them
if a tree of files that contains an empty directory is imported into Git
and then exported out of Git again.

git-buildpackage is one tool that imports trees of files into Git and
later exports them as part of packaging, but just about any Git-based
packaging tool would the same problem.

See https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F

>> The result is that the patches-applied Debian packaging tree is then
>> representable in Git, which did seem mildly superior to recreating the
>> directory in debian/rules if it had disappeared due to a round trip
>> through Git.

> I would prefer not to add such an obscure patch to 11,000 packages. Is
> it really sufficient to create the directories in d/rules?

Yes, it should be.  I suspect that 99% of the time this causes no
practical issues since the directory isn't used by the build anyway, or
upstream recreates the directory as needed.  That does imply that removing
the tag may make sense.

I do think it's unfortunate that a round trip through Git results in a
different source package than the canonical archive representation, since
it could lead to some weird and obscure failures, but like you I'm dubious
that problem is worth asking people to fix 11,000 packages.

> That is a bug in our tools, not in upstream's delivery. Besides,
> couldn't you patch the upstream build system?

Yes, there are a lot of simple solutions to recreate the directory.

-- 
Russ Allbery (rra@debian.org)              <https://www.eyrie.org/~eagle/>


Reply to: