Re: difference between deinstall and pkg_delete?

2006-06-05 Thread Mikhail Goriachev
RW wrote:
 On Friday 02 June 2006 08:53, Mikhail Goriachev wrote:
 Jon Falconer wrote:
 Greetings,

 I see in the man page for ports the following:

  reinstallUse this to restore a port after using
 pkg_delete(1) when you should have used deinstall.

 So I'm wondering what is the difference between pkg_delete and using
 make deinstall from within the ports directory? What does make
 deinstall do that pkg_delete does not do? What does pkg_delete do that
 make deinstall does not do?
 Hi,

 This will point you in the right direction:

 http://www.bsdforums.org/forums/archive/index.php/t-29467.html
 
 Actually I think that points in wrong direction. There is a lot of 
 misinformation about this that is repeated ad-nauseum.
 
 Most ports use the standard deinstall target which calls pkg_delete; there is 
 only one port in the whole tree that defines it own deinstall target, and 
 that one installs its own versions of the pkg_* utilities. 
 
 The port system uses a series of cookie files to keep track of what has been 
 done. For example if you type make  make the port will only build once, 
 because the first make sets the build cookie. There is also an Install 
 cookie which leads to a problem when you go through the sequence
 
 make install
 pkg_delete
 make install
 
 because pkg_delete doesn't know about the port cookies. The deinstall and 
 reinstall targets both delete the cookie and so using one or the other avoids 
 the problem.  
 
 In practice this is virtually a non-issue since most people, and all build 
 tools, will do a make clean at some point in the sequence.


Right, so pkg_deinstall is the way to go then, isn't? Logically, there
is a difference between pkg_delete and pkg_deinstall. Personally, I use
the latter.


Cheers,
Mikhail.

-- 
Mikhail Goriachev
Webanoide

Telephone: +61 (0)3 62252501
Mobile Phone: +61 (0)4 38255158
E-Mail: [EMAIL PROTECTED]
Web: http://www.webanoide.org

PGP Key ID: 0x4E148A3B
PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difference between deinstall and pkg_delete?

2006-06-05 Thread RW
On Monday 05 June 2006 12:07, Mikhail Goriachev wrote:
 RW wrote:
  On Friday 02 June 2006 08:53, Mikhail Goriachev wrote:
  Jon Falconer wrote:
  Greetings,
 
  I see in the man page for ports the following:
 
   reinstallUse this to restore a port after using
  pkg_delete(1) when you should have used deinstall.
 
  So I'm wondering what is the difference between pkg_delete and using
  make deinstall from within the ports directory? What does make
  deinstall do that pkg_delete does not do? What does pkg_delete do that
  make deinstall does not do?
 
  Hi,
 
  This will point you in the right direction:
 
  http://www.bsdforums.org/forums/archive/index.php/t-29467.html
 
  Actually I think that points in wrong direction. There is a lot of
  misinformation about this that is repeated ad-nauseum.
 
  Most ports use the standard deinstall target which calls pkg_delete;
  there is only one port in the whole tree that defines it own deinstall
  target, and that one installs its own versions of the pkg_* utilities.
 
  The port system uses a series of cookie files to keep track of what has
  been done. For example if you type make  make the port will only
  build once, because the first make sets the build cookie. There is also
  an Install cookie which leads to a problem when you go through the
  sequence
 
  make install
  pkg_delete
  make install
 
  because pkg_delete doesn't know about the port cookies. The deinstall and
  reinstall targets both delete the cookie and so using one or the other
  avoids the problem.
 
  In practice this is virtually a non-issue since most people, and all
  build tools, will do a make clean at some point in the sequence.

 Right, so pkg_deinstall is the way to go then, isn't? Logically, there
 is a difference between pkg_delete and pkg_deinstall. Personally, I use
 the latter.

The question was about the difference between make deinstall and pkg_delete.

pkg_deinstall  (installed by the portupgrade port) is simply a ruby wrapper 
for pkg_delete that provides globbing and recursion. There is no particular 
correpondence between pkg_deinstall and make deinstall except for the 
similar name. 





 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difference between deinstall and pkg_delete?

2006-06-05 Thread Ian A. Tegebo
On Thu, Jun 01, 2006 at 11:08:14AM -0700, Jon Falconer wrote:
 So I'm wondering what is the difference between pkg_delete and using make
 deinstall from within the ports directory? What does make deinstall do
 that pkg_delete does not do? What does pkg_delete do that make deinstall
 does not do?
After spending some time with /usr/ports/Mk/bsd.port.mk and the man page
for pkg_delete, I think I'm just as confused as you are.  As you
mention, the man page for ports seems to imply that pkg_delete is a bad
thing and that you should use 'make deinstall'.

My analysis of 'make deinstall' in bsd.port.mk concludes that the
deinstall target calls 'pkg_delete -f' on the package names supplied by
pkg_info.  I'm not entirely sure what implications this has for the
installation cookies.

If you were to only use pkg_delete, some things might go wrong.  For
example in the Technical Details section, it mentions the 'require' and
the 'deinstall' scripts that can fail during a pkg_delete.  A 
'pkg_delete -f' would force the issue (and that's what 'make deinstall' 
does).

Getting back to the 'make reinstall' target, it appears that all it does
is 'rm -f' the installation and package cookies before running install.
My conclusion is confusion.  I'm not sure what the man page author meant
by 
Use this to restore a port after using pkg_delete(1)
when you should have used deinstall.

Can someone with more experience give examples that might clarify the
situation?


--
Ian Tegebo
Residential Computing
University of California Berkeley
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difference between deinstall and pkg_delete?

