Subject: Re: pkgsrc and update
To: Havard Eidnes <he@uninett.no>
From: Gilles Gravier <Gilles@Gravier.org>
List: netbsd-users
Date: 07/25/2005 01:28:18
This is a cryptographically signed message in MIME format.

--------------ms040606020200070405060003
Content-Type: multipart/alternative;
 boundary="------------090206040602070701030208"

This is a multi-part message in MIME format.
--------------090206040602070701030208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Wouldn't pkg_chk do the work?

Gilles.

Havard Eidnes wrote:

>>I have, say, 6-month-old packages installed on my system.  One day, I
>>decide I want to update, say, xine-ui.
>>
>>What (on earth) should I do?
>>
>>I tried "make update" (although I know it does NOT work - and it didn't)
>>and sooner or later, the system complains "xxx is already installed -
>>perhaps an older version?" - why doesn't it _update_ the package as I
>>told it to do?
>>    
>>
>
>The problem is that when pkgsrc tries to install (new) dependent
>packages, it does "make install", not "make update" in those packages.
>I think there is a way to instruct the pkgsrc machinery to do "make
>update" also for the dependent packages, but why this isn't the
>default for "make update" is, frankly, beyond me.  Exactly what the
>incantation is, you'll have some pkgsrc infrastructure-savvy folks
>tell you -- I'm not it.
>
>  
>
>>So, HOW do I update installed packages without first removing all
>>packages and then installing everything from scratch.
>>    
>>
>
>Well, one semi-safe way I've found is to use pkgdepgraph to
>compute what needs to be rebuilt, and in what order, and then use
>the output of "pkgdepgraph -D" and "pkgdepgraph -R" to rebuild
>stuff.  By default this will update all packages where new
>versions are available, there's probably ways to make it do this
>for a subset of the packages.
>
>When I want to minimize downtime, I instead do a bulk build (in my
>case of all packages...) of binary packages in a chroot setup, and use
>the output of "pkgdepgraph -A" instead of "pkgdepgraph -R".  The
>output of "pkgdepgraph -R" can probably be used in the chroot setup
>instead of doing a full build.
>
>Regards,
>
>- Håvard
>
>  
>

-- 
/*Gilles Gravier*/ *=* *Gilles@Gravier.org* <mailto:Gilles@Gravier.org> 
*=* *http://www.gravier.org/*
ICQ : *77488526* 
<http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN 
Messenger : Gilles@Gravier.org 
<http://members.msn.com/?mpp=4263%7E5AAAZAAAACcw%210A83PFlYeq0R%21ZPO39GW63sr8Zaat9nB6dTdi0id9FQ$$%7E5AAAaAAAAEDTTl7j2*1w8Gd7%21LdWZmJumAmJe3E2lA97s$>*
*Skype : ggravier <callto://ggravier>* || *Y! : ggravier 
<http://profiles.yahoo.com/ggravier> || AOL : gillesgravier 
<aim:goim?screenname=gillesgravier>
PGP Key ID : *0x8DE6D026* 
<http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&op=index>
"Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
"De toutes les aberrations sexuelles, la chasteté est la plus 
aberrante." [Anatole France]


--------------090206040602070701030208
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#336666">
Wouldn't pkg_chk do the work?<br>
<br>
Gilles.<br>
<br>
Havard Eidnes wrote:
<blockquote cite="mid20050724.235505.98529085.he@uninett.no" type="cite">
  <blockquote type="cite">
    <pre wrap="">I have, say, 6-month-old packages installed on my system.  One day, I
decide I want to update, say, xine-ui.

What (on earth) should I do?

I tried "make update" (although I know it does NOT work - and it didn't)
and sooner or later, the system complains "xxx is already installed -
perhaps an older version?" - why doesn't it _update_ the package as I
told it to do?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The problem is that when pkgsrc tries to install (new) dependent
packages, it does "make install", not "make update" in those packages.
I think there is a way to instruct the pkgsrc machinery to do "make
update" also for the dependent packages, but why this isn't the
default for "make update" is, frankly, beyond me.  Exactly what the
incantation is, you'll have some pkgsrc infrastructure-savvy folks
tell you -- I'm not it.

  </pre>
  <blockquote type="cite">
    <pre wrap="">So, HOW do I update installed packages without first removing all
packages and then installing everything from scratch.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Well, one semi-safe way I've found is to use pkgdepgraph to
compute what needs to be rebuilt, and in what order, and then use
the output of "pkgdepgraph -D" and "pkgdepgraph -R" to rebuild
stuff.  By default this will update all packages where new
versions are available, there's probably ways to make it do this
for a subset of the packages.

When I want to minimize downtime, I instead do a bulk build (in my
case of all packages...) of binary packages in a chroot setup, and use
the output of "pkgdepgraph -A" instead of "pkgdepgraph -R".  The
output of "pkgdepgraph -R" can probably be used in the chroot setup
instead of doing a full build.

Regards,

- H&aring;vard

  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Signature Home Chastity</title>
<meta content="Gilles Gravier" name="author">
<div style="text-align: left;">
<table
 style="text-align: left; background-color: rgb(102, 102, 102); width: 500px; height: 73px;"
 border="1" cellpadding="3" cellspacing="3">
  <tbody>
    <tr>
      <td
 style="text-align: center; vertical-align: middle; background-color: rgb(204, 204, 204); white-space: nowrap;">
      <div
 style="text-align: center; background-color: rgb(204, 204, 204);"><tt><font
 color="#7d6eaf"><i><b>Gilles Gravier</b></i> <b>=</b> </font><a
 href="mailto:Gilles@Gravier.org"><font color="#000000"><b>Gilles@Gravier.org</b></font></a><font
 color="#7d6eaf"> <b>=</b> </font><a href="http://www.gravier.org/"><font
 color="#000000"><b>http://www.gravier.org/</b></font></a></tt><br>
      </div>
      <div
 style="text-align: center; background-color: rgb(204, 204, 204);"><tt><font
 color="#009900"><span
 style="font-family: monospace; color: rgb(0, 0, 0); font-weight: bold;"></span></font><font
 color="#000099">ICQ :</font> <a
 href="http://www.icq.com/whitepages/about_me.php?Uin=77488526"><font
 color="#009900"><b>77488526</b></font></a></tt>&nbsp;<tt><font
 color="#009900"><b><span
 style="font-family: monospace; color: rgb(0, 0, 0);"> || </span></b></font></tt><tt><font
 color="#000099">MSN Messenger : <a
 href="http://members.msn.com/?mpp=4263%7E5AAAZAAAACcw%210A83PFlYeq0R%21ZPO39GW63sr8Zaat9nB6dTdi0id9FQ$$%7E5AAAaAAAAEDTTl7j2*1w8Gd7%21LdWZmJumAmJe3E2lA97s$"><span
 style="color: rgb(0, 153, 0); font-weight: bold;">Gilles@Gravier.org</span></a></font></tt><tt><font
 color="#009900"><b><span
 style="font-family: monospace; color: rgb(0, 0, 0);"><br>
      </span></b></font></tt><span
 style="font-family: monospace; color: rgb(0, 0, 153);">Skype</span><tt><font
 color="#000099"><span style="color: rgb(0, 0, 153);"> :&nbsp;</span><a
 href="callto://ggravier"><span
 style="font-weight: bold; color: rgb(0, 153, 0);">ggravier</span></a></font></tt><tt><font
 color="#009900"><b><span
 style="font-family: monospace; color: rgb(0, 0, 0);"> || </span></b></font></tt><tt><font
 color="#000099"><span style="color: rgb(0, 153, 0);"></span><span
 style="font-weight: bold;"></span>Y! : <a
 href="http://profiles.yahoo.com/ggravier"><span
 style="color: rgb(0, 153, 0); font-weight: bold;">ggravier</span></a></font></tt><tt
 style="font-weight: bold;"><font color="#009900"><span
 style="font-family: monospace; color: rgb(0, 0, 0);"> || </span></font></tt><tt><font
 color="#000099">AOL : <a href="aim:goim?screenname=gillesgravier"><span
 style="color: rgb(0, 153, 0); font-weight: bold;">gillesgravier</span></a><br>
      </font></tt><tt><font color="#000099">PGP Key ID :</font> <a
 href="http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&amp;op=index"><font
 color="#009900"><b>0x8DE6D026</b></font></a></tt><br>
      </div>
      <div
 style="text-align: center; background-color: rgb(204, 204, 204);"><tt>"Chastity
is its own punishment." (<font color="#999999"><i>Solomon Short</i></font>)
[<font color="#666666"><i>David Gerrold</i></font>]<br>
      </tt><span style="font-family: monospace;">"De toutes les
aberrations sexuelles, la chastet&eacute; est la plus aberrante." [<span
 style="font-style: italic;"><font color="#666666">Anatole France</font></span>]</span><br>
      </div>
      </td>
    </tr>
  </tbody>
</table>
</div>
</div>
</body>
</html>

--------------090206040602070701030208--

--------------ms040606020200070405060003
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Enc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