* [gentoo-user] Crufted with perl modules? @ 2010-11-17 0:58 Grant 2010-11-17 1:21 ` Adam Carter 2010-11-17 14:15 ` Stroller 0 siblings, 2 replies; 19+ messages in thread From: Grant @ 2010-11-17 0:58 UTC (permalink / raw To: Gentoo mailing list I was having trouble getting g-cpan to work with a Bundle of CPAN perl modules and I got frustrated and started to install it with perl -MCPAN -e instead. After a little while I thought better of it and exited the installation, but should I now have perl modules spread across my filesystem that aren't known by portage? Is there any way to clean them up? Would installing the same Bundle with g-cpan be guaranteed to straighten everything out? - Grant ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 0:58 [gentoo-user] Crufted with perl modules? Grant @ 2010-11-17 1:21 ` Adam Carter 2010-11-17 1:42 ` Grant 2010-11-17 14:15 ` Stroller 1 sibling, 1 reply; 19+ messages in thread From: Adam Carter @ 2010-11-17 1:21 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 248 bytes --] but should I now have perl modules spread > across my filesystem that aren't known by portage? Is there any way > to clean them up? Would installing the same Bundle with g-cpan be > guaranteed to straighten everything out? > > qfile -orphans ? [-- Attachment #2: Type: text/html, Size: 443 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 1:21 ` Adam Carter @ 2010-11-17 1:42 ` Grant 2010-11-17 2:03 ` Willie Wong 0 siblings, 1 reply; 19+ messages in thread From: Grant @ 2010-11-17 1:42 UTC (permalink / raw To: gentoo-user > but should I now have perl modules spread >> >> across my filesystem that aren't known by portage? Is there any way >> to clean them up? Would installing the same Bundle with g-cpan be >> guaranteed to straighten everything out? >> > qfile -orphans ? That sounds promising but I get: # qfile --orphans Usage: qfile <opts> <filename> : list all pkgs owning files Options: -[ef:m:oRx:SvqChV] -e, --exact * Exact match -f, --from <arg> * Read arguments from file <arg> ("-" for stdin) -m, --max-args <arg> * Treat from file arguments by groups of <arg> (defaults to 5000) -o, --orphans * List orphan files -R, --root-prefix * Assume arguments are already prefixed by $ROOT -x, --exclude <arg> * Don't look in package <arg> -S, --slots * Display installed packages with slots -v, --verbose * Make a lot of noise -q, --quiet * Tighter output; suppress warnings -C, --nocolor * Don't output color -h, --help * Print this help and exit -V, --version * Print version and exit I'm not sure what it's asking me to do. - Grant ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 1:42 ` Grant @ 2010-11-17 2:03 ` Willie Wong 2010-11-17 3:18 ` Grant 2010-11-17 9:19 ` Joerg Schilling 0 siblings, 2 replies; 19+ messages in thread From: Willie Wong @ 2010-11-17 2:03 UTC (permalink / raw To: gentoo-user On Tue, Nov 16, 2010 at 05:42:24PM -0800, Grant wrote: > > qfile -orphans ? > > That sounds promising but I get: > > # qfile --orphans > Usage: qfile <opts> <filename> : list all pkgs owning files > qfile --orphans needs to take input a filename. So to go through your system looking for all orphaned files, you do something like find / -exec qfile -o '{}' \; ... which will produce a load of output that you don't want. So best to (1) restrict to smaller subdirectories (instead of /, do /usr/lib/perl5), and (2) redirect the output to disk. W -- Willie W. Wong wwong@math.princeton.edu Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire et vice versa ~~~ I. Newton ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 2:03 ` Willie Wong @ 2010-11-17 3:18 ` Grant 2010-11-17 9:10 ` Neil Bothwick 2010-11-17 9:19 ` Joerg Schilling 1 sibling, 1 reply; 19+ messages in thread From: Grant @ 2010-11-17 3:18 UTC (permalink / raw To: gentoo-user >> > qfile -orphans ? >> >> That sounds promising but I get: >> >> # qfile --orphans >> Usage: qfile <opts> <filename> : list all pkgs owning files >> > > qfile --orphans needs to take input a filename. > > So to go through your system looking for all orphaned files, you do > something like > > find / -exec qfile -o '{}' \; > > ... which will produce a load of output that you don't want. So best > to (1) restrict to smaller subdirectories (instead of /, do > /usr/lib/perl5), and (2) redirect the output to disk. Thanks Willie, that gave me a great list. Very cool command. Almost all the orphaned stuff in /usr/lib/perl5 is either in: /usr/lib/perl5/site_perl/5.12.2 with corresponding but not orphaned contents in: /usr/lib/perl5/vendor_perl/5.12.2 or the orphaned stuff is in: /usr/lib/perl5/5.12.2/x86_64-linux Do the orphaned files sound OK to delete in this case? Is there a slick way to do so? - Grant ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 3:18 ` Grant @ 2010-11-17 9:10 ` Neil Bothwick 0 siblings, 0 replies; 19+ messages in thread From: Neil Bothwick @ 2010-11-17 9:10 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1040 bytes --] On Tue, 16 Nov 2010 19:18:23 -0800, Grant wrote: > > find / -exec qfile -o '{}' \; > Thanks Willie, that gave me a great list. Very cool command. Almost > all the orphaned stuff in /usr/lib/perl5 is either in: > > /usr/lib/perl5/site_perl/5.12.2 > > with corresponding but not orphaned contents in: > > /usr/lib/perl5/vendor_perl/5.12.2 Does the first directory contain symlinks to the files in the second? You should exclude symlinks from the process by adding -type f to the find command (you can clear up dangling symlinks later). > or the orphaned stuff is in: > > /usr/lib/perl5/5.12.2/x86_64-linux > > Do the orphaned files sound OK to delete in this case? Is there a > slick way to do so? If you know which modules you installed with CPAN, you should be able to tell which directory contains the files you need to get rid of. Then run the find ... --orphans command over that directory and feed its output to rm. -- Neil Bothwick Will the last human please uninstall internet.exe. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 2:03 ` Willie Wong 2010-11-17 3:18 ` Grant @ 2010-11-17 9:19 ` Joerg Schilling 2010-11-17 12:52 ` Sebastian Beßler 1 sibling, 1 reply; 19+ messages in thread From: Joerg Schilling @ 2010-11-17 9:19 UTC (permalink / raw To: gentoo-user Willie Wong <wwong@Math.Princeton.EDU> wrote: > So to go through your system looking for all orphaned files, you do > something like > > find / -exec qfile -o '{}' \; > > ... which will produce a load of output that you don't want. So best This is why find -exec + exists since 20 years. Jörg -- EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js@cs.tu-berlin.de (uni) joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 9:19 ` Joerg Schilling @ 2010-11-17 12:52 ` Sebastian Beßler 2010-11-17 12:54 ` Albert Hopkins 0 siblings, 1 reply; 19+ messages in thread From: Sebastian Beßler @ 2010-11-17 12:52 UTC (permalink / raw To: gentoo-user Am 17.11.2010 10:19, schrieb Joerg Schilling: > This is why find -exec + exists since 20 years. Could you enlighten me about this? I look into man find but it says nothing about -exec + or a + operator at all. Also adding + to the command doesn't work either. Greetings Sebastian Beßler ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 12:52 ` Sebastian Beßler @ 2010-11-17 12:54 ` Albert Hopkins 2010-11-17 13:13 ` Sebastian Beßler 0 siblings, 1 reply; 19+ messages in thread From: Albert Hopkins @ 2010-11-17 12:54 UTC (permalink / raw To: gentoo-user On Wed, 2010-11-17 at 13:52 +0100, Sebastian Beßler wrote: > Am 17.11.2010 10:19, schrieb Joerg Schilling: > > > This is why find -exec + exists since 20 years. > > Could you enlighten me about this? > I look into man find but it says nothing about -exec + or a + operator > at all. Also adding + to the command doesn't work either. > Which man page are you looking at? It's in my find man page at least. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 12:54 ` Albert Hopkins @ 2010-11-17 13:13 ` Sebastian Beßler 2010-11-17 14:09 ` Albert Hopkins ` (2 more replies) 0 siblings, 3 replies; 19+ messages in thread From: Sebastian Beßler @ 2010-11-17 13:13 UTC (permalink / raw To: gentoo-user Am 17.11.2010 13:54, schrieb Albert Hopkins: > On Wed, 2010-11-17 at 13:52 +0100, Sebastian Beßler wrote: >> Am 17.11.2010 10:19, schrieb Joerg Schilling: >> >>> This is why find -exec + exists since 20 years. >> >> Could you enlighten me about this? >> I look into man find but it says nothing about -exec + or a + operator >> at all. Also adding + to the command doesn't work either. >> > > Which man page are you looking at? It's in my find man page at least. > > man find Aktionen -exec Kommando; führt das Kommando aus; die Aktion ist wahr, wenn das Kommando einen Status von Null liefert; alle auf den Kommandonamen folgenden Argumente bis zu einem Semikolon ; werden als Kommandozeilenargumente für das Kommando interpretiert; das Semikolon kann nicht weggelassen werden, und es muss durch mindestens ein Whitespace von der letzten Option getrennt werden; die Konstruktion {} wird durch den Pfadnamen der Datei ersetzt; die Klammern und das Semikolon müssen in der Kommandozeile für find quotiert werden, damit sie nicht von der Shell bearbeitet werden There is only one -exec option explained, no + to see. The only option with a + in my manpage is -perm +Modus No I have not tried the english version, I thought that a option that exists for 20 years should be in translated manpages too. The last line of the manpage says: LunetIX Linuxhandbuch 1.Juli 1993 FIND(1) so it is newer then 20 years but not much. That really should be updated. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 13:13 ` Sebastian Beßler @ 2010-11-17 14:09 ` Albert Hopkins 2010-11-17 14:09 ` Stroller 2010-11-17 22:14 ` John Campbell 2 siblings, 0 replies; 19+ messages in thread From: Albert Hopkins @ 2010-11-17 14:09 UTC (permalink / raw To: gentoo-user On Wed, 2010-11-17 at 14:13 +0100, Sebastian Beßler wrote: > Am 17.11.2010 13:54, schrieb Albert Hopkins: > > On Wed, 2010-11-17 at 13:52 +0100, Sebastian Beßler wrote: > >> Am 17.11.2010 10:19, schrieb Joerg Schilling: > >> > >>> This is why find -exec + exists since 20 years. > >> > >> Could you enlighten me about this? > >> I look into man find but it says nothing about -exec + or a + operator > >> at all. Also adding + to the command doesn't work either. > >> > > > > Which man page are you looking at? It's in my find man page at least. > > > > > > man find > > Aktionen > -exec Kommando; > führt das Kommando aus; die Aktion ist wahr, wenn das Kommando einen > Status von Null liefert; alle auf den Kommandonamen folgenden > Argumente bis zu einem Semikolon ; werden als Kommandozeilenargumente > für das Kommando interpretiert; das Semikolon kann nicht weggelassen > werden, und es muss durch mindestens ein Whitespace von der letzten > Option getrennt werden; die Konstruktion {} wird durch den Pfadnamen > der Datei ersetzt; die Klammern und das Semikolon müssen in der > Kommandozeile für find quotiert werden, damit sie nicht von der Shell > bearbeitet werden > > There is only one -exec option explained, no + to see. > The only option with a + in my manpage is -perm +Modus > > No I have not tried the english version, I thought that a option that > exists for 20 years should be in translated manpages too. I'm not sure where that man page came from. Says it conforms to 2003 POSIX. So is at least 10 years more recent than yours. http://linux.die.net/man/1/find ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 13:13 ` Sebastian Beßler 2010-11-17 14:09 ` Albert Hopkins @ 2010-11-17 14:09 ` Stroller 2010-11-17 22:14 ` John Campbell 2 siblings, 0 replies; 19+ messages in thread From: Stroller @ 2010-11-17 14:09 UTC (permalink / raw To: gentoo-user On 17/11/2010, at 1:13pm, Sebastian Beßler wrote: >>>> This is why find -exec + exists since 20 years. >>> >>> Could you enlighten me about this? >>> I look into man find but it says nothing about -exec + or a + operator >>> at all. Also adding + to the command doesn't work either. >> >> Which man page are you looking at? It's in my find man page at least. > > man find > > Aktionen > -exec Kommando; > führt das Kommando aus; die Aktion ist wahr, wenn das Kommando einen Status von Null liefert; alle auf den Kommandonamen folgenden Argumente bis zu einem Semikolon ; werden als Kommandozeilenargumente für das Kommando interpretiert; das Semikolon kann nicht weggelassen werden, und es muss durch mindestens ein Whitespace von der letzten Option getrennt werden; die Konstruktion {} wird durch den Pfadnamen der Datei ersetzt; die Klammern und das Semikolon müssen in der Kommandozeile für find quotiert werden, damit sie nicht von der Shell bearbeitet werden > > There is only one -exec option explained, no + to see. > The only option with a + in my manpage is -perm +Modus > > No I have not tried the english version, I thought that a option that exists for 20 years should be in translated manpages too. -exec command {} + This variant of the -exec action runs the specified command on the selected files, but the command line is built by appending each selected file name at the end; the total number of invoca‐ tions of the command will be much less than the number of matched files. The command line is built in much the same way that xargs builds its command lines. Only one instance of `{}' is allowed within the command. The command is executed in the starting directory. Stroller. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 13:13 ` Sebastian Beßler 2010-11-17 14:09 ` Albert Hopkins 2010-11-17 14:09 ` Stroller @ 2010-11-17 22:14 ` John Campbell 2010-11-17 22:21 ` Sebastian Beßler 2 siblings, 1 reply; 19+ messages in thread From: John Campbell @ 2010-11-17 22:14 UTC (permalink / raw To: gentoo-user On 11/17/2010 05:13 AM, Sebastian Beßler wrote: > Am 17.11.2010 13:54, schrieb Albert Hopkins: >> On Wed, 2010-11-17 at 13:52 +0100, Sebastian Beßler wrote: >>> Am 17.11.2010 10:19, schrieb Joerg Schilling: >>> >>>> This is why find -exec + exists since 20 years. >>> >>> Could you enlighten me about this? >>> I look into man find but it says nothing about -exec + or a + operator >>> at all. Also adding + to the command doesn't work either. >>> >> >> Which man page are you looking at? It's in my find man page at least. It's the section right after "-exec command {} ;" -exec command {} + This variant of the -exec action runs the specified command on the selected files, but the command line is built by appending each selected file name at the end; the total number of invocations of the command will be much less than the number of matched files. The command line is built in much the same way that xargs builds its command lines. Only one instance of `{}' is allowed within the command. The command is executed in the starting directory. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 22:14 ` John Campbell @ 2010-11-17 22:21 ` Sebastian Beßler 2010-11-17 22:49 ` Adam Carter 0 siblings, 1 reply; 19+ messages in thread From: Sebastian Beßler @ 2010-11-17 22:21 UTC (permalink / raw To: gentoo-user Am 17.11.2010 23:14, schrieb John Campbell: > On 11/17/2010 05:13 AM, Sebastian Beßler wrote: >> Am 17.11.2010 13:54, schrieb Albert Hopkins: >>> On Wed, 2010-11-17 at 13:52 +0100, Sebastian Beßler wrote: >>>> Am 17.11.2010 10:19, schrieb Joerg Schilling: >>>> >>>>> This is why find -exec + exists since 20 years. >>>> >>>> Could you enlighten me about this? >>>> I look into man find but it says nothing about -exec + or a + operator >>>> at all. Also adding + to the command doesn't work either. >>>> >>> >>> Which man page are you looking at? It's in my find man page at least. > > It's the section right after "-exec command {} ;" > > -exec command {} + It looks like the german man page doesn't have it in. I found it after all using the english man page. What good are the translations when features that old are not included? So today I have learned never to trust a translation. Greetings Sebastian Beßler ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 22:21 ` Sebastian Beßler @ 2010-11-17 22:49 ` Adam Carter 2010-11-17 22:59 ` Alan McKinnon 0 siblings, 1 reply; 19+ messages in thread From: Adam Carter @ 2010-11-17 22:49 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 387 bytes --] I wasnt familiar with + but it changes the default behavior of this; find /path -name something -exec ls -lS {} \; which will run ls -lS once for each file, and therefore Sort doesnt work as its only sorting a single file find /patch -name something -exec -ls -lS + which runs ls -lS once against all the files that find finds (added as additional arguments), and therefore Sort works. [-- Attachment #2: Type: text/html, Size: 407 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 22:49 ` Adam Carter @ 2010-11-17 22:59 ` Alan McKinnon 2010-11-17 23:03 ` Adam Carter 0 siblings, 1 reply; 19+ messages in thread From: Alan McKinnon @ 2010-11-17 22:59 UTC (permalink / raw To: gentoo-user Apparently, though unproven, at 00:49 on Thursday 18 November 2010, Adam Carter did opine thusly: > I wasnt familiar with + but it changes the default behavior of this; > find /path -name something -exec ls -lS {} \; > which will run ls -lS once for each file, and therefore Sort doesnt work as > its only sorting a single file > > find /patch -name something -exec -ls -lS + > which runs ls -lS once against all the files that find finds (added as > additional arguments), and therefore Sort works. Almost right. -exec + will not append all filenames found and run one command, it will append the maximum number of filenames that do not exceed the shell command line limit, and do that enough times to get through all the filenames. You will be surprised how easy it is to get a directory with enough files in it to exceed the shell command length limit (65535 chars?). I have several users who will gladly show you how it's done, and will show you where they have each done it in multiple places -- alan dot mckinnon at gmail dot com ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 22:59 ` Alan McKinnon @ 2010-11-17 23:03 ` Adam Carter 2010-11-17 23:10 ` Alan McKinnon 0 siblings, 1 reply; 19+ messages in thread From: Adam Carter @ 2010-11-17 23:03 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 555 bytes --] > > find /patch -name something -exec -ls -lS + > > which runs ls -lS once against all the files that find finds (added as > > additional arguments), and therefore Sort works. > > Almost right. > > -exec + will not append all filenames found and run one command, > > it will append the maximum number of filenames that do not exceed the shell > command line limit, and do that enough times to get through all the > filenames. > Thanks for that Alan. I wasnt 100% sure I understood the man page, and that issue could definitely bite if you weren't aware! [-- Attachment #2: Type: text/html, Size: 804 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 23:03 ` Adam Carter @ 2010-11-17 23:10 ` Alan McKinnon 0 siblings, 0 replies; 19+ messages in thread From: Alan McKinnon @ 2010-11-17 23:10 UTC (permalink / raw To: gentoo-user Apparently, though unproven, at 01:03 on Thursday 18 November 2010, Adam Carter did opine thusly: > > > find /patch -name something -exec -ls -lS + > > > which runs ls -lS once against all the files that find finds (added as > > > additional arguments), and therefore Sort works. > > > > Almost right. > > > > -exec + will not append all filenames found and run one command, > > > > it will append the maximum number of filenames that do not exceed the > > shell command line limit, and do that enough times to get through all > > the filenames. > > Thanks for that Alan. I wasnt 100% sure I understood the man page, and that > issue could definitely bite if you weren't aware! It bit me many times :-) If you know about it already, the man page of course makes perfect sense. Such a pity it's not totally clear to those who don;t know about it already. -- alan dot mckinnon at gmail dot com ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [gentoo-user] Crufted with perl modules? 2010-11-17 0:58 [gentoo-user] Crufted with perl modules? Grant 2010-11-17 1:21 ` Adam Carter @ 2010-11-17 14:15 ` Stroller 1 sibling, 0 replies; 19+ messages in thread From: Stroller @ 2010-11-17 14:15 UTC (permalink / raw To: gentoo-user On 17/11/2010, at 12:58am, Grant wrote: > I was having trouble getting g-cpan to work with a Bundle of CPAN perl > modules and I got frustrated and started to install it with perl > -MCPAN -e instead. The state of g-cpan really is a shame. :( When I bought a lottery ticket the other week, I determined to throw some money at developers to fix it, should my numbers come up. This post is a suggestion to the members of the list who have recently won millions. Stroller. ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2010-11-17 23:10 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-11-17 0:58 [gentoo-user] Crufted with perl modules? Grant 2010-11-17 1:21 ` Adam Carter 2010-11-17 1:42 ` Grant 2010-11-17 2:03 ` Willie Wong 2010-11-17 3:18 ` Grant 2010-11-17 9:10 ` Neil Bothwick 2010-11-17 9:19 ` Joerg Schilling 2010-11-17 12:52 ` Sebastian Beßler 2010-11-17 12:54 ` Albert Hopkins 2010-11-17 13:13 ` Sebastian Beßler 2010-11-17 14:09 ` Albert Hopkins 2010-11-17 14:09 ` Stroller 2010-11-17 22:14 ` John Campbell 2010-11-17 22:21 ` Sebastian Beßler 2010-11-17 22:49 ` Adam Carter 2010-11-17 22:59 ` Alan McKinnon 2010-11-17 23:03 ` Adam Carter 2010-11-17 23:10 ` Alan McKinnon 2010-11-17 14:15 ` Stroller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox