Re: rpmdb not updated with installed packages

2013-12-17 Thread bishwajit goswami
Hi,

This issue I am facing is with rpm-5.1.9.
When an installation is tried with --root, the local rpmdb is referred
leading to a situation which is similar to an upgrade scenario.
This causes the rpmdb to be updated with lesser number of rpms than the
number of rpms actually installed.

I tried the same operation without --root, but with a different --dbpath to
see if local rpmdb gets accessed.
I do not see reference to local rpmdb in such a case.

Any help in this regard would be appreciated.

Thanks and Regards,
Bishwajit


On Mon, Dec 16, 2013 at 1:00 PM, bishwajit goswami <
bswjt.callmeb...@gmail.com> wrote:

> Hi Jeff,
>
> Thanks for looking into this issue.
> I have looked at the output and I find a few things confusing:
> While the rpm installation is over a new partition specified by --root,
> the rpm installation during its flow refers to the current rpmdb for a few
> databases as below (partition being prepared is /partprep, current rpmdb is
> available at /rpmdb/lib/rpm):
> D: opening  db index   /partprep/rpmdb/lib/rpm/Name create mode=0x42
> D: running pre-transaction scripts
> D: computing 214 file fingerprints
> D: pool ht: created size 64 limit -1 flags 0
> Preparing...D: computing file dispositions
> D: opening  db index  * /rpmdb/lib/rpm/Basenames* create mode=0x42
>
> Such databases include:
> Triggername
> Group
> Providename
> Requirename
> Dirnames
> Requireversion
> Provideversion
> Installtid,etc.
>
> Going by this output, I renamed the current rpmdb and triggered the same
> command for rpm installation on the new partition.
> This time, the installation was proper and query returned successfully all
> the installed rpms.
>
> Do let me know the reason for this behavior and if there is a fix
> available.
>
> Regards,
> Bishwajit
>
>
>
> On Thu, Dec 12, 2013 at 11:40 PM, Jeffrey Johnson  wrote:
>
>>
>> On Dec 12, 2013, at 12:34 PM, bishwajit goswami wrote:
>>
>> Hi,
>>
>> I have a partition up and running with a set of RPMs. Now I want to
>> prepare a backup partition with the same set of rpms. The installation goes
>> through properly and the corresponding files are available on the alternate
>> partition.
>> The problem comes when querying the rpmdb of the created partition. The
>> rpmdb do not seem to be updated with all the packages which were installed.
>> A sample snapshot is below:
>> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -ivh --nodeps --root /partprep
>> ncs6k-sysadmin-boot.*
>> Preparing...
>> ##
>> ncs6k-sysadmin-boot.sc
>> ##
>> ncs6k-sysadmin-boot.all
>> ##
>> ncs6k-sysadmin-boot.lc
>> ##
>> ncs6k-sysadmin-boot.rp
>> ##
>> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -qa --root /partprep
>> ncs6k-sysadmin-boot.rp-5.2.0.01I-Default.x86_64
>> ncs6k-sysadmin-boot.lc-5.2.0.01I-Default.x86_64
>> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$
>>
>> When I check the double verbose output, I simply see that a few packages
>> got remove from addition to corresponding rpmdb files.
>> D: removing "ncs6k-sysadmin-boot.sc" from Name index.
>> D: removing 19 entries from Basenames index.
>> D: removing
>> "Calvados/ncs6k-sysadmin-boot/ncs6k-sysadmin/sc/Default/mandatory/PII
>>
>> Any suggestion would be helpful in this regard. If needed, I could attach
>> the verbose output.
>> Also, the rpmdb do not seem to be corrupt since rpm verification runs
>> smoothly.
>>
>>
>> If you actually used -i (rather than -U), then rpm should _NOT_ have
>> removed anything.
>>
>> The likeliest explanation is that there is an Obsoletes: in some package
>> that is causing a package to be removed.
>>
>> Examine the -vv output ... everything that rpm does is logged in -vv
>> output
>> (but there isn't enough information to guess the cause from what you
>> provided).
>>
>> 73 de Jeff
>>
>>
>> --
>> Bishwajit Goswami
>>
>>
>>
>
>
> --
> Bishwajit Goswami
> Software Engineer,
> Cisco Systems India Pvt. Lmited
> Bangalore
>



-- 
Bishwajit Goswami
Software Engineer,
Cisco Systems India Pvt. Lmited
Bangalore


Re: rpmdb not updated with installed packages

2013-12-15 Thread bishwajit goswami
Hi Jeff,

Thanks for looking into this issue.
I have looked at the output and I find a few things confusing:
While the rpm installation is over a new partition specified by --root, the
rpm installation during its flow refers to the current rpmdb for a few
databases as below (partition being prepared is /partprep, current rpmdb is
available at /rpmdb/lib/rpm):
D: opening  db index   /partprep/rpmdb/lib/rpm/Name create mode=0x42
D: running pre-transaction scripts
D: computing 214 file fingerprints
D: pool ht: created size 64 limit -1 flags 0
Preparing...D: computing file dispositions
D: opening  db index  * /rpmdb/lib/rpm/Basenames* create mode=0x42

