GithubHelp home page GithubHelp logo

anthrax3 / aptly-convert.py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ealtintas/aptly-convert.py

0.0 1.0 0.0 24 KB

Automation script for hard-linking the DEB files in a directory into another directory using the aptly pool directory structure.

License: GNU General Public License v3.0

Python 100.00%

aptly-convert.py's Introduction

aptly-convert.py

Description

Automation script for hard-linking the DEB files in a directory into another directory using the aptly pool directory structure.

Info

This script creates hard links for the DEB files into the aptly pool directory structure. You can use the script for any directory structure conatining DEB files (such as the default mirror directory "/var/spool/apt-mirror" for DEB files mirrored with apt-mirror).

After executing this script the new directory structure of the files be comaptible with aptly. So when you update your aptly mirror the DEB files will not be downloaded again. Hardlinks are used to save time and disk space.

I you already have an aptly pool containing some files, it is recommended to use a temproary aptly pool folder and then merge the contents using rsync etc. manually. After checking everthing is ok, you can safely delete ("rm", "rm -rf") the old DEB files since they are already hard linked to new directory structure.

I have written this script to trasnfer my local apt-mirror repositories to aptly. It saved me a lot of time and bandwidth. Since it uses hardlinks, it doesn't require extra disk space. I hope it will be usefull for others.

Usage

usage: aptly-convert.py [-h] [--verbosity VERBOSITY] [--src_path SRC_PATH] [--dst_path DST_PATH]

optional arguments: -h, --help show this help message and exit --verbosity VERBOSITY, -v VERBOSITY increase output verbosity. 1: Prints info for every file processed. 2: Prints extra info (HASH etc.) for every file processed. 3: Prints directory traversal info. --src_path SRC_PATH, -s SRC_PATH Source directory containing the DEB files (defaults to "/var/spool/apt-mirror") --dst_path DST_PATH, -d DST_PATH Destination directory that will contain the DEB files in aptly pool structure (defaults to "/var/spool/aptly/pool")

aptly-convert.py's People

Contributors

ealtintas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.