Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #258253

How to download source package using only console?

From "Alexander V. Makartsev" <avbetev@gmail.com>
Newsgroups linux.debian.user
Subject How to download source package using only console?
Date 2023-05-13 21:20 +0200
Message-ID <Gv2WB-8Gi8-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello, fellow Debian users.

When I need to build a backport of a package, I sometimes find it 
difficult to obtain actual source package(-s) from Debian repos using 
console.
Following advice from a wiki page [1], after "apt update", doesn't do it:

    $ apt source lego/testing
    Reading package lists... Done
    Picking 'golang-github-xenolf-lego' as source package instead of 'lego'
    E: Can not find version '3.2.0-3.1' of package 'lego'
    E: Unable to find a source package for golang-github-xenolf-lego

Any other seemingly intended ways also fail in a similar fashion:

    $ dget lego=4.9.1-1
    dget: no hostnames in apt-cache policy lego for version 4.9.1-1 found

    $ apt-get source lego -t testing
    Reading package lists... Done
    E: The value 'testing' is invalid for APT::Default-Release as such a
    release is not available in the sources
    E: Unable to find a source package for

Trying to do the same for another package seems to work:

    $ apt source ipcalc/testing
    Reading package lists... Done
    Selected version '0.42-2' (testing) for ipcalc
    Need to get 33,7 kB of source archives.
    Get:1 https://mirror.yandex.ru/debian testing/main ipcalc 0.42-2
    (dsc) [1 692 B]
    Get:2 https://mirror.yandex.ru/debian testing/main ipcalc 0.42-2
    (tar) [25,9 kB]
    Get:3 https://mirror.yandex.ru/debian testing/main ipcalc 0.42-2
    (diff) [6 144 B]
    Fetched 33,7 kB in 1s (52,5 kB/s)
    dpkg-source: info: extracting ipcalc in ipcalc-0.42
    dpkg-source: info: unpacking ipcalc_0.42.orig.tar.gz
    dpkg-source: info: unpacking ipcalc_0.42-2.debian.tar.xz
    dpkg-source: info: using patch list from debian/patches/series
    dpkg-source: info: applying 01-paths.patch


So why those fail for a "lego" package and is there a way to solve this 
once and for all?
I know I can go to a packages website [2] and manually download ".dsc" 
file and feed it to "dget" utility, or download source files directly 
from said website, but there has to be a better way.

Some useful info:

    $ cat /etc/apt/sources.list | grep -iE "testing"
    #deb https://mirror.yandex.ru/debian/ testing main contrib non-free
    deb-src https://mirror.yandex.ru/debian/ testing main contrib non-free

    $ rmadison lego
    lego       | 0.3.1-5+b13   | oldstable  | amd64, arm64, armel,
    armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
    lego       | 3.2.0-3.1+b5  | stable     | amd64, arm64, armel,
    armhf, i386, mips64el, mipsel, ppc64el, s390x
    lego       | 4.9.1-1       | testing    | amd64, arm64, armel,
    armhf, i386, mips64el, mipsel, ppc64el, s390x
    lego       | 4.9.1-1       | unstable   | amd64, arm64, armel,
    armhf, i386, mips64el, mipsel, ppc64el, s390x

    $ uname -a
    Linux host0 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22)
    x86_64 GNU/Linux



[1] https://wiki.debian.org/SimpleBackportCreation
[2] https://packages.debian.org/bookworm/lego

-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

Back to linux.debian.user | Previous | NextNext in thread | Find similar | Unroll thread


Thread

How to download source package using only console? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-05-13 21:20 +0200
  Re: How to download source package using only console? Vincent Lefevre <vincent@vinc17.net> - 2023-05-14 07:10 +0200
    Re: How to download source package using only console? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-05-14 11:20 +0200
      Re: How to download source package using only console? Greg Wooledge <greg@wooledge.org> - 2023-05-14 15:20 +0200
      Re: How to download source package using only console? Vincent Lefevre <vincent@vinc17.net> - 2023-05-15 02:50 +0200
        Re: How to download source package using only console? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-05-15 07:30 +0200
          Re: How to download source package using only console? Vincent Lefevre <vincent@vinc17.net> - 2023-05-15 12:30 +0200
            Re: How to download source package using only console? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-05-15 21:50 +0200

csiph-web