Such databases include:
Triggername
Group
Providename
Requirename
Dirnames
Requireversion
Provideversion
Installtid,etc.

Going by this output, I renamed the current rpmdb and triggered the same
command for rpm installation on the new partition.
This time, the installation was proper and query returned successfully all
the installed rpms.

Do let me know the reason for this behavior and if there is a fix available.

Regards,
Bishwajit



On Thu, Dec 12, 2013 at 11:40 PM, Jeffrey Johnson  wrote:

>
> On Dec 12, 2013, at 12:34 PM, bishwajit goswami wrote:
>
> Hi,
>
> I have a partition up and running with a set of RPMs. Now I want to
> prepare a backup partition with the same set of rpms. The installation goes
> through properly and the corresponding files are available on the alternate
> partition.
> The problem comes when querying the rpmdb of the created partition. The
> rpmdb do not seem to be updated with all the packages which were installed.
> A sample snapshot is below:
> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -ivh --nodeps --root /partprep
> ncs6k-sysadmin-boot.*
> Preparing...
> ##
> ncs6k-sysadmin-boot.sc
> ##
> ncs6k-sysadmin-boot.all
> ##
> ncs6k-sysadmin-boot.lc
> ##
> ncs6k-sysadmin-boot.rp
> ##
> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -qa --root /partprep
> ncs6k-sysadmin-boot.rp-5.2.0.01I-Default.x86_64
> ncs6k-sysadmin-boot.lc-5.2.0.01I-Default.x86_64
> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$
>
> When I check the double verbose output, I simply see that a few packages
> got remove from addition to corresponding rpmdb files.
> D: removing "ncs6k-sysadmin-boot.sc" from Name index.
> D: removing 19 entries from Basenames index.
> D: removing
> "Calvados/ncs6k-sysadmin-boot/ncs6k-sysadmin/sc/Default/mandatory/PII
>
> Any suggestion would be helpful in this regard. If needed, I could attach
> the verbose output.
> Also, the rpmdb do not seem to be corrupt since rpm verification runs
> smoothly.
>
>
> If you actually used -i (rather than -U), then rpm should _NOT_ have
> removed anything.
>
> The likeliest explanation is that there is an Obsoletes: in some package
> that is causing a package to be removed.
>
> Examine the -vv output ... everything that rpm does is logged in -vv output
> (but there isn't enough information to guess the cause from what you
> provided).
>
> 73 de Jeff
>
>
> --
> Bishwajit Goswami
>
>
>


-- 
Bishwajit Goswami
Software Engineer,
Cisco Systems India Pvt. Lmited
Bangalore


Re: rpmdb not updated with installed packages

2013-12-12 Thread Jeffrey Johnson

On Dec 12, 2013, at 12:34 PM, bishwajit goswami wrote:

> Hi,
> 
> I have a partition up and running with a set of RPMs. Now I want to prepare a 
> backup partition with the same set of rpms. The installation goes through 
> properly and the corresponding files are available on the alternate partition.
> The problem comes when querying the rpmdb of the created partition. The rpmdb 
> do not seem to be updated with all the packages which were installed. A 
> sample snapshot is below:
> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -ivh --nodeps --root /partprep 
> ncs6k-sysadmin-boot.*
> Preparing...##
> ncs6k-sysadmin-boot.sc  ##
> ncs6k-sysadmin-boot.all ##
> ncs6k-sysadmin-boot.lc  ##
> ncs6k-sysadmin-boot.rp  ##
> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$ rpm -qa --root /partprep
> ncs6k-sysadmin-boot.rp-5.2.0.01I-Default.x86_64
> ncs6k-sysadmin-boot.lc-5.2.0.01I-Default.x86_64
> [sysadmin-vm:0_RP0:/mnt/rpm/calvados]$
> 
> When I check the double verbose output, I simply see that a few packages got 
> remove from addition to corresponding rpmdb files.
> D: removing "ncs6k-sysadmin-boot.sc" from Name index.
> D: removing 19 entries from Basenames index.
> D: removing 
> "Calvados/ncs6k-sysadmin-boot/ncs6k-sysadmin/sc/Default/mandatory/PII
> 
> Any suggestion would be helpful in this regard. If needed, I could attach the 
> verbose output.
> Also, the rpmdb do not seem to be corrupt since rpm verification runs 
> smoothly.
> 

If you actually used -i (rather than -U), then rpm should _NOT_ have
removed anything.

The likeliest explanation is that there is an Obsoletes: in some package
that is causing a package to be removed.

Examine the -vv output ... everything that rpm does is logged in -vv output
(but there isn't enough information to guess the cause from what you provided).

73 de Jeff

> 
> -- 
> Bishwajit Goswami
>