public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* cygport problem with pkg name starting with number
@ 2022-01-30 19:44 Marco Atzeri
  2022-02-01 15:04 ` Jon Turney
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Atzeri @ 2022-01-30 19:44 UTC (permalink / raw)
  To: cygwin-apps

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 ?

Of course I can just rename the package lib4ti2 and solve the issue ;-)


Regards
Marco



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cygport problem with pkg name starting with number
  2022-01-30 19:44 cygport problem with pkg name starting with number Marco Atzeri
@ 2022-02-01 15:04 ` Jon Turney
  2022-02-01 17:46   ` Marco Atzeri
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Turney @ 2022-02-01 15:04 UTC (permalink / raw)
  To: cygwin-apps

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 :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cygport problem with pkg name starting with number
  2022-02-01 15:04 ` Jon Turney
@ 2022-02-01 17:46   ` Marco Atzeri
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Atzeri @ 2022-02-01 17:46 UTC (permalink / raw)
  To: cygwin-apps

On 01.02.2022 16:04, Jon Turney wrote:
> 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
>>

>> 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 suspect cygport changed behaviour just after that build.

> 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?

In reality only the source and the debug packages are called 4it2.
The others are called lib4ti2*

>> 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 :)

No problem for me.
The major issue is just renaming the old files to new names


Regards
Marco



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-01 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 19:44 cygport problem with pkg name starting with number Marco Atzeri
2022-02-01 15:04 ` Jon Turney
2022-02-01 17:46   ` Marco Atzeri

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).