Re: chkstow not showing list of packages
James Jong <[email protected]> Wed, 24 Apr 2013 14:09:01 -0400
| Newsgroups | gmane.comp.gnu.stow.general |
|---|---|
| Message-ID | <CAD4ivxUeZxdWbTiFWYk2ntD7=AT=jLvBCRtBPFZT7b9snWEoaw@mail.gmail.com> |
--089e016814e28ac2d304db1f3362 Content-Type: text/plain; charset=ISO-8859-1 I just tried starting from scratch with a new target directory called stow, and here is what I noticed: > chkstow --list outputs nothing > chkstow -t /home/james/opt/stow # This is my stow dir outputs only files within folders actually living in the stow directory, but not folders than I have symlinked. Somehow chkstow is unable to identify packages that I have stowed and that live as symlinks in the stow dir (even though stowing and unstowing them works well) James On Wed, Apr 24, 2013 at 4:01 AM, Adam Spiers <[email protected]> wrote: > [ordering reversed; please don't top-post] > > On Mon, Apr 22, 2013 at 02:15:04PM -0400, James Jong wrote: > > On Sun, Apr 21, 2013 at 6:03 PM, James Jong <[email protected]> > wrote: > > > > > I have the following setup in my .stowrc file: > > > > > > --dir=/home/james/opt/stow_all/stow_storage > > > --target=/home/james/opt/stow_all/stow_appear > > > --ignore='~' > > > --ignore='^CVS' > > > > > > and I have successfully stowed two packages under my target path. > > > > > > However, when I try: > > > > chkstow --list > > > or > > > > chkstow -l > > > or > > > > chkstow -t /home/james/opt/stow_all/stow_appear --list > > > > > > I get nothing. Wasn't this command supposed to show the packages that I > > > have installed? Any thoughts on why I get nothing? > > > > > > Thanks again for providing this great tool to the community. As we move > > > back to time-shared systems/supercomputers and people lose admin > rights to > > > these systems, installing to local installations is increasingly > becoming > > > more common, and Stow is a perfect fit for this, > > > > I wonder if the reason why chkstow isn't working is because I am using > > symlinks to populate my stow dir ? (see my other question: > > http://lists.gnu.org/archive/html/help-stow/2013-04/msg00006.html) > > Possibly - you could reduce it to test cases with and without symlinks > to determine this (please share the results if you do). > > However, it looks much more likely that this is due to chkstow being > an ugly hack: > > # just list the packages in the the target directory > # FIXME: what if the stow dir is not called 'stow'? > sub list { > if (-l) { > $_ = readlink; > s{\A(?:\.\./)+stow/}{}g; > s{/.*}{}g; > $Package{$_} = 1; > } > } > > --089e016814e28ac2d304db1f3362 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>I just tried starting from scratch with a new target = directory called stow, and here is what I noticed:<br><br></div><div>> c= hkstow --list<br></div><div>outputs nothing<br></div><div>> chkstow -t /= home/james/opt/stow # This is my stow dir<br> </div><div>outputs only files within folders actually living in the stow di= rectory, but not folders than I have symlinked.<br><br></div><div>Somehow c= hkstow is unable to identify packages that I have stowed and that live as s= ymlinks in the stow dir (even though stowing and unstowing them works well)= <br> <br></div><div>James<br></div><div></div><div><br><br></div><br></div><div = class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed, Apr 24, 20= 13 at 4:01 AM, Adam Spiers <span dir=3D"ltr"><<a href=3D"mailto:stow@ada= mspiers.org" target=3D"_blank">[email protected]</a>></span> wrote:<br= > <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">[ordering reversed; please don't top-pos= t]<br> <div class=3D"im"><br> On Mon, Apr 22, 2013 at 02:15:04PM -0400, James Jong wrote:<br> > On Sun, Apr 21, 2013 at 6:03 PM, James Jong <<a href=3D"mailto:ribo= [email protected]">[email protected]</a>> wrote:<br> ><br> > > I have the following setup in my .stowrc file:<br> > ><br> > > --dir=3D/home/james/opt/stow_all/stow_storage<br> > > --target=3D/home/james/opt/stow_all/stow_appear<br> > > --ignore=3D'~'<br> > > --ignore=3D'^CVS'<br> > ><br> > > and I have successfully stowed two packages under my target path.= <br> > ><br> > > However, when I try:<br> > > > chkstow --list<br> > > or<br> > > > chkstow -l<br> > > or<br> > > > chkstow -t /home/james/opt/stow_all/stow_appear --list<br> > ><br> > > I get nothing. Wasn't this command supposed to show the packa= ges that I<br> > > have installed? Any thoughts on why I get nothing?<br> > ><br> > > Thanks again for providing this great tool to the community. As w= e move<br> > > back to time-shared systems/supercomputers and people lose admin = rights to<br> > > these systems, installing to local installations is increasingly = becoming<br> > > more common, and Stow is a perfect fit for this,<br> ><br> </div><div class=3D"im">> I wonder if the reason why chkstow isn't w= orking is because I am using<br> > symlinks to populate my stow dir ? (see my other question:<br> > <a href=3D"http://lists.gnu.org/archive/html/help-stow/2013-04/msg0000= 6.html" target=3D"_blank">http://lists.gnu.org/archive/html/help-stow/2013-= 04/msg00006.html</a>)<br> <br> </div>Possibly - you could reduce it to test cases with and without symlink= s<br> to determine this (please share the results if you do).<br> <br> However, it looks much more likely that this is due to chkstow being<br> an ugly hack:<br> <br> =A0 =A0 # just list the packages in the the target directory<br> =A0 =A0 # FIXME: what if the stow dir is not called 'stow'?<br> =A0 =A0 sub list {<br> =A0 =A0 =A0 =A0 if (-l) {<br> =A0 =A0 =A0 =A0 =A0 =A0 $_ =3D readlink;<br> =A0 =A0 =A0 =A0 =A0 =A0 s{\A(?:\.\./)+stow/}{}g;<br> =A0 =A0 =A0 =A0 =A0 =A0 s{/.*}{}g;<br> =A0 =A0 =A0 =A0 =A0 =A0 $Package{$_} =3D 1;<br> =A0 =A0 =A0 =A0 }<br> =A0 =A0 }<br> <br> </blockquote></div><br></div> --089e016814e28ac2d304db1f3362--