[Slackbuilds-users] slackbuilds up for grabs

Duncan Roe duncan_roe at optusnet.com.au
Tue May 9 01:47:33 UTC 2023


On Mon, May 08, 2023 at 08:02:42AM +0200, Didier Spaier wrote:
> Le 08/05/2023 à 06:29, Franzen via SlackBuilds-users a écrit :
> > The find -L ... on this sources takes forever on my old hardware, and spits
> > thousand
> > "chmod: cannot operate on dangling symlink
> > './links/22/actions/fileview-preview.svg"
> > I changed it to
> > chmod -R u+w,go-w,a+rX-st .
> > and it's ready under one second.
> >
> > There are also some duplicate files(not much, but anyway), to replace them by
> > symlinks i added:
> > LASTSIZE=x
> > find $PKG -type f -printf '%s %p\n' | sort -n |
> > while read -r SIZE FILE; do
> >   # symlinks alse need some bytes, don't link under 10 bytes
> >   if [ "$SIZE" -gt 10 -a "$SIZE" == "$LASTSIZE" ]; then
> >     if [ "$(sha512sum $FILE | cut -d' ' -f1)" \
> >       == "$(sha512sum $LASTFILE | cut -d' ' -f1)" ] ; then
> >       ln -srf $FILE $LASTFILE
> >     fi
> >   fi
> >   LASTSIZE="$SIZE"; LASTFILE="$FILE"
> > done
>
> Thanks Johannes, I will take your changes.
>
> As an aside, I included this package in Slint so users be able to add XFCE-4.18
> as packaged by George Vlahavas in
> http://slackware.uk/salix/x86_64/xfce4.18-15.0/ (with the same look) trying just
> this command:
> slapt-get --install-set xfce
>
> Cheers,
> Didier
>
I'm a little concerned by the comment

  "symlinks alse need some bytes, don't link under 10 bytes"

Files occupy a multiple of 4K bytes. So replacing a 1-byte file with a symlink
will usually save 4KB. Occasionally it will bump the directory size by 4KB so
there is no saving.

I suggest symlinking should be unconditional.

Cheers ... Duncan.


More information about the SlackBuilds-users mailing list