Bug#866117: devscripts: [bts] Couldn't mkdir /home/user/.cache/devscripts

Joonas Kylmälä joonas.kylmala at iki.fi
Tue Jun 27 13:24:15 UTC 2017


Package: devscripts
Version: 2.17.6
Severity: normal
Tags: patch

Dear Maintainer,

If I run bts command on a system where there is no ~/.cache directory
I will get the following error:

user at host:~$ bts show 4324324
bts: couldn't mkdir /home/user/.cache/devscripts: No such file or directory

Replacing mkdir function call with make_path fixes the problem. I will
include a patch to this bug report.

Best regards,
Joonas Kylmälä

-- Package-specific info:

--- /etc/devscripts.conf ---

--- ~/.devscripts ---
Not present

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages devscripts depends on:
ii  dpkg-dev              1.18.24
ii  libc6                 2.24-12
ii  libfile-homedir-perl  1.00-1
ii  perl                  5.24.1-4
ii  python3               3.5.3-1

Versions of packages devscripts recommends:
ii  apt                         1.4.6
ii  at                          3.1.20-3
ii  dctrl-tools                 2.24-2+b1
ii  debian-keyring              2017.05.28
ii  dput                        0.12.1
ii  equivs                      2.0.10
ii  fakeroot                    1.21-3.1
ii  file                        1:5.30-1
ii  gnupg                       2.1.18-8
ii  libdistro-info-perl         0.15
ii  libdpkg-perl                1.18.24
ii  libencode-locale-perl       1.05-1
ii  libgit-wrapper-perl         0.047-1
ii  liblist-compare-perl        0.53-1
ii  liblwp-protocol-https-perl  6.06-2
ii  libsoap-lite-perl           1.20-1
ii  liburi-perl                 1.71-1
ii  libwww-perl                 6.15-1
ii  licensecheck                3.0.29-1
ii  lintian                     2.5.51
ii  man-db                      2.7.6.1-2
ii  patch                       2.7.5-1+b2
ii  patchutils                  0.3.4-2
ii  python3-debian              0.1.30
ii  python3-magic               1:5.30-1
ii  sensible-utils              0.0.9
ii  strace                      4.15-2
ii  unzip                       6.0-21
ii  wdiff                       1.2.2-2
ii  wget                        1.19.1-4
ii  xz-utils                    5.2.2-1.2+b1

Versions of packages devscripts suggests:
pn  adequate                     <none>
pn  autopkgtest                  <none>
pn  bls-standalone               <none>
ii  build-essential              12.3
pn  check-all-the-things         <none>
pn  cvs-buildpackage             <none>
pn  devscripts-el                <none>
pn  diffoscope                   <none>
pn  disorderfs                   <none>
pn  dose-extra                   <none>
pn  duck                         <none>
pn  faketime                     <none>
pn  gnuplot                      <none>
ii  gpgv                         2.1.18-8
pn  how-can-i-help               <none>
ii  libauthen-sasl-perl          2.1600-1
pn  libfile-desktopentry-perl    <none>
pn  libnet-smtps-perl            <none>
pn  libterm-size-perl            <none>
ii  libtimedate-perl             2.3000-2
pn  libyaml-syck-perl            <none>
ii  mailutils [mailx]            1:3.1.1-1
pn  mozilla-devscripts           <none>
pn  mutt                         <none>
ii  openssh-client [ssh-client]  1:7.5p1-5
pn  piuparts                     <none>
pn  ratt                         <none>
pn  reprotest                    <none>
pn  svn-buildpackage             <none>
pn  w3m                          <none>

-- no debconf information
-------------- next part --------------
>From a8368077c3e5e25b6435b4f9b6d7c1a89d2261dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala at iki.fi>
Date: Tue, 27 Jun 2017 13:17:09 +0000
Subject: [PATCH] Make bts work even when there is no ~/.cache

---
 scripts/bts.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/bts.pl b/scripts/bts.pl
index 2468978d..7c88a23e 100755
--- a/scripts/bts.pl
+++ b/scripts/bts.pl
@@ -3690,12 +3690,12 @@ sub browse {
     elsif ($caching && have_lwp() && $thing ne '') {
 	if (! $hascache) {
 	    if (! -d dirname($cachedir)) {
-		unless (mkdir(dirname($cachedir))) {
+		unless (make_path(dirname($cachedir))) {
 		    warn "$progname: couldn't mkdir ".dirname($cachedir).": $!\n";
 		    goto LIVE;
 		}
 	    }
-	    unless (mkdir($cachedir)) {
+	    unless (make_path($cachedir)) {
 		warn "$progname: couldn't mkdir $cachedir: $!\n";
 		goto LIVE;
 	    }
-- 
2.13.2



More information about the devscripts-devel mailing list