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

Notices


Reply
  Search this Thread
Old 10-04-2008, 08:06 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Rep: Reputation: 38
rsync_slackware_patches.sh / Can I exclude files from downlo


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

I use rsync_slackware_patches.sh 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, 12:01 AM   #2
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
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:

pasture/*
zipslack/*
testing/*

After creating this text file, modify the rsync command in rsync_slackware_patches.sh 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, 09:49 AM   #3
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

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, 12:48 PM   #4
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

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

Change:
Code:
rsync ${RSYNCOPTS} ${RSYNCVERBOSE} -az --delete ${RSYNCHOST}/slackware-$VERSION/patches .
to:
Code:
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, 02:52 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

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

When you run it as
Code:
rsync_slackware_patches.sh -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:
Code:
patches/packages/amarok*
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.

Eric
 
  


Reply


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 03:58 AM
Script help - delete files older than 45 days but exclude the system files jojothedogboy Linux - Software 3 06-13-2008 03:43 PM
What files to exclude when using rsync TongueTied Linux - General 2 07-20-2006 08:39 PM
how to exclude while moving files? surfbass General 1 07-16-2006 07:48 AM
can't get rsync exclude files Batta Linux - Newbie 1 03-27-2006 10:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:34 AM.

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