LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 04-20-2012, 09:10 AM   #1
doru
Member
 
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 85

Rep: Reputation: 16
how to read installation scripts in debian apt suite?


How can I read installation scripts (pre install, post install, pre remove, post remove) using the apt - dpkg suite?

I am sorry that I could not find this on the Internet.
 
Old 04-20-2012, 10:42 AM   #2
zakame
Member
 
Registered: Apr 2012
Distribution: Debian, Ubuntu, Slackware
Posts: 121

Rep: Reputation: 42
The {pre,post}{inst,rm} scripts for an package are located under /var/lib/dpkg/info , e.g. for the "xml-core" package, the scripts are at /var/lib/dpkg/info/xml-core.{pre,post}{inst,rm} . Also in that directory are the file list and md5sums for each package installed.

For uninstalled packages, you can check the Debian Package Tracking System page for the source package, and look for either the source package archive, or if there's a VCS associated with the package, you can browse the VCS instead.
 
1 members found this post helpful.
Old 04-20-2012, 02:48 PM   #3
doru
Member
 
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 85

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by zakame View Post
The {pre,post}{inst,rm} scripts for an package are located under /var/lib/dpkg/info , e.g. for the "xml-core" package, the scripts are at /var/lib/dpkg/info/xml-core.{pre,post}{inst,rm} . Also in that directory are the file list and md5sums for each package installed.

For uninstalled packages, you can check the Debian Package Tracking System page for the source package, and look for either the source package archive, or if there's a VCS associated with the package, you can browse the VCS instead.
Thank you very much!

I also found in manuals that
Code:
apt-get source package-name
could download the sources and extract the files, and
Code:
apt-get --download-only install package-name
dpkg-deb -x /var/cache/apt/archives/package-name directory
could be used to read scripts of uninstalled packages. What do you think?
 
1 members found this post helpful.
Old 04-20-2012, 09:12 PM   #4
zakame
Member
 
Registered: Apr 2012
Distribution: Debian, Ubuntu, Slackware
Posts: 121

Rep: Reputation: 42
Yep, that's another way, cool of you to find it out on your own!

Just make sure you have a 'deb-src' line matching your existing 'deb' lines in your /etc/apt/sources.list for that to work though, e.g.

Code:
deb-src http://ftp.us.debian.org/debian squeeze main

Last edited by zakame; 04-20-2012 at 09:14 PM. Reason: [CODE]
 
1 members found this post helpful.
Old 04-21-2012, 04:56 AM   #5
doru
Member
 
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 85

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by zakame View Post
Yep, that's another way, cool of you to find it out on your own!

Just make sure you have a 'deb-src' line matching your existing 'deb' lines in your /etc/apt/sources.list for that to work though, e.g.

Code:
deb-src http://ftp.us.debian.org/debian squeeze main
Thanks. I prefer to ask somebody before I play with packages, and the fact that the scripts were already on my system is just amazing! Thanks for the deb-src tip.
 
  


Reply

Tags
install, script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Gnome Apt, Debian pkg search, synaptic, apt-get each is best for what? streams &dragonflies Ubuntu 1 07-14-2008 02:41 PM
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
read scripts alchem Linux - Newbie 4 08-31-2005 11:42 AM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 12:28 PM
Apt configuration problems during Debian Installation gunncyclopedia Linux - Networking 4 04-10-2005 09:56 PM


All times are GMT -5. The time now is 07:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration