Hi!

Additional information from Debian 9/stretch.

acerion@debian:~$ grep CODENAME /etc/os-release
VERSION_CODENAME=stretch
acerion@debian:~$ apt --version
apt 1.4.11 (amd64)



A. Reproduction with mongodb-dev

acerion@debian:~$ apt-get source mongodb-dev=2:1.1.2-5
Reading package lists... Done
Picking 'mongo-cxx-driver-legacy' as source package instead of 'mongodb-dev'
NOTICE: 'mongo-cxx-driver-legacy' packaging is maintained in the 'Git' version 
control system at:
https://anonscm.debian.org/git/pkg-mongodb/mongo-cxx-driver-legacy.git -b debian
Please use:
git clone 
https://anonscm.debian.org/git/pkg-mongodb/mongo-cxx-driver-legacy.git -b debian
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 1,600 kB of source archives.
Get:1 http://archive.debian.org/debian stretch/main mongo-cxx-driver-legacy 
1.1.2-5 (dsc) [2,502 B]
Get:2 http://archive.debian.org/debian stretch/main mongo-cxx-driver-legacy 
1.1.2-5 (tar) [1,578 kB]
Get:3 http://archive.debian.org/debian stretch/main mongo-cxx-driver-legacy 
1.1.2-5 (diff) [19.8 kB]
Fetched 1,600 kB in 0s (3,108 kB/s)
dpkg-source: info: extracting mongo-cxx-driver-legacy in 
mongo-cxx-driver-legacy-1.1.2
[...]
acerion@debian:~$
acerion@debian:~$ rm -rf mongo-cxx-driver-legacy*
acerion@debian:~$
acerion@debian:~$ apt-get source mongodb-dev=1.1.2-5
Reading package lists... Done
Picking 'mongo-cxx-driver-legacy' as source package instead of 'mongodb-dev'
NOTICE: 'mongo-cxx-driver-legacy' packaging is maintained in the 'Git' version 
control system at:
https://anonscm.debian.org/git/pkg-mongodb/mongo-cxx-driver-legacy.git -b debian
Please use:
git clone 
https://anonscm.debian.org/git/pkg-mongodb/mongo-cxx-driver-legacy.git -b debian
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 1,600 kB of source archives.
Get:1 http://archive.debian.org/debian stretch/main mongo-cxx-driver-legacy 
1.1.2-5 (dsc) [2,502 B]
Get:2 http://archive.debian.org/debian stretch/main mongo-cxx-driver-legacy 
1.1.2-5 (tar) [1,578 kB]
Get:3 http://archive.debian.org/debian stretch/main mongo-cxx-driver-legacy 
1.1.2-5 (diff) [19.8 kB]
Fetched 1,600 kB in 0s (3,022 kB/s)
dpkg-source: info: extracting mongo-cxx-driver-legacy in 
mongo-cxx-driver-legacy-1.1.2
[...]

acerion@debian:~$ apt-cache show mongodb-dev
Package: mongodb-dev
Source: mongo-cxx-driver-legacy (1.1.2-5)
Version: 2:1.1.2-5
Installed-Size: 52
Maintainer: Debian MongoDB Maintainers 
<pkg-mongodb-maintain...@lists.alioth.debian.org>
Architecture: all
Depends: libmongoclient-dev
Description-en: MongoDB C++ Driver (transitional package)
 This is a transitional dummy package and can be safely removed.
Description-md5: be37fe697b6918d0a3d27af8da4cff89
Homepage: https://mongodb.github.io/mongo-cxx-driver/
Tag: devel::library, role::devel-lib
Section: libdevel
Priority: optional
Filename: pool/main/m/mongo-cxx-driver-legacy/mongodb-dev_1.1.2-5_all.deb
Size: 15852
MD5sum: 7debc7bbe9bf43a97b6fbeac9ae1f93c
SHA256: f359d5ca0d0652cc773fc83803830cc43546d68a1d6251262e84a548a791b4a1

acerion@debian:~$ apt-cache showsrc mongodb-dev
Package: mongo-cxx-driver-legacy
Binary: libmongoclient-dev, libmongoclient0, mongodb-dev
Version: 1.1.2-5
Maintainer: Debian MongoDB Maintainers 
<pkg-mongodb-maintain...@lists.alioth.debian.org>
Uploaders: Giulio Paci <giuliop...@gmail.com>, Apollon Oikonomopoulos 
<apoi...@debian.org>, Laszlo Boszormenyi (GCS) <g...@debian.org>
Build-Depends: debhelper (>= 9), devscripts, dh-buildinfo, dh-exec, libboost-dev, 
libboost-thread-dev, libgtest-dev, libjsoncpp-dev, libsasl2-dev, libssl-dev, tzdata, 
scons (>= 2.3.0)
Architecture: any all
Standards-Version: 3.9.8
Format: 3.0 (quilt)
Files:
 67693c7bcc4af65b6b680cfbe8404b40 2502 mongo-cxx-driver-legacy_1.1.2-5.dsc
 4c23a21360c4f8a2dbd71ffcfd46da3a 1577527 
