Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-04-2008, 09:06 PM   #1
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 585

Rep: Reputation: 38 / Can I exclude files from downlo

I have installed: Amarok: which I compiled with extra options.

I use which I use to upgrade packages
Is there a way to edit the script to exclude Amarok packages from
being downloaded into the patches directory on my computer?

I don't want to upgrade with a package compiled without options I added.
Old 10-05-2008, 01:01 AM   #2
Senior Member
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 544Reputation: 544Reputation: 544Reputation: 544Reputation: 544Reputation: 544
If you are referring to Eric (Alien) Hameleers' shell script, the script does not perform any updating. The script only synchronizes the Slackware master server and mirrors that directory tree structure to your local hard drive.

You do not have to update any package that is updated in the patches directory. You decide on your own what to update.

You can direct rsync to exclude files and directories by creating a text file with one line per exclusion. The exclusion file would look something like this:


After creating this text file, modify the rsync command in by adding the --exclude-from option. Refer to the rsync man page for more information.

With that said you don't need to exclude amarok from the synchronizing. Just don't install any new patched packages. However, a better approach is to rebuild your package with the options you want but using the new sources that are downloaded with any patches update. Most patches are security related and often updating is a reasonable strategy. Consider rebuilding any stock Slackware package that you modify to your tastes. You then get the additional options you want and ensure the package is updated with the latest security fixes.

I have a few packages that I modified in this manner. When patches are issued, I use the new patched sources and rebuild my package. Usually I diff the slackbuild scripts to learn whether the new patched version contains anything new that I should include in my own build script.
Old 10-05-2008, 10:49 AM   #3
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 585

Original Poster
Rep: Reputation: 38
Thanks for help.

I am referring to Eric (Alien) Hameleers' shell script.
I'm not sure where to add the --exclude-from option in the
script. Can I add it between 'Configurable options' and
'end of configurable options'?
Old 10-05-2008, 01:48 PM   #4
Senior Member
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 90
You'll have to alter the second 'rsync' command in the script. It's on line 105 in version 1.9 (2008/05/29).

rsync ${RSYNCOPTS} ${RSYNCVERBOSE} -az --delete ${RSYNCHOST}/slackware-$VERSION/patches .
rsync ${RSYNCOPTS} ${RSYNCVERBOSE} -az --delete --exclude-from=yourfile ${RSYNCHOST}/slackware-$VERSION/patches .
where "yourfile" is a small text file like woodsman suggested.
Old 10-05-2008, 03:52 PM   #5
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,285

Rep: Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433Reputation: 5433
I've gone ahead and added a "-X" option to the script.

When you run it as
Code: -X your_excludesfile
it will exclude all files from the rsync that are references in that file. Typically in your case the file "your_excludesfile" would have this line in it:
Also at the same time I added "-k" as an option, to "keep" old files even when they disappear on the remote server. Some people had asked me to add this because they don't want to lose previous versions of patches that were released and that they had downloaded.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I make find exclude hidden files (.files) Rotwang Linux - General 2 08-08-2011 04:58 AM
Script help - delete files older than 45 days but exclude the system files jojothedogboy Linux - Software 3 06-13-2008 04:43 PM
What files to exclude when using rsync TongueTied Linux - General 2 07-20-2006 09:39 PM
how to exclude while moving files? surfbass General 1 07-16-2006 08:48 AM
can't get rsync exclude files Batta Linux - Newbie 1 03-27-2006 11:39 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration