LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


View Poll Results: Package name in xattrs?
I like this idea 0 0%
I don't like this idea 23 88.46%
This should really go into makepkg 3 11.54%
Voters: 26. You may not vote on this poll

Reply
  Search this Thread
Old 06-17-2020, 10:21 PM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
Thumbs up Recording a file-containing package into an eXtended ATTRibute.


Hello, everyone.

This topic is not actually a question but if someone is feeling adventurous, beta-testers welcome.

I I got tired of grepping /var/lib/pkgtools/packages/* , and wanted to implement the O(1) method of finding "what package this file belongs to".

So I added the following into /sbin/installpkg at line 659 (after the untar-if):

Code:
 while read -r
 do
     #pkg_files+=("$REPLY")
     if [[ -f "$ROOT/$REPLY" ]]
     then
     setfattr -n user.beta.slackware.pkgtools.package \
 	       -v "$shortname" \
 	       -h \
 	       "$ROOT/$REPLY"
     fi
 done < <(cat "$TMP/$shortname")
I also changed the shebang of the file from "/bin/sh" to "/bin/bash", for the "<(..)" to work. It's possible to rewrite this more portably, but I don't think many people actually have sh that is not bash. If anybody really wants it, ping me.

It's kinda slower for numFiles-bound packages. On kernel-source it's:

Code:
No xattr: Package kernel-source-5.4.46-noarch-1.txz installed.

real	0m48.604s
user	0m44.882s
sys	0m17.139s

xattr:    Package kernel-source-5.4.46-noarch-1.txz installed.

real	4m37.083s
user	3m21.302s
sys	1m32.191s
For me the difference of 5 minutes on the package that has probably the largest number of files doesn't matter too much. ( I guess if I had a patch for tar to append an xattr manually, it would have no performance penalty. )

I guess this could also be offloaded to "makepkg", which would only incur this penalty once on the packager's machine.

If anybody finds this useful, I can make this patch for makepkg too, and even suggest including in the mainline.

Tests on filesystems that don't support xattrs are wecome. It's likely that the script will just complain, and nothing more, I have no FAT machines to test.

You can then check the result with getfattr -d filename.

Last edited by Lockywolf; 06-17-2020 at 10:29 PM.
 
Old 06-18-2020, 01:23 AM   #2
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Interesting idea, do any other Linux package managers do this?
 
Old 06-18-2020, 02:03 AM   #3
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
I am not sure if all Linux filesystems supports XATTRs and anyway there are many files which are shipped by multiple Slackware packages.

So, I do not think this is a good idea.
 
1 members found this post helpful.
Old 06-18-2020, 02:53 AM   #4
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
Quote:
Originally Posted by LuckyCyborg View Post
I am not sure if all Linux filesystems supports XATTRs and anyway there are many files which are shipped by multiple Slackware packages.
So, I do not think this is a good idea.
Certainly not all, although I guess all supported by the Slackware installer, except FAT.

I should have potentially called the attribute "last_providing_package", because indeed, there are files provided by multiple packages, but any way "a" file is actually coming from "a particular" package. And even when removepkg removes a package, and does _not_ remove a file due to package intersections, it doesn't _revert_ a file, so I think that keeping a memory that "this file is recorded as belonging to package B that you have in your system, but hey, it actually comes from some other package A that you uninstalled" is valuable.

Quote:
do any other Linux package managers do this?
Eh, sorry, it's been such a long time since I used other distros deep enough. I don't think so.

Last edited by Lockywolf; 06-18-2020 at 02:55 AM.
 
Old 06-18-2020, 06:36 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
[OT]Can we please avoid bashisms?[/OT]

Last edited by Didier Spaier; 06-18-2020 at 11:58 AM.
 
Old 06-18-2020, 09:16 AM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
[OT]No - Bash is the standard Linux shell. POSIX may be lingua franca in *nix, but I refuse to conform to the limitations.[/OT]
 
1 members found this post helpful.
Old 06-18-2020, 09:23 AM   #7
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
Quote:
Originally Posted by Lockywolf View Post
I I got tired of grepping /var/lib/pkgtools/packages/* , and wanted to implement the O(1) method of finding "what package this file belongs to".
Just wondering? Perhaps I don't correctly understand what you want to do. You can search for files with slackpkg to find out what packages they belong to.

From the slacpkg man page
Code:
       file-search
            You can search the official Slackware packages for any file in the Slackware distribution.  Do you need a  strange  li‐
            brary?  Use file-search to find it.

                 # slackpkg file-search filename

            All  packages  with  matching  "filename" will be shown, thus you can see whether the packages are installed or not; if
            not, you can download and install them with other slackpkg actions.
Here is a search with slackpkg+ installed:
Code:
# slackpkg file-search irqbypass

Looking for irqbypass in package list. Please wait... DONE

The list below shows the packages that contains "irqbypass" file.

[ Status    ] [ Repository  ] [ Package                                                            ]
  installed     slackware64     kernel-modules-5.4.46-x86_64-1                                    
  installed     slackware64     kernel-source-5.4.46-noarch-1                                     
  upgrade       slackware64     kernel-modules-5.4.45-x86_64-1 --> kernel-modules-5.4.46-x86_64-1 
  upgrade       slackware64     kernel-source-5.4.45-noarch-1 --> kernel-source-5.4.46-noarch-1   

You can search specific packages using "slackpkg search package".
Here is the same search with slackpkg+ turned off:
Code:
# SLACKPKGPLUS=off slackpkg file-search irqbypass

Looking for irqbypass in package list. Please wait... DONE

The list below shows the packages that contains "irqbypass" file.

[  upgrade  ] - kernel-modules-5.4.45-x86_64-1
kernel-modules-5.4.46-x86_64-1 --> kernel-modules-5.4.46-x86_64-1
[  upgrade  ] - kernel-source-5.4.45-noarch-1
kernel-source-5.4.46-noarch-1 --> kernel-source-5.4.46-noarch-1

You can search specific packages using "slackpkg search package".
 
Old 06-18-2020, 11:16 AM   #8
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
Quote:
Originally Posted by chrisretusn View Post
Just wondering? Perhaps I don't correctly understand what you want <...>
You can search specific packages using "slackpkg search package".[/code]
Indeed you can, but slackpkg has no other way to find the package than to look in the database, which basically means to check every file for a line containing the path being searched.

That is the O(n) search where n is the number of packages, and actually O(n*m), where m is the average number of files in a package. The m is not super important, because it's usually fast, but n means n disk accesses.

This's basically caching.

Quote:
Here is the same search with slackpkg+ turned off:
_A_ file comes from _A_ concrete package. Which one does it _actually_ come from, if two packages provide it?

Last edited by Lockywolf; 06-18-2020 at 11:19 AM.
 
Old 06-18-2020, 01:09 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Maybe I just don't understand the xattr benefit, but is the penalty when installing packages (almost 6x slower with your example) really worth what can simply be done with a bash function that can be added per user (.bashrc or .bash_profile) or systemwide (/etc/profile.d/ entry)?

Code:
searchpkg () { grep -R "$1" /var/lib/pkgtool/packages; }
 
Old 06-18-2020, 01:44 PM   #10
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Also, extended attributes are lost if you don't preserve them when copying or archiving.
 
Old 06-18-2020, 07:20 PM   #11
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
A couple random thoughts:

1. The extra time is an academic matter, to be tackled academically. Something is serializing the setfattr operation in the OP. It should be journaled, if the underlying FS supports it. @LockyWolf, what FS is your root?

2. If the FS is FAT, eh, forget it. Or at least, throw the error messages into the bit-bucket.

3. The shellfunc I used a few years ago was simply
Code:
whichpkg () { grep -l "$1" /var/log/packages/* }
It was crude, but it got the job done.

4. @TheRealGrogan, copying or archiving the root partition is a rare matter for most users (actually, admins). Let's say it does happen, that you transfer root to another device's partition. It's up to you, as admin, to (a) make sure the FS supports fattr's, and (b) use the proper parameters to tar (--acls --selinux --xattrs) or rsync (-A -X) to make sure the attributes get copied.

5. There used to be a few editors that weren't file-attribute-aware. Using them to modify files under /etc would cause the files to lose their attributes. (I don't remember what they were, although the line-oriented "ed" comes to mind. Not like anyone uses that interactively.)

Now, I'm going to design some tests, to find out why "setfattr" is adding so much time on individual files.

Last edited by gus3; 06-19-2020 at 07:22 PM. Reason: should be "grep -l", not "grep -L"
 
Old 06-18-2020, 08:28 PM   #12
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
Quote:
Originally Posted by Lockywolf View Post
Indeed you can, but slackpkg has no other way to find the package than to look in the database, which basically means to check every file for a line containing the path being searched.

That is the O(n) search where n is the number of packages, and actually O(n*m), where m is the average number of files in a package. The m is not super important, because it's usually fast, but n means n disk accesses.

This's basically caching.
That search for a specific file in kernel-source was fast.
real 0m2.173s
user 0m1.079s
sys 0m1.175s

With slackpkg+ installed you can be more specific in a search:
Code:
# time slackpkg file-search /virt/lib/Makefile

Looking for virt/lib/Makefile in package list. Please wait... DONE

The list below shows the packages that contains "virt/lib/Makefile" file.

[ Status    ] [ Repository  ] [ Package                                                          ]
  installed     slackware64     kernel-source-5.4.46-noarch-1                                   
  upgrade       slackware64     kernel-source-5.4.45-noarch-1 --> kernel-source-5.4.46-noarch-1 

real    0m1.359s
user    0m1.008s
sys     0m1.046s
Quote:
Originally Posted by Lockywolf View Post
_A_ file comes from _A_ concrete package. Which one does it _actually_ come from, if two packages provide it?
Both packages.

I am still failing to see any advantage in using xattrib. How do you handle files that are located in many packages.

Code:
root@racermach:~# time slackpkg file-search Makefile          

Looking for Makefile in package list. Please wait... DONE

The list below shows the packages that contains "Makefile" file.

[ Status              ] [ Repository  ] [ Package                                                          ]
  installed               alienbob        calibre-4.15.0-x86_64-1alien                                    
  installed               alienbob        libreoffice-6.4.4-x86_64-1alien                                 
  installed               ktown           dotconf-1.3-x86_64-1alien                                       
  installed               ktown           kde-dev-scripts-20.04.1-x86_64-1alien                           
  installed               ktown           oxygen-icons5-5.70.0-noarch-1alien                              
  installed               multilib        glibc-2.30_multilib-x86_64-1alien                               
  installed               multilib        icu4c-compat32-67.1-x86_64-1compat32                            
  installed               multilib        qt-compat32-4.8.7-x86_64-16compat32                             
  installed               nonslack        blender-2.79b-x86_64-3cgs                                       
  installed               nonslack        rsnapshot-1.4.2-x86_64-3cgs                                     
  installed               restricted      ffmpeg-4.2.1-x86_64-1alien                                      
  installed               slackware64     Cython-0.29.20-x86_64-1                                         
  installed               slackware64     M2Crypto-0.35.2-x86_64-5                                        
  installed               slackware64     QScintilla-2.11.5-x86_64-1                                      
  installed               slackware64     alpine-2.22.1-x86_64-1                                          
  installed               slackware64     bash-5.0.017-x86_64-1                                           
  installed               slackware64     bind-9.16.3-x86_64-1                                            
  installed               slackware64     bison-3.6.4-x86_64-1                                            
  installed               slackware64     cdrdao-1.2.4-x86_64-1                                           
  installed               slackware64     clisp-2.50_20191103_c26de7873-x86_64-2                          
  installed               slackware64     cmake-3.17.3-x86_64-1                                           
  installed               slackware64     conntrack-tools-1.4.6-x86_64-1                                  
  installed               slackware64     curl-7.70.0-x86_64-1                                            
  installed               slackware64     cyrus-sasl-2.1.27-x86_64-4                                      
  installed               slackware64     doxygen-1.8.18-x86_64-1                                         
  installed               slackware64     emacs-26.3-x86_64-3                                             
  installed               slackware64     enscript-1.6.6-x86_64-2                                         
  installed               slackware64     epic5-2.1.2-x86_64-1                                            
  installed               slackware64     expect-5.45.4-x86_64-2                                          
  installed               slackware64     gettext-tools-0.20.2-x86_64-1                                   
  installed               slackware64     git-2.27.0-x86_64-1                                             
  installed               slackware64     glib2-2.64.3-x86_64-1                                           
  installed               slackware64     gnuplot-5.2.8-x86_64-2                                          
  installed               slackware64     gobject-introspection-1.64.1-x86_64-1                           
  installed               slackware64     groff-1.22.4-x86_64-2                                           
  installed               slackware64     icu4c-67.1-x86_64-1                                             
  installed               slackware64     intltool-0.51.0-x86_64-4                                        
  installed               slackware64     kernel-firmware-20200610_887d2a1-noarch-1                       
  installed               slackware64     kernel-source-5.4.46-noarch-1                                   
  installed               slackware64     keybinder3-3.0_0.3.2-x86_64-1                                   
  installed               slackware64     libcroco-0.6.13-x86_64-1                                        
  installed               slackware64     libidn-1.35-x86_64-2                                            
  installed               slackware64     libiodbc-3.52.13-x86_64-1                                       
  installed               slackware64     libnjb-2.2.7-x86_64-2                                           
  installed               slackware64     liboggz-1.1.1-x86_64-3                                          
  installed               slackware64     libtool-2.4.6-x86_64-13                                         
  installed               slackware64     lilo-24.2-x86_64-9                                              
  installed               slackware64     linuxdoc-tools-0.9.73-x86_64-5                                  
  installed               slackware64     lm_sensors-3.6.0-x86_64-1                                       
  installed               slackware64     m4-1.4.18-x86_64-2                                              
  installed               slackware64     mc-4.8.24-x86_64-1                                              
  installed               slackware64     mpg123-1.26.1-x86_64-1                                          
  installed               slackware64     nano-4.9.3-x86_64-1                                             
  installed               slackware64     nc-1.10-x86_64-2                                                
  installed               slackware64     net-snmp-5.8-x86_64-5                                           
  installed               slackware64     ntp-4.2.8p14-x86_64-1                                           
  installed               slackware64     p2c-2.01-x86_64-1                                               
  installed               slackware64     perl-5.30.3-x86_64-1                                            
  installed               slackware64     php-7.4.7-x86_64-1                                              
  installed               slackware64     python-pip-20.1.1-x86_64-1                                      
  installed               slackware64     python-urllib3-1.25.9-x86_64-1                                  
  installed               slackware64     python2-2.7.18-x86_64-1                                         
  installed               slackware64     python2-module-collection-2.7.18-x86_64-1                       
  installed               slackware64     python3-3.8.3-x86_64-1                                          
  installed               slackware64     qt-4.8.7-x86_64-16                                              
  installed               slackware64     rsync-3.1.3-x86_64-2                                            
  installed               slackware64     ruby-2.7.1-x86_64-1                                             
  installed               slackware64     samba-4.12.3-x86_64-1                                           
  installed               slackware64     sane-1.0.30-x86_64-1                                            
  installed               slackware64     swig-4.0.2-x86_64-1                                             
  installed               slackware64     texlive-2019.190626-x86_64-4                                    
  installed               slackware64     traceroute-2.1.0-x86_64-2                                       
  installed               slackware64     vala-0.48.6-x86_64-1                                            
  installed               slackware64     vim-8.2.0901-x86_64-1                                           
  installed               slackware64     xz-5.2.5-x86_64-1                                               
  installed               slackware64     yptools-2.14-x86_64-12                                          
  uninstalled             alienbob        calibre2-2.85.1-x86_64-1alien                                   
  uninstalled             alienbob        nodejs-8.12.0-x86_64-1alien                                     
  uninstalled             extra           emacspeak-38.0-x86_64-1                                         
  uninstalled             extra           sendmail-8.15.2-x86_64-3                                        
  uninstalled             extra           sendmail-cf-8.15.2-noarch-3                                     
  uninstalled             slackware64     kde-l10n-ca-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-da-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-de-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-es-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-et-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-fr-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-gl-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-it-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-nl-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-pt-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-pt_BR-4.14.3-noarch-1                                  
  uninstalled             slackware64     kde-l10n-sv-4.14.3-noarch-1                                     
  uninstalled             slackware64     kde-l10n-uk-4.14.3-noarch-1                                     
  uninstalled             slackware64     kdeartwork-4.14.3-x86_64-3                                      
  uninstalled             slackware64     oxygen-icons-4.14.3-x86_64-3                                    
  uninstalled(masked)     alienbob        ffmpeg-4.2.1-x86_64-1alien                                      
  uninstalled(masked)     alienbob        rsnapshot-1.3.1-x86_64-1alien                                   
  uninstalled(masked)     extra           ffmpeg-4.3-x86_64-1_alsa                                        
  uninstalled(masked)     extra           mpg123-1.26.1-x86_64-1_alsa                                     
  uninstalled(masked)     slackware64     ffmpeg-4.3-x86_64-1                                             
  uninstalled(masked)     slackware64     glibc-2.30-x86_64-1                                             
  uninstalled(masked)     slackware64     kde-dev-scripts-4.14.3-x86_64-3                                 
  upgrade                 slackware64     kernel-source-5.4.45-noarch-1 --> kernel-source-5.4.46-noarch-1 
  upgrade                 slackware64     ktown:kate-20.04.1-x86_64-1alien --> kate-4.14.3-x86_64-4       

You can search specific packages using "slackpkg search package".



real    0m2.521s
user    0m1.662s
sys     0m1.917s
 
1 members found this post helpful.
Old 06-19-2020, 01:02 AM   #13
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
Quote:
The extra time is an academic matter, to be tackled academically. Something is serializing the setfattr operation in the OP. It should be journaled, if the underlying FS supports it. @LockyWolf, what FS is your root?
F2FS is my root FS.

I am not actually surprised by the 6 times slowdown, it's absolutely expected, since creating a process in Linux is an expensive operation, and each setfattr creates a separate process. I don't think it is filesystem-related.

Again, the much better behaviour would be to only have this slowdown once, on the packager's machine.

Quote:
That search for a specific file in kernel-source was fast.
TWO seconds is "fast"? Are you joking or what?

Code:
root@delllaptop:/usr/src/linux/virt/lib# time slackpkg file-search /virt/lib/Makefile
Looking for virt/lib/Makefile in package list. Please wait... DONE

The list below shows the packages that contains "virt/lib/Makefile" file.

[ Status           ] [ Repository               ] [ Package                                 ]
   installed               slackware64                  kernel-source-5.4.46-noarch-1             

You can search specific packages using "slackpkg search package".
real	0m1.737s
user	0m0.681s
sys	0m0.278s

root@delllaptop:/usr/src/linux/virt/lib# time getfattr -d Makefile 
# file: Makefile
user.beta.slackware.pkgtools.package="kernel-source-5.4.46-noarch-1"

real	0m0.004s
user	0m0.002s
sys	0m0.002s
root@delllaptop:/usr/src/linux/virt/lib#
Quote:
Both packages.
What you are saying, contradicts not just the laws of physics, but the laws of mathematics. Set theory specifically.

Quote:
How do you handle files that are located in many packages.
Do you understand that these are not the same file by any standard? In fact, the _only_ thing that they have in common is the basename.

Last edited by Lockywolf; 06-19-2020 at 01:03 AM.
 
Old 06-19-2020, 03:50 AM   #14
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Quote:
Originally Posted by allend View Post
[OT]No - Bash is the standard Linux shell. POSIX may be lingua franca in *nix, but I refuse to conform to the limitations.[/OT]
Ok, then can we at least not use unnecessary ones.

Code:
done < <(cat "$TMP/$shortname")
That cat process substitution is completely pointless.
done < "$TMP/$shortname" will suffice.


Anyway, back on topic I don't like the idea of using extended attributes for this for much the same reasons as others have already mentioned.
 
Old 06-19-2020, 08:27 AM   #15
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
Quote:
Originally Posted by Lockywolf View Post
TWO seconds is "fast"? Are you joking or what?
No.

Quote:
Originally Posted by Lockywolf View Post
Code:
No xattr: Package kernel-source-5.4.46-noarch-1.txz installed.

real	0m48.604s
user	0m44.882s
sys	0m17.139s

xattr:    Package kernel-source-5.4.46-noarch-1.txz installed.

real	4m37.083s
user	3m21.302s
sys	1m32.191s
Quote:
Originally Posted by Lockywolf View Post
Code:
root@delllaptop:/usr/src/linux/virt/lib# time slackpkg file-search /virt/lib/Makefile
Looking for virt/lib/Makefile in package list. Please wait... DONE

The list below shows the packages that contains "virt/lib/Makefile" file.

[ Status           ] [ Repository               ] [ Package                                 ]
   installed               slackware64                  kernel-source-5.4.46-noarch-1             

You can search specific packages using "slackpkg search package".
real	0m1.737s
user	0m0.681s
sys	0m0.278s

root@delllaptop:/usr/src/linux/virt/lib# time getfattr -d Makefile 
# file: Makefile
user.beta.slackware.pkgtools.package="kernel-source-5.4.46-noarch-1"

real	0m0.004s
user	0m0.002s
sys	0m0.002s
root@delllaptop:/usr/src/linux/virt/lib#
Okay that is fast.

Quote:
Originally Posted by Lockywolf View Post
_A_ file comes from _A_ concrete package. Which one does it _actually_ come from, if two packages provide it?
Quote:
Originally Posted by chrisretusn View Post
Both packages.
Quote:
Originally Posted by Lockywolf View Post
What you are saying, contradicts not just the laws of physics, but the laws of mathematics. Set theory specifically.
virt/lib/Makefile is identical in both kernel-source-5.4.45-noarch-1 and kernel-source-5.4.46-noarch-1


Quote:
Do you understand that these are not the same file by any standard? In fact, the _only_ thing that they have in common is the basename.
Okay then, I'm clueless.

What it looks like to me is you want to include xattrib data to every file in every package that identifies what packages it comes from. Guess I fail to understand the beneficial gain from doing so.

Last edited by chrisretusn; 06-19-2020 at 08:29 AM.
 
  


Reply

Tags
installpkg, pkgtools, xattr



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
Need to create a new Attribute in OpenLDAP and map it with existing attribute kovvuri Linux - Kernel 1 02-19-2020 12:43 PM
[SOLVED] ldap_add undefined attribute type (17) additional info attribute type undefined yashfire007 Linux - Newbie 6 03-20-2015 09:12 AM
How do I modify 1 of my ldap attribute if I have 2 same attribute under 1 entry? chinho Programming 1 01-31-2011 03:37 AM
update problem "Attribute error object has no attribute 'rsplit' ruse Linux - Newbie 0 08-28-2009 01:46 AM
ldap_add: Undefined attribute type (17) additional info: ojectclass: attribute type vinaytp Linux - Newbie 2 05-28-2009 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:30 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