How to update rpm database regarding removed file of a package?


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to update rpm database regarding removed file of a package?
# 1  
Old 02-06-2013
How to update rpm database regarding removed file of a package?

For Suppose, I have installed a package having files file1, file2 and file3. After installation, I removed the file "file3".

But "rpm -qf file3" is giving the package name, even file3 was not there. And also "rpm -ql package" is also displaying all 3 files.

How can i update rpm database about the package to display only available files i.e. file1 and file2 when queried with "rpm -ql".

I want a shell script to update rpm database so that I can get only file1 and file2 when queried with "rpm -ql".
# 2  
Old 02-07-2013
Anybody is there to help me in this context?
# 3  
Old 02-07-2013
RPM database can be updated only during an installation, thus I think you can not do this.
# 4  
Old 02-07-2013
You can adjust the RPM database contents via a number of undocumented APIs but unless you really know what you are doing I would strongly advise you not to attempt to do so.

Why not rebuild the package without the particular unwanted file and install that custom package instead?
# 5  
Old 02-11-2013
whats my problem is, i am building a combined package for 32-bit and 64-bit using rpmbuild with --noarch

On 64-bit system, all files are getting installed whatever mentioned in the %files section of the spec file.(Both 32-bit and 64-bit files).
On 32-bit system also, all files are getting installed whatever mentioned in the %files section of the spec file but 64-bit files are removed during postinstall(I wrote a code for removal of 64-bit in %post section of spec file).

The problem is, on 32-bit machine, package manager displays all files when queried to display the files installed by the package. So 64-bit files being displayed on 32-bit machine even removing those files during post install.(eg rpm -ql)

Is there any good way to remove 64-bit files on 32-bit machine?

---------- Post updated at 02:47 PM ---------- Previous update was at 11:53 AM ----------

Suggest me any better way to build combined package(for 32-bit and 64-bit architectures) with noarch tag.
# 6  
Old 02-11-2013
Short answer - no. The "correct" method is a build a separate RPM for each architecture or programming model. noarch should only be used for what it is intended - architecture independent files such as documentation and man pages.
# 7  
Old 02-11-2013
Thank you..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Does not appear to be a RPM package

Hi Guys I got this error when I try to install perl-5.24.0-1.aix6.1.ppc.rpm package rpm -ivh perl-5.24.0-1.aix6.1.ppc.rpm error: perl-5.24.0-1.aix6.1.ppc.rpm does not appear to be a RPM package (4 Replies)
Discussion started by: khaled_ly84
4 Replies

2. Linux

Difference in binary file sizes after deploying package via yum/rpm

Hi Guys, I have an issue whereby I package up an rpm and when I deploy it, the binary filesizes differ from what I packaged up from the SOURCE directory. from source - -rwxrwxr-x 1 user group 685156 Sep 26 15:50 cybAgent.bin after install - -rwxr-xr-x 1 user group 683388 Oct 16 11:10... (4 Replies)
Discussion started by: gazza-o
4 Replies

3. Emergency UNIX and Linux Support

Problem when trying to remove a package using rpm command - error: package is not installed

Hello, i have installed a package by using the command sudo rpm -i filepackage.rpm package filepackage is already installed when i try to remove it, i get an error saying "is not installed": sudo rpm -e filepackage.rpm error: package filepackage is not installed How can... (4 Replies)
Discussion started by: g_p
4 Replies

4. UNIX for Dummies Questions & Answers

Can't install rpm package with --prefix in new path.Error: package is not relocatable

Hello, i have downloaded an rpm package "hadoop-0.20.205.0-1.amd64.rpm" in /usr/local/ directory. I'm trying to install the rpm package in a new path/location (/usr/local/hadoop-0.20.205), but i can't. I did: 1st try: Didn't work sudo rpm -i --prefix=/usr/local/hadoop-0.20.205... (1 Reply)
Discussion started by: g_p
1 Replies

5. Red Hat

Creating rpm package file

Hi, I have a binary file ans some scripts which copy the binary file to a location and create some files and then add a entry to cron . I want to create a rpm package file for all these.So that if a user run: rpm -i my.rpm the binary is copied and scripts are run. Can anyone help me in... (1 Reply)
Discussion started by: kailash19
1 Replies

6. UNIX for Advanced & Expert Users

How to find dependancies of .dstream package (Solaris) & .rpm package( linux)

Friends, Please let meknow, How we can find the dependancies of .dstream package & .rpm package before installation ? For AIX, We can use the inutoc . command to create the .toc file for the bff package, What about Solaris & Linux ? (0 Replies)
Discussion started by: yb4779
0 Replies

7. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

8. Shell Programming and Scripting

rebuild/update fuppes database if files are added/removed from directory

The title says it all. I have a upnp server running fuppes that is connected to my xbox360. In order to see the files on the xbox360 i have to manually update and rebuild the database anytime i add or remove files. I have tried cron jobs to do it every 20 min which works, but if I am streaming... (0 Replies)
Discussion started by: tr6699
0 Replies

9. Ubuntu

Rpm package

Hi All, I just recently installed UBUNTU 2.6.24-16 and i installed my phone software which is a RPM package (it's a similiar package with MSN). The software called MXIE. I managed to install it successfully but i can't run the software. When i try to run it, i received... (8 Replies)
Discussion started by: c00kie88
8 Replies

10. Linux

how to restore original package after uninstalling the upgraded package using rpm

have following package installed rpm -qa |grep ADMIN It will give the following package installed: ADMIN-4.0.0.1 Now I will upgrade the ADMIN package using the following command. rpm --upgrade ADMIN-4.1.0.1 It will upgrade the ADMIN packagge to ADMIN-4.1.0.1 Now I want that... (0 Replies)
Discussion started by: amitpansuria
0 Replies
Login or Register to Ask a Question