LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 09-16-2008, 07:56 PM   #1
Cyberman
Member
 
Registered: Aug 2005
Distribution: Debian Stable
Posts: 158

Rep: Reputation: 16
What is the point of apt-move fsck?


Does it cache things?
Because I had to remodel a script at the last moment in order to get a DIY repository working over NFS. And, I'm getting the ghist that apt-move somehow cache's things, thus reducing the amount of read/writes if I use apt-move cache.
Am I right about this?

I read the man page. I didn't get it. Someone want to explain in detail about this? Please?

Here's my script.
It does apt-move fsck.
Then it makes the repository.
Then I delete whatever apt-move left behind.

Code:
#!/bin/sh
######################################
# Program: Debian Pool creator
# Objective: Create a Debian pool
# Last update: September 16th, 2008
######################################
# Download pre-requisites
## Check for apt-move
if [ -e /usr/bin/apt-move ]
	then
		clear
	else
		apt-get -y install apt-move
fi
## Check for apt-ftparchive
if [ -e /usr/bin/apt-ftparchive ]
	then
		clear
	else
		apt-get -y install apt-utils
		apt-get -y install apt-ftparchive
fi
#################################################################
# Create an archive of whatever (just one big fucking annoyance)
#################################################################
apt-move fsck
######################################
# Make the necessary folders
######################################
# Make mirroring folder
mkdir -p /mirrors/debian/
cd /mirrors/debian/
# Make the folder-trees for the various distros
mkdir -p /mirrors/debian/dists/lenny/{non-free,contrib,multiverse}/binary-i386
mkdir -p /mirrors/debian/dists/testing/{non-free,contrib,multiverse}/binary-i386
mkdir -p /mirrors/debian/dists/sid/{non-free,contrib,multiverse}/binary-i386
mkdir -p /mirrors/debian/dists/unstable/{non-free,contrib,multiverse}/binary-i386
# Make the pool directory
mkdir -p /mirrors/debian/pool/{main,non-free,contrib,multiverse}
##########
# Lenny
##########
echo "--------------------------------"
echo "Working on Lenny packages"
echo "--------------------------------"
# Move the packages to /mirrors/debian
apt-move -d lenny update
# Organize the "main" packages
apt-ftparchive packages pool/main/ | gzip -9c > /mirrors/debian/dists/lenny/main/binary-i386/Packages.gz
# Organize the "multiverse" packages
apt-ftparchive packages pool/multiverse/ | gzip -9c > /mirrors/debian/dists/lenny/multiverse/binary-i386/Packages.gz
# Organize the "contrib" packages
apt-ftparchive packages pool/contrib/ | gzip -9c > /mirrors/debian/dists/lenny/contrib/binary-i386/Packages.gz
# Organize the "non-free" packages
apt-ftparchive packages pool/non-free/ | gzip -9c > /mirrors/debian/dists/lenny/non-free/binary-i386/Packages.gz
clear
##########
# Testing
##########
echo "--------------------------------"
echo "Working on testing packages"
echo "--------------------------------"
# Move the packages to /mirrors/debian
apt-move -d testing update
# Organize the "main" packages
apt-ftparchive packages pool/main/ | gzip -9c > dists/testing/main/binary-i386/Packages.gz
# Organize the "multiverse" packages
apt-ftparchive packages pool/multiverse/ | gzip -9c > dists/testing/multiverse/binary-i386/Packages.gz
# Organize the "contrib" packages
apt-ftparchive packages pool/contrib/ | gzip -9c > dists/testing/contrib/binary-i386/Packages.gz
# Organize the "non-free" packages
apt-ftparchive packages pool/non-free/ | gzip -9c > dists/testing/non-free/binary-i386/Packages.gz
clear
##########
# Sid
##########
echo "--------------------------------"
echo "Working on Sid packages"
echo "--------------------------------"
# Move the packages to /mirrors/debian
apt-move -d sid update
# Organize the "main" packages
apt-ftparchive packages pool/main/ | gzip -9c > dists/sid/main/binary-i386/Packages.gz
# Organize the "multiverse" packages
apt-ftparchive packages pool/multiverse/ | gzip -9c > dists/sid/multiverse/binary-i386/Packages.gz
# Organize the "contrib" packages
apt-ftparchive packages pool/contrib/ | gzip -9c > dists/sid/contrib/binary-i386/Packages.gz
# Organize the "non-free" packages
apt-ftparchive packages pool/non-free/ | gzip -9c > dists/sid/non-free/binary-i386/Packages.gz
clear
##########
# Unstable
##########
echo "--------------------------------"
echo "Working on unstable packages"
echo "--------------------------------"
# Move the packages to /mirrors/debian
apt-move -d unstable update
# Organize the "main" packages
apt-ftparchive packages pool/main/ | gzip -9c > dists/unstable/main/binary-i386/Packages.gz
# Organize the "multiverse" packages
apt-ftparchive packages pool/multiverse/ | gzip -9c > dists/unstable/multiverse/binary-i386/Packages.gz
# Organize the "contrib" packages
apt-ftparchive packages pool/contrib/ | gzip -9c > dists/unstable/contrib/binary-i386/Packages.gz
# Organize the "non-free" packages
apt-ftparchive packages pool/non-free/ | gzip -9c > dists/unstable/non-free/binary-i386/Packages.gz
clear
################################
# Remove former "Release" files
################################
rm /mirrors/debian/dists/lenny/Release
rm /mirrors/debian/dists/testing/Release
rm /mirrors/debian/dists/sid/Release
rm /mirrors/debian/dists/unstable/Release
################################
# Create modified "Release" files
################################
#apt-ftparchive generate /etc/apt/apt-ftparchive.conf
# Lenny
apt-ftparchive -c /home/workstation/scripts/debian-pool/lenny/lennyapt.conf release dists/lenny/ > /mirrors/debian/dists/lenny/Release
# Testing
apt-ftparchive -c /home/workstation/scripts/debian-pool/testing/testingapt.conf release dists/testing/ > /mirrors/debian/dists/testing/Release
# Sid
apt-ftparchive -c /home/workstation/scripts/debian-pool/sid/sidapt.conf release dists/sid/ > /mirrors/debian/dists/sid/Release
# unstable
apt-ftparchive -c /home/workstation/scripts/debian-pool/unstable/unstableapt.conf release dists/unstable/ > /mirrors/debian/dists/unstable/Release
#################################################
# Remove the unnecessary thing apt-move fsck did
#################################################
rm -r /mirrors/debian/backup
rm -r /mirrors/debian/.apt-move
 
Old 09-17-2008, 11:33 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,691

Rep: Reputation: 286Reputation: 286Reputation: 286
This explanation might help understand the purpose of apt-move: http://linux.about.com/cs/linux101/g/aptmove.htm
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cant move file between HDDs - fsck says clean Nonc Linux - Software 9 07-16-2008 12:30 PM
fsck.ext: unable to resolv "the mount point" toreones Linux - Newbie 1 01-18-2008 10:27 AM
fsck move file when removing inodes? allasso Linux - General 2 09-26-2006 05:22 PM
Move mount point to another physical drive? michaelsanford Linux - General 2 05-06-2005 01:42 PM
Is there any point in running fsck.ext3? Rundi Linux - General 11 03-12-2004 09:28 AM


All times are GMT -5. The time now is 08:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration