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

Bug#978104: dh-make-elpa: Can't locate object method "home_dir" via package "DhMakeELPA::Config" at /usr/share/perl5/DhMakeELPA/Command/Packaging.pm line 387.



Package: dh-make-elpa
Version: 0.19
Severity: grave
Tags: patch

Hi,

when trying to use dh-make-elpa, it aborts for me as follows:

$ dh-make-elpa --pkg-emacsen --version="1+24+gc830b9d"
I: couldn't generate d/docs: not fully implemented
Can't locate object method "home_dir" via package "DhMakeELPA::Config" at /usr/share/perl5/DhMakeELPA/Command/Packaging.pm line 387.

Exit code is 25.

I suspect that the actually trying to be packaged mode doesn't make a
difference here, but for the sake of completeness: This happened during
trying to package https://github.com/mickeynp/ligature.el.

Since home_dir seems to be a hash key and not a method, I tried to
enclose it in curly brackets. Then it bails out on the next word. In the
end I also had to fix these errors, too, to get it running until the
end:

Can't locate object method "data_dir" via package "DhMakeELPA::Config" at /usr/share/perl5/DhMakeELPA/Command/Packaging.pm line 387.
Can't locate object method "verbose" via package "DhMakeELPA::Config" at /usr/share/perl5/DhMakeELPA/Command/Packaging.pm line 392.

My first try was to convert the function calls to hash accesses. Which
seems to have worked.

So I looked through perl5320delta(1) to see if there was a change in
Perl which could trigger this, but found none on a first glance.

Then I checked the dh-make-perl code to see if the same code is in
there, too. And it is. So I checked which code is different and in the
end I figured that (probably with the separation from dh-make-perl) too
much code has been removed from dh-make-elpa compared to
dh-make-perl. More precisely, re-adding these options (!) fixed it as in
the call to __PACKAGE__->mk_accessors accessors are generated from the
configured options. Here's the patch:

--- /usr/share/perl5/DhMakeELPA/Config.pm.BACKUP	2020-06-25 20:22:12.000000000 +0200
+++ /usr/share/perl5/DhMakeELPA/Config.pm	2020-12-26 03:56:47.075818430 +0100
@@ -16,9 +16,12 @@
 
 my @OPTIONS = (
     'backups!',
+    'data-dir=s',
     'dh=i',
+    'home-dir=s',
     'network!',
     'pkg-emacsen!',
+    'verbose!',
     'version=s'
 );
 

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'unstable-debug'), (500, 'buildd-unstable'), (110, 'experimental'), (1, 'experimental-debug'), (1, 'buildd-experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.9.0-4-amd64 (SMP w/4 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages dh-make-elpa depends on:
ii  dh-elpa                 2.0.6
ii  libarray-utils-perl     0.5-1
ii  libdebian-source-perl   0.113
ii  libfile-find-rule-perl  0.34-1
ii  libfile-grep-perl       0.02-1
ii  libgit-repository-perl  1.324-1
ii  libtrycatch-perl        1.003002-2+b7
ii  perl                    5.32.0-6

Versions of packages dh-make-elpa recommends:
ii  devscripts  2.20.5

dh-make-elpa suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/perl5/DhMakeELPA/Command/Packaging.pm (from dh-make-elpa package)


Reply to: