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>&gt; c=
hkstow --list<br></div><div>outputs nothing<br></div><div>&gt; 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">&lt;<a href=3D"mailto:stow@ada=
mspiers.org" target=3D"_blank">[email protected]</a>&gt;</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&#39;t top-pos=
t]<br>
<div class=3D"im"><br>
On Mon, Apr 22, 2013 at 02:15:04PM -0400, James Jong wrote:<br>
&gt; On Sun, Apr 21, 2013 at 6:03 PM, James Jong &lt;<a href=3D"mailto:ribo=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; I have the following setup in my .stowrc file:<br>
&gt; &gt;<br>
&gt; &gt; --dir=3D/home/james/opt/stow_all/stow_storage<br>
&gt; &gt; --target=3D/home/james/opt/stow_all/stow_appear<br>
&gt; &gt; --ignore=3D&#39;~&#39;<br>
&gt; &gt; --ignore=3D&#39;^CVS&#39;<br>
&gt; &gt;<br>
&gt; &gt; and I have successfully stowed two packages under my target path.=
<br>
&gt; &gt;<br>
&gt; &gt; However, when I try:<br>
&gt; &gt; &gt; chkstow --list<br>
&gt; &gt; or<br>
&gt; &gt; &gt; chkstow -l<br>
&gt; &gt; or<br>
&gt; &gt; &gt; chkstow -t /home/james/opt/stow_all/stow_appear --list<br>
&gt; &gt;<br>
&gt; &gt; I get nothing. Wasn&#39;t this command supposed to show the packa=
ges that I<br>
&gt; &gt; have installed? Any thoughts on why I get nothing?<br>
&gt; &gt;<br>
&gt; &gt; Thanks again for providing this great tool to the community. As w=
e move<br>
&gt; &gt; back to time-shared systems/supercomputers and people lose admin =
rights to<br>
&gt; &gt; these systems, installing to local installations is increasingly =
becoming<br>
&gt; &gt; more common, and Stow is a perfect fit for this,<br>
&gt;<br>
</div><div class=3D"im">&gt; I wonder if the reason why chkstow isn&#39;t w=
orking is because I am using<br>
&gt; symlinks to populate my stow dir ? (see my other question:<br>
&gt; <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 &#39;stow&#39;?<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--