Re: Debian GNU/Linux 2.2r3 released
On Wed, 18 Apr 2001 10:31:58 +0200, Charles Goyard wrote:
>Julien Gilles a écrit :
>> À quoi reconnait-on une 2.2r2 d'une 2.2r3 ? Je veux dire : j'arrive
>> devant une potato, puis-je savoir en une commande ou deux si c'est une
>> 2.2.r3 ? Est-ce lié à un ensemble de packages de version minimale ? Et
>> dans ce cas, peut-on savoir si une installation est à jour ? Un outil
>> pour déterminer ça serait-il util ? Ma question est-elle stupide ?
>
>A priori, il n'y a pas de moyen de faire la différence. La version de
>Debian se trouve dans /etc/debian_version, et elle ne tient pas compte
>des "r".
>
>Pour finir, ta question est stupide ;)
J'ai pose la question a aj (Anthony Towns) sur IRC:
<CQ> is there a way to see whether a debian box is at 2.2r2 or r3? That
question came up on the debian-fr list
<aj> CQ: compare the versions in /var/lib/dpkg/status against the
versions in
the Packages file
<aj> CQ: (2.2r2 + security updates = 2.2r3, in most cases, so there's
not
really an easier way)
<aj> CQ: point apt at stable, and do a dist-upgrade? :)
<CQ> aj- can't /etc/debian_version include that info, or make a
separate file
where it exists? I can see teh need to be able to go to a machine
and see
what level of upgrading it's at...
<aj> CQ: easier to write a script to do what i said aboce, really; more
accurate too
CQ> hmmm... anyon here have a script to do that?
<aj> CQ: awk '/^Package:/ {P=$2} /^Version:/ {print P, $2}' | sort >
a.txt
<Omnic> bod, file an RC
<aj> CQ: run that on both Packages.gz and on /var/lib/dpkg/status
<aj> CQ: then run diff status.txt pkgs.txt | grep '^[<>]' | sort, and
the <'s
are the versions you have installed that aren't up to date
<aj> CQ: then run diff status.txt pkgs.txt | grep '^[<]' | sort, and
the <'s
are the versions you have installed that aren't up to date
<aj> would be better actually
<CQ> where is Packages.gz?
<aj> from the ftp site
<aj> debian/dists/potato/main/binary-i386/Packages.gz
<CQ> so you can really only compare it to main or non-us etc. not all
at once.
<aj> cat them together first
<weasel> how about using available rather than packages?
<aj> weasel: as long as you run dselect update first; then you
might's'well
just run apt-get dist-upgrade as well
<aj> CQ: what's wrong with "apt-get update; apt-get dist-upgrade -u" ?
<CQ> aj- true...
<CQ> aj- ok if I repost this conversation to debian-fr?
<aj> CQ: yeah, sure
<aj> CQ: packages that are removed but not purged could get listed, btw
...donc il parait que c'est soit un script pour comparer les fichiers
(apres un 'dselect update' pour mettre a jour le fichier 'available'
(cette machine est sur 'testing':
/tmp > cat /etc/debian_version
testing/unstable
/tmp > sudo dselect update
/tmp > cat /var/lib/dpkg/status | awk '/^Package:/ {P=$2} /^Version:/
{print P, $2}' | sort > a.txt
/tmp > cat /var/lib/dpkg/available | awk '/^Package:/ {P=$2}
/^Version:/
{print P, $2}' | sort > b.txt
/tmp > diff a.txt b.txt | grep '^[<]' | sort
...etc...
...ou juste regarde /etc/apt/sources.list ou /etc/debian_version pour
voir si la machine est sur 'stable' et faire:
apt-get update; apt-get dist-upgrade -u
Voila...
a+
Nils.
Reply to: