Changeset 29704


Ignore:
Timestamp:
2015-02-03T09:53:54+13:00 (9 years ago)
Author:
Jeremy Symon
Message:

Updated pacman repo script to no longer symlink noarch packages into 32- and 64-bit repos. This change results in wasted space (as the files are now duplicated), however it also makes the repo easier to manage, and allows it to be served from a webserver (or filesystem) that doesn't support symlinks

Location:
main/trunk/package-kits/linux/repos
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/package-kits/linux/repos/ReadMe

    r29692 r29704  
    3333and to maintain the repositories for those package-managers (e.g. adding new
    3434versions of packages)
     35Usage:
     36    setup           - creates the package manager's repo, and any config / readme files
     37    add <pkg> [...] - adds any number of packages to the repo
    3538
    3639./apt
     40    Depends on: reprepro gnupg
    3741    Generates an apt package repository under ./repos/
    3842    reprepro is used to manage the repository, so this script just generates the
     
    4044
    4145./pacman
     46    Depends on: repo-add gnupg xdelta3
    4247    Generates a pacman package repository under ./repos/
    4348    repo-add is used to manage the repositories.
     
    4752
    4853./rpm
     54    Depends on: createrepo rpmsign gnupg
    4955    Generates a rpm package repository under ./repos/
    5056    createrepo is used to manage the repositories.
  • main/trunk/package-kits/linux/repos/pacman

    r29700 r29704  
    88
    99repo_add_check() {
    10     cd $repos/arch/ || {
     10    test -d $repos/arch/ || {
    1111        echo "Repository not found. Have you set it up?" >&2
    1212        exit 1
     
    2121    setup)
    2222        echo "Making arch package repository folders"
    23         for arch in any x86_64 i686; do
     23        for arch in x86_64 i686; do
    2424            mkdir -p $repos/arch/$arch || exit 1
    2525        done
     
    5050        for pkg in $@; do
    5151            # Default to all architectures unless an architecture is specified
    52             arch="any"
     52            arch="x86_64 i686"
    5353            echo $pkg | grep 'x86_64\.pkg' >/dev/null 2>/dev/null && {
    5454                arch="x86_64"
     
    5858            }
    5959            name="$(basename $pkg)"
    60             echo "$name: $arch"
    61             cp $pkg $arch/
    62             rm -f "$arch/${name}.sig"
    63             gpg --detach-sign --use-agent --default-key $keyid "$arch/$name"
    64             # If arch is any, symlink package into all architectures
    65             if test "$arch" = "any"; then
    66                 for link in x86_64 i686; do
    67                     echo "$name: $link (linked)"
    68                     cd $link
    69                     ln -sf ../any/$name $name
    70                     ln -sf ../any/${name}.sig ${name}.sig
    71                     cd ..
    72                 done
    73                 arch="any x86_64 i686"
    74             fi
    75 
    7660            for pkgarch in $arch; do
    77                 cd $pkgarch
    78                 repo-add -s -k $keyid -v -d ${label}.db.tar.xz $name
    79                 cd ..
     61                dir="$repos/arch/$pkgarch"
     62                cp "$pkg" "$dir/"
     63                cd "$dir"
     64                echo "$name: $pkgarch"
     65                rm -f "${name}.sig"
     66                gpg --detach-sign --use-agent --default-key "$keyid" "$name"
     67                repo-add -s -k "$keyid" -v -d "${label}.db.tar.xz" "$name"
     68                cd -
    8069            done
    8170        done
Note: See TracChangeset for help on using the changeset viewer.