#892174 apt-get source -t fails if target release doesn't have deb sources.list entry

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Harald Sitter
Date:
2024-01-19 06:57:04 UTC
Severity:
normal
Tags:
#892174#5
Date:
2018-03-06 12:24:51 UTC
From:
To:
simple example in a docker container `docker run -it --rm ubuntu:bionic bash`

```
echo 'deb-src http://archive.ubuntu.com/ubuntu xenial main' >
/etc/apt/sources.list.d/xenial.list
apt update
apt-get source -t xenial apt
```

Will fail because the xenial release has no `deb ...` sources.list
entry and the pkgPolicy code checking -t is valid only iterates the
package cache it seems. Adding a suitable deb entry makes this work.

```
echo 'deb http://archive.ubuntu.com/ubuntu xenial main' >>
/etc/apt/sources.list.d/xenial.list
apt update
apt-get source -t xenial apt
```

pkgPolicy should find the target release even when only the 'deb-src'
entry is there.

#892174#10
Date:
2018-03-06 14:11:25 UTC
From:
To:
Control: forcemerge 441178 -1

This sounds very much like #441178; merging.

Regards,

Adam