[Pkg-emacsen-addons] Bug#905464: Bug#905464: dh-elpa: Expects .el file name to be based on package name (and does not consider "${pkg}-mode.el")

Axel Beckert abe at debian.org
Sun Aug 5 15:14:19 BST 2018


Hi Sean,

Sean Whitton wrote:
> > when trying to switch the package tpp (which also ships "tpp-mode.el" to
> > edit tpp files), dh_elpa expects a file named
> > debian/.debhelper/elpa/tpp.desc despite debian/elpa lists
> > "contrib/tpp-mode.el".
> >
> > The content of the debian/elpa file seems to be ignored when calculating
> > the path to the .desc file.
> 
> I have never heard of these .desc files

Me neither.

> and cannot find anything after a quick search engine query.

Maybe look into the dh_elpa source code? :-)

    116 sub read_package_desc {
    117   my ($descdir, $package) = @_;
    118   my %desc = ();
    119 
    120   my $descfile="${descdir}/${package}.desc";
    121 
    122   my $fh;
    123 
    124   open $fh,'<', $descfile or
    125     error "failed to open $descfile";
    126 
    127   while (<$fh>) {
    128     if (m/([^:]+):\s*(.*)\s*$/) {
    129       $desc{$1} = $2;
    130     }
    131   }
    132   return \%desc;
    133 }
[…]
    180 foreach my $package (@{$dh{DOPACKAGES}}) {
[…]
    185   my $elpapkg=$package;
    186   # TODO do this more sanely or at least allow an override
    187   $elpapkg =~ s/^elpa-//;
    188   verbose_print("Using elpa package name $elpapkg");
[…]
    257   my $desc = read_package_desc ($tempdir,$elpapkg);

> Are you sure this is not a tpp-specific thing?

Yes.

For me, it looks (dh_)elpa-specific as dh_elpa seems to create that
file (it at least creates the directory in which it is) and the whole
tpp upstream tar ball contains no file ending on .desc.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Pkg-emacsen-addons mailing list