Re: [Fink-devel] PostRmScript

2010-03-02 Thread Martin Costabel
Daniel Macks wrote:
[]
> According to the Debian package-script docs, postrm does run during an
> upgrade/reinstall (because the old/previous one is being rm'ed). 

According to man dpkg, what should work is to use PreRmScript instead of 
PostRmScript.

-- 
Martin


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] PostRmScript

2010-03-01 Thread BABA, Yoshihiko
Hi,

I added a line to qgis-mac.info:
PostRmScript: rm -rf %p/Applications/qgis%v.app
But this does not seem a good solution to me.

I do this because, after I use qgis for a while, when I try to remove qgis-mac, 
the .app directory stays for some files not supplied by the .deb file.
This is perhaps because, as I used qgis, it modifies the contents of 
qgis%v.app. (I know it is better if I could use /sw/var or  something)

Another problem is, when I  do `fink reinstall qgis-mac', I guess because of 
PostRmScript, fink thinks it successfully installs qgis-mac, but it disappears.

I wonder if my PostRmScript is acceptable, or I should find a better way.

All the files are in my experimental. (You also need a newer version of PyQt4 
than Fink's unstable)

--
BABA Yoshihiko
Urban Design Laboratory, Tokyo University
TEL: +81 (0)90 1738 7439




--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Re: [Fink-devel] PostRmScript

2010-03-01 Thread Daniel Macks
On Tue, Mar 02, 2010 at 10:56:41AM +0900, BABA Yoshihiko wrote:
> Hi,
> 
> I added a line to qgis-mac.info:
> PostRmScript: rm -rf %p/Applications/qgis%v.app
> But this does not seem a good solution to me.
> 
> I do this because, after I use qgis for a while, when I try to remove 
> qgis-mac, the .app directory stays for some files not supplied by the .deb 
> file.
> This is perhaps because, as I used qgis, it modifies the contents of 
> qgis%v.app. (I know it is better if I could use /sw/var or  something)

What specific files is it finding there? Sometimes there is a way to
supress them or else to have them created during InstallScript (i.e.,
be part of the .deb).


> Another problem is, when I  do `fink reinstall qgis-mac', I guess because of 
> PostRmScript, fink thinks it successfully installs qgis-mac, but it 
> disappears.

According to the Debian package-script docs, postrm does run during an
upgrade/reinstall (because the old/previous one is being rm'ed). There
may be a way to distinguish upgrade/reinstall from actual "just
remove".

> I wonder if my PostRmScript is acceptable, or I should find a better way.

No, because as you said, it doesn't work:) You could PreRmScript to
remove the specific files that aren't in the .deb. By the time the
removal happens, they are gone, so there are no "stray" (not owned by
.deb) files. But this is really a hack.

dan

-- 
Daniel Macks
dma...@netspace.org
http://www.netspace.org/~dmacks


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] PostRmScript

2010-03-01 Thread BABA Yoshihiko
Hi,

I added a line to qgis-mac.info:
PostRmScript: rm -rf %p/Applications/qgis%v.app
But this does not seem a good solution to me.

I do this because, after I use qgis for a while, when I try to remove qgis-mac, 
the .app directory stays for some files not supplied by the .deb file.
This is perhaps because, as I used qgis, it modifies the contents of 
qgis%v.app. (I know it is better if I could use /sw/var or  something)

