Hi,

On Fri, 24 Feb 2012 01:10:45 +0100 Ansgar Burchardt <ans...@debian.org> wrote:
> Tollef Fog Heen <tfh...@debian.org> writes:
> > It's a bit confusing that the file names of .debs don't contain the
> > epoch.  I think we should change that.
> >
> > I would suggest %-encoding it, so foo-1:1 becomes foo_1%251_all.deb.
> > The reason to not include a : verbatim is it won't work correctly on all
> > file systems (: gets translated to / in the UI on Mac OS X and is
> > disallowed for at least FAT, I'm not sure about NTFS).  Also, : is
> > traditionally how you reference remote files and devices with tar and
> > scp (and probably more tools), so avoiding : in files names seem
> > prudent.
> 
> This will break some existing tools and I don't see what we gain from
> this, esp. when we still need to encode the : in some other way.  I'm
> therefore tagging this bug as wontfix.

being the author of such a tool (debrebuild, see #774415), I'm using the
following code snippet to go from source package name, version tuple to .dsc
filename:

my $srcpkg = Dpkg::Source::Package->new();
$srcpkg->{fields}{'Source'} = $srcpkgname;
$srcpkg->{fields}{'Version'} = $version;
my $dsc_fname = $srcpkg->get_basename(1) . ".dsc";

Should the encoding ever get changed, using above snippet will (hopefully)
prevent any breakage in my tool because I rely on libdpkg-perl doing the job
for me. Other tools relying on this mapping should consider doing the same
instead of re-implementing this.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to