2006-06-05 Thread RW
On Monday 05 June 2006 16:37, Ian A. Tegebo wrote:

  I'm not sure what the man page author meant
 by
   Use this to restore a port after using pkg_delete(1)
 when you should have used deinstall.

 Can someone with more experience give examples that might clarify the
 situation?

It's to do with the cookie. Read back through the thread, I've already given 
an example.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difference between deinstall and pkg_delete?

2006-06-05 Thread Mikhail Goriachev
RW wrote:
 On Monday 05 June 2006 12:07, Mikhail Goriachev wrote:
 RW wrote:
 On Friday 02 June 2006 08:53, Mikhail Goriachev wrote:
 Jon Falconer wrote:
 Greetings,

 I see in the man page for ports the following:

  reinstallUse this to restore a port after using
 pkg_delete(1) when you should have used deinstall.

 So I'm wondering what is the difference between pkg_delete and using
 make deinstall from within the ports directory? What does make
 deinstall do that pkg_delete does not do? What does pkg_delete do that
 make deinstall does not do?
 Hi,

 This will point you in the right direction:

 http://www.bsdforums.org/forums/archive/index.php/t-29467.html
 Actually I think that points in wrong direction. There is a lot of
 misinformation about this that is repeated ad-nauseum.

 Most ports use the standard deinstall target which calls pkg_delete;
 there is only one port in the whole tree that defines it own deinstall
 target, and that one installs its own versions of the pkg_* utilities.

 The port system uses a series of cookie files to keep track of what has
 been done. For example if you type make  make the port will only
 build once, because the first make sets the build cookie. There is also
 an Install cookie which leads to a problem when you go through the
 sequence

 make install
 pkg_delete
 make install

 because pkg_delete doesn't know about the port cookies. The deinstall and
 reinstall targets both delete the cookie and so using one or the other
 avoids the problem.

 In practice this is virtually a non-issue since most people, and all
 build tools, will do a make clean at some point in the sequence.
 Right, so pkg_deinstall is the way to go then, isn't? Logically, there
 is a difference between pkg_delete and pkg_deinstall. Personally, I use
 the latter.
 
 The question was about the difference between make deinstall and pkg_delete.
 
 pkg_deinstall  (installed by the portupgrade port) is simply a ruby wrapper 
 for pkg_delete that provides globbing and recursion. There is no particular 
 correpondence between pkg_deinstall and make deinstall except for the 
 similar name.


Ah, now I see what you mean about cookies. I guess this is valid when
you don't want to clean a port. In my case, I install and clean it right
away... the cookie disappears in the process.

make install clean
pkg_deinstall
make install clean

Is this the only issue between pkg_delete and make deinstall?


Cheers,
Mikhail.

-- 
Mikhail Goriachev
Webanoide

Telephone: +61 (0)3 62252501
Mobile Phone: +61 (0)4 38255158
E-Mail: [EMAIL PROTECTED]
Web: http://www.webanoide.org

PGP Key ID: 0x4E148A3B
PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difference between deinstall and pkg_delete?

2006-06-04 Thread RW
On Friday 02 June 2006 08:53, Mikhail Goriachev wrote:
 Jon Falconer wrote:
  Greetings,
 
  I see in the man page for ports the following:
 
   reinstallUse this to restore a port after using
  pkg_delete(1) when you should have used deinstall.
 
  So I'm wondering what is the difference between pkg_delete and using
  make deinstall from within the ports directory? What does make
  deinstall do that pkg_delete does not do? What does pkg_delete do that
  make deinstall does not do?

 Hi,

 This will point you in the right direction:

 http://www.bsdforums.org/forums/archive/index.php/t-29467.html

Actually I think that points in wrong direction. There is a lot of 
misinformation about this that is repeated ad-nauseum.

Most ports use the standard deinstall target which calls pkg_delete; there is 
only one port in the whole tree that defines it own deinstall target, and 
that one installs its own versions of the pkg_* utilities. 

The port system uses a series of cookie files to keep track of what has been 
done. For example if you type make  make the port will only build once, 
because the first make sets the build cookie. There is also an Install 
cookie which leads to a problem when you go through the sequence

make install
pkg_delete
make install

because pkg_delete doesn't know about the port cookies. The deinstall and 
reinstall targets both delete the cookie and so using one or the other avoids 
the problem.  

In practice this is virtually a non-issue since most people, and all build 
tools, will do a make clean at some point in the sequence.
















___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difference between deinstall and pkg_delete?

2006-06-02 Thread Mikhail Goriachev
Jon Falconer wrote:
 Greetings,
 
 I see in the man page for ports the following:
 
  reinstallUse this to restore a port after using pkg_delete(1)
   when you should have used deinstall.
 
 So I'm wondering what is the difference between pkg_delete and using make
 deinstall from within the ports directory? What does make deinstall do
 that pkg_delete does not do? What does pkg_delete do that make deinstall
 does not do?

Hi,

This will point you in the right direction:

http://www.bsdforums.org/forums/archive/index.php/t-29467.html

man pkg_delete
man pkg_deinstall

Cheers,
Mikhail.

-- 
Mikhail Goriachev
Webanoide

Telephone: +61 (0)3 62252501
Mobile Phone: +61 (0)4 38255158
E-Mail: [EMAIL PROTECTED]
Web: http://www.webanoide.org

PGP Key ID: 0x4E148A3B
PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


difference between deinstall and pkg_delete?

2006-06-01 Thread Jon Falconer
Greetings,

I see in the man page for ports the following:

 reinstallUse this to restore a port after using pkg_delete(1)
  when you should have used deinstall.

So I'm wondering what is the difference between pkg_delete and using make
deinstall from within the ports directory? What does make deinstall do
that pkg_delete does not do? What does pkg_delete do that make deinstall
does not do?

Thanks,

Jon

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]