LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-02-2006, 02:11 PM   #1
jimwelc
Member
 
Registered: Nov 2004
Location: Boston
Posts: 30

Rep: Reputation: 15
Question Launch location of my rpm package?


Hello All,

I am new to RPM development and was wondering if there is a way within the %pre/%post script of my rpm to determine where(path location) it (meaning my *.rpm file) was launched from?

Best Regards,
-Jim
 
Old 05-02-2006, 02:27 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I thought the parent working directory can be obtained using pwd which should tell the directory the user "cd'd in" last before executing the command?
 
Old 05-02-2006, 02:32 PM   #3
jimwelc
Member
 
Registered: Nov 2004
Location: Boston
Posts: 30

Original Poster
Rep: Reputation: 15
Hello B0uncer,

Unfortunately its seems prior to executing any of the %pre %post scripts RPM changes directory to "/".

-Jim
 
Old 05-02-2006, 04:00 PM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
I'm not sure I understand why you'd want to do this, the behaviour of an installation script should not depend on the current directory. If I install an rpm from ~, I expect it to behave in the same way as if I install it from /tmp or any other directory.
 
Old 05-02-2006, 04:06 PM   #5
jimwelc
Member
 
Registered: Nov 2004
Location: Boston
Posts: 30

Original Poster
Rep: Reputation: 15
The reason I am doing this is to handle a special case my package must support in which if some files exist relative to my RPM I need to check for there existence an then perform some actions using them.
 
  


Reply


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
RPM for gcc 4.x location chlawren Linux - Software 1 04-10-2006 06:39 AM
Tomcat package location jpc82 Programming 1 03-01-2006 12:09 PM
Here is The Location of a firefox 1.5 slack package Finlay Slackware 4 12-02-2005 01:11 PM
can reinstall the rpm package without delete the rpm package eye Red Hat 1 10-20-2003 08:53 AM
Package Location MitchM99 Slackware 7 02-07-2003 09:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:24 AM.

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