Difference between revisions of "Getting PKGBUILDs from SVN"

From ArchWiki
Jump to: navigation, search
 
(15 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Package management (English)]]
+
[[Category:Package development]]
[[Category:Package development (English)]]
+
=== IMPORTANT WARNING ===
[[Category:Development (English)]]
+
[[Category:HOWTOs (English)]]
+
 
+
 
+
== IMPORTANT WARNING ==
+
 
'''The entire SVN repo is huge. Not only will it take an obscene amount of disk space, but it will also tax the archlinux.org server for you to download it. Do not download the whole repo, only follow the instructions below.'''
 
'''The entire SVN repo is huge. Not only will it take an obscene amount of disk space, but it will also tax the archlinux.org server for you to download it. Do not download the whole repo, only follow the instructions below.'''
  
Line 14: Line 9:
 
=== Non-recursive checkout ===
 
=== Non-recursive checkout ===
  
  svn checkout -N svn://archlinux.org/home/svn-packages
+
For core,extra,testing:
  
This creates a directory named "svn-packages" which contains nothing. It does, however, know that it is an svn checkout.
+
  svn checkout --depth=empty svn://svn.archlinux.org/packages  
 +
 
 +
For community:
 +
 
 +
  svn checkout --depth=empty svn://svn.archlinux.org/community
 +
 
 +
In both cases, it simply creates an empty directory, but it does know that it is an svn checkout.
 +
 
 +
In the sections below, just replace the ''packages'' directory name by ''community'' when working with community packages.
  
 
=== Checkout a package ===
 
=== Checkout a package ===
  
   cd svn-packages
+
   cd packages
 
   svn update package-name
 
   svn update package-name
  
This will pull the package you requested into your checkout. From now on, any time you `svn update` at the top level, this will be updated as well.
+
This will pull the package you requested into your checkout. From now on, any time you ''svn update'' at the top level, this will be updated as well.
 +
 
 +
(If you specify a package that doesn't exist, svn won't warn you.  It will just print something like "At revision 115847", without creating any files.  If that happens, check your spelling of the package name.)
  
 
=== Updating all packages ===
 
=== Updating all packages ===
  
   cd svn-packages
+
   cd packages
 
   svn update
 
   svn update
 +
 +
=== Checkout an older revision of a package ===
 +
 +
  cd packages
 +
  svn log package-name
 +
 +
Find out the revision you want by examining the history, then:
 +
 +
  svn update -r1729 package-name
 +
 +
This will update an existing working copy of ''package-name'' to the chosen revision.
 +
 +
You can also specify a date. If no revision on that day exists, svn will grab the most recent package before that time:
 +
 +
  svn update -r{20090303} package-name

Revision as of 19:58, 10 May 2012

IMPORTANT WARNING

The entire SVN repo is huge. Not only will it take an obscene amount of disk space, but it will also tax the archlinux.org server for you to download it. Do not download the whole repo, only follow the instructions below.

If you abuse this service, your address may be blocked.

Never use the public SVN for any sort of scripting.

Non-recursive checkout

For core,extra,testing:

  svn checkout --depth=empty svn://svn.archlinux.org/packages 

For community:

  svn checkout --depth=empty svn://svn.archlinux.org/community 

In both cases, it simply creates an empty directory, but it does know that it is an svn checkout.

In the sections below, just replace the packages directory name by community when working with community packages.

Checkout a package

  cd packages
  svn update package-name

This will pull the package you requested into your checkout. From now on, any time you svn update at the top level, this will be updated as well.

(If you specify a package that doesn't exist, svn won't warn you. It will just print something like "At revision 115847", without creating any files. If that happens, check your spelling of the package name.)

Updating all packages

  cd packages
  svn update

Checkout an older revision of a package

  cd packages
  svn log package-name

Find out the revision you want by examining the history, then:

  svn update -r1729 package-name

This will update an existing working copy of package-name to the chosen revision.

You can also specify a date. If no revision on that day exists, svn will grab the most recent package before that time:

  svn update -r{20090303} package-name