Another problem is, when I  do `fink reinstall qgis-mac', I guess because of 
PostRmScript, fink thinks it successfully installs qgis-mac, but it disappears.

I wonder if my PostRmScript is acceptable, or I should find a better way.

All the files are in my experimental. (You also need a newer version of PyQt4 
than Fink's unstable)

--
BABA Yoshihiko
Urban Design Laboratory, Tokyo University




--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Re: [Fink-devel] PostRmScript does it job after upgrading - sequence is wrong

2006-12-07 Thread Murali Vadivelu
Very simple! I should have figured it out myself. Many thanks though.


On 6 Dec 2006, at 16:09, Benjamin Reed wrote:

> Murali Vadivelu wrote:
>
>> The annoying thing about the the functioning of the script is that  
>> it  gets executed after dpkg replaces the old programme by the new  
>> one,  after an 'update ccpnmr-xx-xx' comand or 'update-all'  
>> command. This  leaves the user with no installation of the  
>> programme! The only way  to make it work is to first remove the  
>> old version and the freshly  install the new version.
>> Is this a dpkg bug, and if it is can a shotgun fix be added to  
>> fink  to execute fink remove and fink install, sequentially,  
>> instead of  whatever is happening now in the direct (overwrite?)  
>> upgrade that is  happening now.
>
> dpkg passes an argument to the script telling you what it's doing.   
> If you only want to do something if it's being fully removed, you  
> need to do:
>
> if [ "$1" != "upgrade" ]; then
>   # do stuff
> fi
>
> -- 
> Benjamin Reed a.k.a. Ranger Rick
> Fink, KDE, and Mac OS X development
> http://www.racoonfink.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] PostRmScript does it job after upgrading - sequence is wrong

2006-12-06 Thread Daniel Macks
On Wed, Dec 06, 2006 at 03:55:31PM +, Murali Vadivelu wrote:
> Dear Developers,
> 
> I am a maintainer for a programme, CcpNmr, which installs minor  
> updates, like Webmin, to its point release through the user  
> interface. Hence, when an upgrade is made, from one point release to  
> another, dpkg does not remove the directory. To clear it up, I have a  
> PostRmScript.
> 
> The annoying thing about the the functioning of the script is that it  
> gets executed after dpkg replaces the old programme by the new one,  
> after an 'update ccpnmr-xx-xx' comand or 'update-all' command. This  
> leaves the user with no installation of the programme! The only way  
> to make it work is to first remove the old version and the freshly  
> install the new version.
> 
> Is this a dpkg bug, and if it is can a shotgun fix be added to fink  
> to execute fink remove and fink install, sequentially, instead of  
> whatever is happening now in the direct (overwrite?) upgrade that is  
> happening now.

The "official" word on what dpkg should be doing regarding when and
how each of the {Pre,Post}{Inst,Rm} scripts is explained here:

  http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html

Perhaps you want this as a PreRm not PostRm, so that it happens before
the old package gets rm'ed?

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] PostRmScript does it job after upgrading - sequence is wrong

2006-12-06 Thread Benjamin Reed
Murali Vadivelu wrote:

> The annoying thing about the the functioning of the script is that it  
> gets executed after dpkg replaces the old programme by the new one,  
> after an 'update ccpnmr-xx-xx' comand or 'update-all' command. This  
> leaves the user with no installation of the programme! The only way  
> to make it work is to first remove the old version and the freshly  
> install the new version.
> 
> Is this a dpkg bug, and if it is can a shotgun fix be added to fink  
> to execute fink remove and fink install, sequentially, instead of  
> whatever is happening now in the direct (overwrite?) upgrade that is  
> happening now.

dpkg passes an argument to the script telling you what it's doing.  If 
you only want to do something if it's being fully removed, you need to do:

if [ "$1" != "upgrade" ]; then
# do stuff
fi

-- 
Benjamin Reed a.k.a. Ranger Rick
Fink, KDE, and Mac OS X development
http://www.racoonfink.com/

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] PostRmScript does it job after upgrading - sequence is wrong

2006-12-06 Thread Murali Vadivelu
Dear Developers,

I am a maintainer for a programme, CcpNmr, which installs minor  
updates, like Webmin, to its point release through the user  
interface. Hence, when an upgrade is made, from one point release to  
another, dpkg does not remove the directory. To clear it up, I have a  
PostRmScript.

The annoying thing about the the functioning of the script is that it  
gets executed after dpkg replaces the old programme by the new one,  
after an 'update ccpnmr-xx-xx' comand or 'update-all' command. This  
leaves the user with no installation of the programme! The only way  
to make it work is to first remove the old version and the freshly  
install the new version.

Is this a dpkg bug, and if it is can a shotgun fix be added to fink  
to execute fink remove and fink install, sequentially, instead of  
whatever is happening now in the direct (overwrite?) upgrade that is  
happening now.

Many thanks.

Best regards,
Murali.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel