Hacking:librerepo

From ParabolaWiki
Jump to: navigation, search
This article or section is out of date.
Please help improve the wiki by updating the article and correcting mistakes.

1 [Libre] Repo

1.1 Rationale

1.2 How the repo works

  1. Run db-update (tweaked), which:
    • Checks packages on staging
    • Test if they are files or links
      • if links: die
    • Check if splitpkgs are complete
    • Move packages to $PKGPOOL (fake)
    • Link packages on $PKGPOOL (fake) to repo
    • Add pkg on repo db
    • Move pkgs with "any" arch to $PKGPOOL
    • Link those pkgs on every arch db.
  2. Run ftpdir-cleanup (tweaked), which:
    • Creates a sorted list of files in repo
    • Extracts DB to stdout and reads the %FILENAME% for each package.
    • Creates a sorted list named: db-${repo}-${arch}
    • If a package is in the db and not in the repo, print an error identifying missing packages.
    • If a package is in the repo and not in the db, it is considered an old package and removed from the repo.
    • Creates a list of all packages on all db's.
    • If a package is in pool and not in a db, it is cleaned.
    • Check any on repos:
      • If no packages in a dir, the dir is removed.
      • Remove packages in a dir and not in db.
  3. Repo-maintainer:
    • Setup a logfile and counts time
    • Sync_all repo:
      • Get a list of packages to make an exclude list for rsync "rsync -a --no-motd --list-only "
      • Exclude packages on blacklist
      • Sync new packages "rsync -av --delay-updates --exclude=*.{abs|db}.tar.* "
      • Sync repo again, this time it updates db and deletes old packages "rsync -av --delete --exclude=*.abs.tar.* "
    • For repo and arch:
      • Get packages in db
      • Packages with "custom" licenses but not in blacklist or whitelist are added to pending-$repo.txt
      • Packages in blacklist are removed from db
    • add_free_repo
      • sync-free script is executed:
      • Copy files from free{community,core,extra,testing,pool} to it's equivalent in repo.
      • Sync libre, libre-testing, social and sugar to their own repo.
      • Packages are added to the db of the repo
    • get_license.sh is executed
      • Read pending.txt
      • Make a list of packages from the repos
      • Extract licenses to a tempdir
      • Move licenses to $pending-licenses-dir
  4. sync-free script is executed again.
  5. Files named *.abs.tar.gz are removed.