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


Groups > linux.debian.user > #258340

Re: How to download source package using only console?

From Vincent Lefevre <vincent@vinc17.net>
Newsgroups linux.debian.user
Subject Re: How to download source package using only console?
Date 2023-05-15 12:30 +0200
Message-ID <GvDCN-93sg-3@gated-at.bofh.it> (permalink)
References <Gv2WB-8Gi8-1@gated-at.bofh.it> <Gvc9z-8MrR-3@gated-at.bofh.it> <Gvg3v-8OHq-5@gated-at.bofh.it> <Gvuzv-8Xpy-5@gated-at.bofh.it> <GvyWt-90Cu-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2023-05-15 10:25:45 +0500, Alexander V. Makartsev wrote:
> On 15.05.2023 05:43, Vincent Lefevre wrote:
> > But my point is that your database is obsolete, because if you ask
> > the version from testing, apt thinks that it is 3.2.0-3.1, while it
> > should be 4.9.1-1. You need to fix that.
> What is the best approach to fix that? [...]

That:

[...]
> I see. That explains why I can request source package
> "golang-github-xenolf-lego/testing" directly and get the right one.
> So, in my case, I won't be able to reliably get a source package(-s) from
> "testing" if I don't add "deb" part of "testing" to "sources.list", which
> could be a different can of worms...
> Is this something for me to just be aware of and leave it as is now, or is
> there more elegant solution?

Well, if you don't want the "deb" part, you need to provide the
name of the source package directly to "apt source". If you do that
frequently, you can write a script. There are 2 solutions:
* A remote request, e.g. with rmadison.
* Something based of "apt cache show". From that, you can get the
  source package, then call "apt source" with the source package.
  But note that this is only a heuristic; if the name of the source
  package has changed from stable to testing, this won't work.

Note that adding the "deb" part shouldn't be much an issue (except
noise, e.g. with "apt cache show", which would give output for both
stable and testing). If you want to make sure that a package from
testing won't be installed by mistake (by apt), I suppose that you
can use apt preferences with a negative priority for testing to
prevent such an installation:

Package: *
Pin: release a=testing
Pin-Priority: -1

(not tried). See the apt_preferences(5) man page for details.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Back to linux.debian.user | Previous | NextPrevious in thread | Next 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