public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: "cygwin-apps@cygwin.com" <cygwin-apps@cygwin.com>
Subject: Re: cygport problem with pkg name starting with number
Date: Tue, 1 Feb 2022 15:04:42 +0000	[thread overview]
Message-ID: <e24c09ae-8611-b9f3-5c6f-ca325b8d395c@dronecode.org.uk> (raw)
In-Reply-To: <d7662fdf-186a-97b7-3ecf-7c4e7a143c81@gmail.com>

On 30/01/2022 19:44, Marco Atzeri wrote:
> It is not a huge number of case as we have only two packages
> in this category 4ti2 and 2048-cli
> 
> on   /usr/share/cygport/lib/pkg_pkg.cygpart
> 
> there is this code using indirect variable assignment
> as ${!dbg_contents_var}
> 
> ------------------------------------------------------------------
>          local dbg_contents_var=${PN//[-+\.]/_}_debuginfo_CONTENTS;
> 
>          __step "${PN}-debuginfo-${PVR}.tar.xz";
>          mkdir -p ${distdir}/${PN}/${PN}-debuginfo;
>          tar Jcvf 
> ${distdir}/${PN}/${PN}-debuginfo/${PN}-debuginfo-${PVR}.tar.xz \
>              usr/*/debug/ ${autoloaddir} ${!dbg_contents_var} \
>              | tee ${T}/.${PN}-debuginfo.lst \
>              || error "Debuginfo package creation failed: ${PN}-debuginfo"
> 
> ------------------------------------------------------------------
> 
> that produces
> 
> /usr/share/cygport/lib/pkg_pkg.cygpart: line 197: 
> 4ti2_debuginfo_CONTENTS: bad substitution
> 
> Any idea how to overcome the issue in cygport code ?

I wonder how this worked the last time the package was built (in 2016!)

I guess since this variable is not exposed to the user, you could just 
rename it so it starts with a '_'.

But, it looks like there would be a general problem if anything in 
PKG_NAMES starts with a digit, as you wouldn't be able to assign to 
<PKG>_CONTENTS etc. in your cygport?

> Of course I can just rename the package lib4ti2 and solve the issue ;-)
  I wonder if forbidding package names to start with a digit is the 
solution :)

  reply	other threads:[~2022-02-01 15:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30 19:44 Marco Atzeri
2022-02-01 15:04 ` Jon Turney [this message]
2022-02-01 17:46   ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e24c09ae-8611-b9f3-5c6f-ca325b8d395c@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).