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

Bug#2929: dpkg-name 1.1.6 is broken.



Package: dpkg
Version: 1.1.6elf

It seems like the dpkg-name shell script has a quoting bug. Witness:

chrish@pianocktail:[~/debian/my-packages] >dpkg-name ssh-1.2.13-1.i386.deb
moved `ssh-1.2.13-1.i386.deb' to `./"ssh1.2.131".i386.deb'
chrish@pianocktail:[~/debian/my-packages] >ls -l *.deb
-rw-r--r--   1 chrish   users      307238 May  5 22:41 "ssh1.2.131".i386.deb

But the "Package" and "Version" fields say:

 Package: ssh
 Version: 1.2.13-1
 Architecture: i386

And while I'm here complaining about dpkg-name, may I suggest a new
feature that could make it quite a bit more useful (and more used)?

How'bout having an -m | --movetodir option that will move the packages to
the specified directory after renaming them?

Here's the rationale:

Now, most people do the following in their debian.rules file:

	longname = foo-1.3.2-2

        dpkg --build debian-tmp
        mv debian-tmp.deb ../$(longname).$(arch).deb

But this way, the format for the debian package filename is hardcoded
in... So all the debian.rules files have to be modified whenever the
format changes.

The current version of dpkg-name already knows about the latest .deb file
name conventions... But

	dpkg-name debian-tmp.deb && mv *.deb ..

is kind of cumbersome and ugly. With the -m option, people could just
write

	dpkg-name -m .. debian-tmp.deb

which is shorter/more convenient than the first two examples, and also
doesn't need any modification when/if the .deb naming convention change
again. (IMHO, it's also more elegant, since this way only 1 piece of
software knows about .deb namving conventions, as opposed to the knowledge
being spread out in all the debian.rules files.) And besides, it's dead
easy to implement.

    Christian



Reply to: