Skip to content

Commit

Permalink
Documentation for aptly snapshot filter. smira/aptly#82
Browse files Browse the repository at this point in the history
  • Loading branch information
smira committed Sep 21, 2014
1 parent 14ea450 commit 777cb7b
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
1 change: 1 addition & 0 deletions content/doc/aptly/snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ aptly snapshot
Snapshot is a fixed state of remote repository mirror or local repository.
Internally snapshot is list of references to packages. Snapshot is immutable, i.e. it
can't be changed since it has been created. Snapshots could be [merged](/doc/aptly/snapshot/merge/),
[filtered](/doc/aptly/snapshot/pull/),
individual packages could be [pulled](/doc/aptly/snapshot/pull/), snapshot could be
[verified](/doc/aptly/snapshot/verify/) for missing dependencies. Finally, snapshots could be
[published as repositories](/doc/aptly/publish/snapshot).
Expand Down
55 changes: 55 additions & 0 deletions content/doc/aptly/snapshot/filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
date: "2014-08-08T11:17:38Z"
title: "aptly snapshot filter"
tags:
- command
menu:
doc:
parent: aptly snapshot
weight: 55
---

aptly snapshot filter
---------------------

Applies filter to contents of snapshot `source` producing `destination`
snapshot. All packages from `source` snapshot matching any of the package
queries (optionally with all their dependencies from `source`) are used
to build new snapshot `destination`.

Usage:

$ aptly snapshot filter <source> <destination> <package-query> ...

Params:

- `source` is a snapshot name where packages would be
searched
- `destination` is a name of the snapshot that would be created
- `package-query` is a list of [package queries](/doc/feature/query/), in
the simplest form, name of package to be pulled from `source` could
be specified

Flags:

- `-with-deps=false`: include dependencies of matching packages

Filter command is almost identical to
`aptly snapshot pull empty source destination query` (`empty` being empty
snapshot), the differences are:

* pull by default includes only first matching package
* pull honors `-architectures` flag and would pull only packages with
mentioned architectures, while filter command would use package
query as given to match packages (one might use `$Architecture (i386)` in query
to limit architectures)

Example:

$ aptly snapshot filter wheezy-main wheezy-main-required 'Priority (required)'
Loading packages (31661)...
Building indexes...

Snapshot wheezy-main-required successfully filtered.
You can run 'aptly publish snapshot wheezy-main-required' to publish snapshot as Debian repository.

1 change: 1 addition & 0 deletions content/doc/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ List of aptly features, in no particular order:
* [creating](/doc/aptly/snapshot/create/) snapshots from mirrors and local repositories
* snapshot is immutable
* [merging](/doc/aptly/snapshot/merge/) several snapshots into one
* [filtering](/doc/aptly/snapshot/filter/) snapshots producing new snapshot
* [pulling](/doc/aptly/snapshot/pull/) packages matching query from one snapshot into another,
producing new snapshot
* [checking](/doc/aptly/snapshot/verify/) snapshot for unsatisfied dependencies
Expand Down
3 changes: 2 additions & 1 deletion content/doc/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Local repos could be modified by [copying](/doc/aptly/repo/copy) and
[created](/doc/aptly/snapshot/create) from remote repository (official
Debain repositories, backports, 3rd party repos, etc.) or your local
repository (custom built packages, your own software). Snapshots can be
used to produce new snapshots by [pulling](/doc/aptly/snapshot/pull)
used to produce new snapshots by [filtering](/doc/aptly/snapshot/filter/)
other snapshots, [pulling](/doc/aptly/snapshot/pull)
packages with dependencies between snapshots and by
[merging](/doc/aptly/snapshot/merge) snapshots. Any snapshot can be
[published](/doc/aptly/publish/snapshot) to location (distribution name,
Expand Down

0 comments on commit 777cb7b

Please sign in to comment.