mongo-cxx-driver-legacy_1.1.2.orig.tar.gz
 a3cd2af866b3442fd2b45df03349124e 19820 
mongo-cxx-driver-legacy_1.1.2-5.debian.tar.xz
Vcs-Browser: 
https://anonscm.debian.org/cgit/pkg-mongodb/mongo-cxx-driver-legacy.git
Vcs-Git: https://anonscm.debian.org/git/pkg-mongodb/mongo-cxx-driver-legacy.git 
-b debian
Checksums-Sha256:
 77b556271badcdae4a9c1477201738e95d7036c6af417bfd0fb5480e9fb59ac5 2502 
mongo-cxx-driver-legacy_1.1.2-5.dsc
 8c52cae798086c3e9d0e6fe488c3378601db858cc71944b6b83440d8b00298f4 1577527 
mongo-cxx-driver-legacy_1.1.2.orig.tar.gz
 18fb2538e238bd7a400ee1ec243712824fafed83cafc15f499180e076268fe96 19820 
mongo-cxx-driver-legacy_1.1.2-5.debian.tar.xz
Homepage: https://mongodb.github.io/mongo-cxx-driver/
Package-List:
 libmongoclient-dev deb libdevel optional arch=any
 libmongoclient0 deb devel optional arch=any
 mongodb-dev deb oldlibs extra arch=all
Directory: pool/main/m/mongo-cxx-driver-legacy
Priority: extra
Section: misc



One thing that caught my eye here is that binary package's version includes
epoch, whereas source package's version doesn't include epoch. Perhaps this
is why "apt-get source" is able to fetch source of mongodb-dev in both cases.



B. Reproduction with vim package, which uses epoch in version string too

acerion@debian:~$ apt-get source vim=2:8.0.0197-4+deb9u7
Reading package lists... Done
NOTICE: 'vim' packaging is maintained in the 'Git' version control system at:
https://anonscm.debian.org/cgit/pkg-vim/vim.git/
Please use:
git clone https://anonscm.debian.org/cgit/pkg-vim/vim.git/
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 13.2 MB of source archives.
Get:1 http://archive.debian.org/debian-security stretch/updates/main vim 
2:8.0.0197-4+deb9u7 (dsc) [3,040 B]
Get:2 http://archive.debian.org/debian-security stretch/updates/main vim 
2:8.0.0197-4+deb9u7 (tar) [13.0 MB]
Get:3 http://archive.debian.org/debian-security stretch/updates/main vim 
2:8.0.0197-4+deb9u7 (diff) [191 kB]
Fetched 13.2 MB in 3s (4,274 kB/s)
dpkg-source: info: extracting vim in vim-8.0.0197
[...]
acerion@debian:~$
acerion@debian:~$ rm -rf vim*
acerion@debian:~$
acerion@debian:~$ apt-get source vim=8.0.0197-4+deb9u7
Reading package lists... Done
E: Can not find version '8.0.0197-4+deb9u7' of package 'vim'
E: Unable to find a source package for vim

acerion@debian:~$ apt-cache show vim
Package: vim
Version: 2:8.0.0197-4+deb9u7
[...]

Package: vim
Version: 2:8.0.0197-4+deb9u3
[...]

acerion@debian:~$ apt-cache showsrc vim
Package: vim
Binary: vim-common, vim-gui-common, vim-runtime, vim-doc, vim-tiny, vim, 
vim-gtk, vim-gtk3, vim-nox, vim-athena, vim-gnome, xxd
Version: 2:8.0.0197-4+deb9u3
[...]

Package: vim
Binary: vim-common, vim-gui-common, vim-runtime, vim-doc, vim-tiny, vim, 
vim-gtk, vim-gtk3, vim-nox, vim-athena, vim-gnome, xxd
Version: 2:8.0.0197-4+deb9u7
[...]



As you can see, both binary and source packages include epoch in version
string, and apt-get source is unable to find a package when queried for
version without epoch.



I don't know what is the correct behaviour of apt when dealing with
epoch numbers, but maybe the source of problem is the inconsistency in
mongodb's version strings.

Kamil

Reply via email to