LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-03-2009, 01:16 AM   #1
maitrey
LQ Newbie
 
Registered: May 2009
Posts: 14

Rep: Reputation: 0
Smile Debian packaging system


I have a *.deb package. I install it. It creates a directory structure in /opt/welcome/net/. I manually delete the /opt/welcome/net directory.
When I reinstall it gives me error which is like:
Downgrade from 3.x to 2.0.0 is not allowed
dpkg-warning old preremoval script returned error exit status 5
Unsupported downgrade or upgrade
new preremoval script returned error exit status 1
Errors were encountered while processing *.deb
Plz give me some suggestion how to reduce this error.
 
Old 06-03-2009, 03:30 AM   #2
monkinsane
LQ Newbie
 
Registered: Oct 2007
Location: Pretoria - South Africa
Distribution: Ubuntu 8.10
Posts: 12

Rep: Reputation: 0
OK, I'll need a few details.

What distro are you running?
What are you trying to install?
Are you sure the Dependencies have been fully satisfied?
Are you installing via a package manager or command-line?
 
Old 06-03-2009, 05:27 AM   #3
maitrey
LQ Newbie
 
Registered: May 2009
Posts: 14

Original Poster
Rep: Reputation: 0
This is my own debian package.
I have this in my postinstall script:
# Do nothing for abort-remove
if [ "$1" == "abort-remove" ]
then
exit 0
fi

# Do nothing for abort-upgrade
if [ "$1" == "abort-upgrade" ]
then
exit 0
fi

I have this in my postrm script:
NEW_PKG_MAJR_VER="$(echo $2 | cut -d"." -f1)"
echo "NEW_PKG_MAJR_VER = $NEW_PKG_MAJR_VER" >> ${LOG_FILE}
if [ $NEW_PKG_MAJR_VER -lt 3 ]
then
errrmsg 5 "Downgrade from 3.x to $2 is not allowed"
fi
fi

if [ "$1" = "failed-upgrade" ]
then
errrmsg 1 "Unsupported Downgrade/Upgrade"
exit 2
fi
I know it is because of postrm.
I want to know how can I avoid this error.
 
Old 06-04-2009, 01:58 AM   #4
monkinsane
LQ Newbie
 
Registered: Oct 2007
Location: Pretoria - South Africa
Distribution: Ubuntu 8.10
Posts: 12

Rep: Reputation: 0
Oh, I see.

In that case I won't be able to help as my knowledge of creating .deb packages is non-existent.

Sorry.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Klik: the un-packaging system LXer Syndicated Linux News 1 02-14-2007 03:10 AM
Installing a packaging system when making a linux system from scratch idamlaj Linux - Software 1 03-01-2006 02:01 PM
New to Debian packaging ernesto_cgf Debian 3 04-25-2005 01:59 PM
Best Packaging System nny0000 Linux - General 9 01-06-2004 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration