RPM Community Forums

Mailing List Message of <rpm-users>

Re: hard-linked files handling by rpm

From: Rajul Bhavsar <rajulbhavsar@gmail.com>
Date: Wed 22 Jan 2014 - 03:49:15 CET
Message-ID: <CAHNGuEM1b4cm4sYswJtivJp3PVZxd1rYTqPDOvU0=KFxLOtZjg@mail.gmail.com>
On Tue, Jan 21, 2014 at 10:23 PM, Jeffrey Johnson <n3npq@me.com> wrote:

>
> On Jan 21, 2014, at 3:03 AM, Rajul Bhavsar <rajulbhavsar@gmail.com> wrote:
>
> > Hi,
> >
> > In my build root directory, I have created a file (say temp.txt) and
> then I created a hard-link to it (say temp1.txt). After this, I created rpm
> out of build root directory. On installing this rpm I see that i-node
> numbers of both files are same; that means rpm is aware of this hard-link
> and creating the same on rpm installation.
> >
> > But, I am not able to understand how rpm has treated this hard-link with
> a .rpm file.
> > For example, I have a file with 5k size. On duplicating it, rpm size
> increased by ~2.5k but with hard-link it increased by 1.9k. What is this
> 1.9k? Is this totally a metadata about hard-link or something else?
> >
> > Please help me in understanding this hard-link handling.
> >
>
> The size change is likely in the cpio payload in a *.rpm package because
> rpm doesn’t track hard links directly, uses the inode info to infer hard
> links.
> >>> If hard-links are treated as just another files (for inclusion in
> .rpm) then why difference in size of payload - when same file is duplicated
> and hard-linked?
>


> You can see all metadata with
>         rpm -qp —yaml  somepackage.rpm
> There is also —xml if you prefer the eye-scratchy angle bracket syntax.
>
> hth
>
> 73 de Jeff
> > Thanks,
> > Rajul
>
> ______________________________________________________________________
> RPM Package Manager                                    
> User Communication List                             rpm-users@rpm5.org
>
Received on Wed Jan 22 03:49:17 2014
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.